summaryrefslogtreecommitdiff
path: root/test/CodeGen/Hexagon
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-11-22 20:56:23 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-11-22 20:56:23 +0000
commit67b504e6c000ed2998620aa1fa4b63f4c458e9f0 (patch)
treeec61f84c94db925f1eb8c1889de1aed4e3059d0b /test/CodeGen/Hexagon
parent8a2f52cd96cbbb80480bf065e8a7c4ef86770034 (diff)
[Hexagon] Implement buildVector32 and buildVector64 as utility functions
Change LowerBUILD_VECTOR to use those functions. This commit will tempora- rily affect constant vector generation (it will generate constant-extended values instead of non-extended combines), but the code for the general case should be better. The constant selection part will be fixed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Hexagon')
-rw-r--r--test/CodeGen/Hexagon/constp-combine-neg.ll3
-rw-r--r--test/CodeGen/Hexagon/vect/vect-cst-v4i32.ll3
-rw-r--r--test/CodeGen/Hexagon/vect/vect-vsplatb.ll8
3 files changed, 12 insertions, 2 deletions
diff --git a/test/CodeGen/Hexagon/constp-combine-neg.ll b/test/CodeGen/Hexagon/constp-combine-neg.ll
index 089d9f6a998..283bd4801e9 100644
--- a/test/CodeGen/Hexagon/constp-combine-neg.ll
+++ b/test/CodeGen/Hexagon/constp-combine-neg.ll
@@ -1,3 +1,6 @@
+; XFAIL: *
+; Implement generic selection of a constant.
+
; RUN: llc -O2 -march=hexagon < %s | FileCheck %s --check-prefix=CHECK-TEST1
; RUN: llc -O2 -march=hexagon < %s | FileCheck %s --check-prefix=CHECK-TEST2
; RUN: llc -O2 -march=hexagon < %s | FileCheck %s --check-prefix=CHECK-TEST3
diff --git a/test/CodeGen/Hexagon/vect/vect-cst-v4i32.ll b/test/CodeGen/Hexagon/vect/vect-cst-v4i32.ll
index 4bba134a40c..12f9e00f0d0 100644
--- a/test/CodeGen/Hexagon/vect/vect-cst-v4i32.ll
+++ b/test/CodeGen/Hexagon/vect/vect-cst-v4i32.ll
@@ -1,3 +1,6 @@
+; XFAIL: *
+; Extract selecting of a constant into a generic utility function.
+;
; RUN: llc -march=hexagon -mcpu=hexagonv5 -disable-hsdr < %s | FileCheck %s
; This one should generate a combine with two immediates.
; CHECK: combine(#7,#7)
diff --git a/test/CodeGen/Hexagon/vect/vect-vsplatb.ll b/test/CodeGen/Hexagon/vect/vect-vsplatb.ll
index 097e2ccd600..faea9350a9d 100644
--- a/test/CodeGen/Hexagon/vect/vect-vsplatb.ll
+++ b/test/CodeGen/Hexagon/vect/vect-vsplatb.ll
@@ -5,7 +5,7 @@
@A = common global [400 x i8] zeroinitializer, align 8
@C = common global [400 x i8] zeroinitializer, align 8
-define void @run() nounwind {
+define void @run(i8 %v) nounwind {
entry:
br label %polly.loop_body
@@ -19,7 +19,11 @@ polly.loop_body: ; preds = %entry, %polly.loop_
%p_arrayidx = getelementptr [400 x i8], [400 x i8]* @B, i32 0, i32 %polly.loopiv25
%vector_ptr = bitcast i8* %p_arrayidx to <4 x i8>*
%_p_vec_full = load <4 x i8>, <4 x i8>* %vector_ptr, align 8
- %mulp_vec = mul <4 x i8> %_p_vec_full, <i8 7, i8 7, i8 7, i8 7>
+ %vec0 = insertelement <4 x i8> undef, i8 %v, i32 0
+ %vec1 = insertelement <4 x i8> %vec0, i8 %v, i32 1
+ %vec2 = insertelement <4 x i8> %vec1, i8 %v, i32 2
+ %vec3 = insertelement <4 x i8> %vec2, i8 %v, i32 3
+ %mulp_vec = mul <4 x i8> %_p_vec_full, %vec3
%vector_ptr14 = bitcast i8* %p_arrayidx1 to <4 x i8>*
%_p_vec_full15 = load <4 x i8>, <4 x i8>* %vector_ptr14, align 8
%addp_vec = add <4 x i8> %_p_vec_full15, %mulp_vec