Test
[oota-llvm.git] / test / CodeGen / X86 / avx512-vec-cmp.ll
index 04028a1da510ddff7bea3d4f6a1e32f21618d7a4..a8c558df9de8f5e55fe5cc2cbc8cdd616198479d 100644 (file)
@@ -152,7 +152,6 @@ define <8 x i32> @test11_unsigned(<8 x i32> %x, <8 x i32> %y) nounwind {
   ret <8 x i32> %max
 }
 
-
 define i16 @test12(<16 x i64> %a, <16 x i64> %b) nounwind {
 ; KNL-LABEL: test12:
 ; KNL:       ## BB#0:
@@ -166,6 +165,32 @@ define i16 @test12(<16 x i64> %a, <16 x i64> %b) nounwind {
   ret i16 %res1
 }
 
+define i32 @test12_v32i32(<32 x i32> %a, <32 x i32> %b) nounwind {
+; SKX-LABEL: test12_v32i32:
+; SKX:       ## BB#0:
+; SKX-NEXT:    vpcmpeqd %zmm2, %zmm0, %k0
+; SKX-NEXT:    vpcmpeqd %zmm3, %zmm1, %k1
+; SKX-NEXT:    kunpckwd %k0, %k1, %k0
+; SKX-NEXT:    kmovd %k0, %eax
+; SKX-NEXT:    retq
+  %res = icmp eq <32 x i32> %a, %b
+  %res1 = bitcast <32 x i1> %res to i32
+  ret i32 %res1
+}
+
+define i64 @test12_v64i16(<64 x i16> %a, <64 x i16> %b) nounwind {
+; SKX-LABEL: test12_v64i16:
+; SKX:       ## BB#0:
+; SKX-NEXT:    vpcmpeqw %zmm2, %zmm0, %k0
+; SKX-NEXT:    vpcmpeqw %zmm3, %zmm1, %k1
+; SKX-NEXT:    kunpckdq %k0, %k1, %k0
+; SKX-NEXT:    kmovq %k0, %rax
+; SKX-NEXT:    retq
+  %res = icmp eq <64 x i16> %a, %b
+  %res1 = bitcast <64 x i1> %res to i64
+  ret i64 %res1
+}
+
 define <16 x i32> @test13(<16 x float>%a, <16 x float>%b)
 ; KNL-LABEL: test13:
 ; KNL:       ## BB#0:
@@ -394,7 +419,7 @@ define <8 x i64> @test27(<8 x i64> %x, i64* %yb.ptr, <8 x i64> %x1, <8 x i64> %y
 ; KNL-LABEL: test28
 ; KNL: vpcmpgtq
 ; KNL: vpcmpgtq
-; KNL: kxorw
+; KNL: kxnorw
 define <8 x i32>@test28(<8 x i64> %x, <8 x i64> %y, <8 x i64> %x1, <8 x i64> %y1) {
   %x_gt_y = icmp sgt <8 x i64> %x, %y
   %x1_gt_y1 = icmp sgt <8 x i64> %x1, %y1
@@ -406,7 +431,7 @@ define <8 x i32>@test28(<8 x i64> %x, <8 x i64> %y, <8 x i64> %x1, <8 x i64> %y1
 ; KNL-LABEL: test29
 ; KNL: vpcmpgtd
 ; KNL: vpcmpgtd
-; KNL: kxnorw
+; KNL: kxorw
 define <16 x i8>@test29(<16 x i32> %x, <16 x i32> %y, <16 x i32> %x1, <16 x i32> %y1) {
   %x_gt_y = icmp sgt <16 x i32> %x, %y
   %x1_gt_y1 = icmp sgt <16 x i32> %x1, %y1