summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2014-02-16 11:34:23 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2014-02-16 11:34:23 +0000
commitf280c65b32358025fd64495c016ccb6f3f70427c (patch)
tree3b022ed5b30e13c15c8e1d7bae5132c1d6f7f788 /test/CodeGen
parent8e810aeec3bc2a772d8d6130dd783ca8f2822407 (diff)
downloadllvm-f280c65b32358025fd64495c016ccb6f3f70427c.tar.gz
llvm-f280c65b32358025fd64495c016ccb6f3f70427c.tar.bz2
llvm-f280c65b32358025fd64495c016ccb6f3f70427c.tar.xz
AVX-512: simpyfied BUILD_VECTOR for masks; fixed cmp/test sequence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/avx512-cmp.ll21
-rw-r--r--test/CodeGen/X86/avx512-insert-extract.ll16
2 files changed, 15 insertions, 22 deletions
diff --git a/test/CodeGen/X86/avx512-cmp.ll b/test/CodeGen/X86/avx512-cmp.ll
index 3515529c89..47e50a9379 100644
--- a/test/CodeGen/X86/avx512-cmp.ll
+++ b/test/CodeGen/X86/avx512-cmp.ll
@@ -39,25 +39,6 @@ define i32 @test3(float %a, float %b) {
ret i32 %conv11.i
}
-; CHECK-LABEL: test4
-; CHECK: kortestw
-; CHECK: jne
-; CHECK: ret
-declare i32 @llvm.x86.avx512.kortestz.w(i16, i16)
-
-define i16 @test4(i16 %a, i16 %b) {
- %kortz = call i32 @llvm.x86.avx512.kortestz.w(i16 %a, i16 %b)
- %t1 = and i32 %kortz, 1
- %res = icmp eq i32 %t1, 0
- br i1 %res, label %A, label %B
-
- A: ret i16 %a
- B:
- %b1 = add i16 %a, %b
- ret i16 %b1
-
-}
-
; CHECK-LABEL: test5
; CHECK: ret
define float @test5(float %p) #0 {
@@ -104,4 +85,4 @@ define i32 @test8(i32 %a1, i32 %a2, i32 %a3) {
%tmp5 = or i1 %tmp3, %tmp4
%res = select i1 %tmp5, i32 1, i32 %a3
ret i32 %res
- } \ No newline at end of file
+}
diff --git a/test/CodeGen/X86/avx512-insert-extract.ll b/test/CodeGen/X86/avx512-insert-extract.ll
index f8a84bb1f2..4fca78fe72 100644
--- a/test/CodeGen/X86/avx512-insert-extract.ll
+++ b/test/CodeGen/X86/avx512-insert-extract.ll
@@ -102,9 +102,8 @@ define i32 @test10(<16 x i32> %x, i32 %ind) nounwind {
;CHECK: vpcmpltud
;CKECK: kshiftlw $11
;CKECK: kshiftrw $15
-;CHECK: kxorw
;CHECK: kortestw
-;CHECK: jne
+;CHECK: je
;CHECK: ret
;CHECK: ret
define <16 x i32> @test11(<16 x i32>%a, <16 x i32>%b) {
@@ -133,4 +132,17 @@ define i64 @test12(<16 x i64>%a, <16 x i64>%b, i64 %a1, i64 %b1) {
ret i64 %res
}
+;CHECK-LABEL: test13
+;CHECK: cmpl
+;CHECK: sbbl
+;CKECK: orl $65532
+;CHECK: ret
+define i16 @test13(i32 %a, i32 %b) {
+ %cmp_res = icmp ult i32 %a, %b
+ %maskv = insertelement <16 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>, i1 %cmp_res, i32 0
+ %res = bitcast <16 x i1> %maskv to i16
+ ret i16 %res
+}
+
+