1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
7 define <16 x float> @test1(<16 x float> %x, <16 x float> %y) nounwind {
8 %mask = fcmp ole <16 x float> %x, %y
9 %max = select <16 x i1> %mask, <16 x float> %x, <16 x float> %y
17 define <8 x double> @test2(<8 x double> %x, <8 x double> %y) nounwind {
18 %mask = fcmp ole <8 x double> %x, %y
19 %max = select <8 x i1> %mask, <8 x double> %x, <8 x double> %y
24 ; CHECK: vpcmpeqd (%rdi)
27 define <16 x i32> @test3(<16 x i32> %x, <16 x i32> %x1, <16 x i32>* %yp) nounwind {
28 %y = load <16 x i32>* %yp, align 4
29 %mask = icmp eq <16 x i32> %x, %y
30 %max = select <16 x i1> %mask, <16 x i32> %x, <16 x i32> %x1
34 ; CHECK-LABEL: @test4_unsigned
38 define <16 x i32> @test4_unsigned(<16 x i32> %x, <16 x i32> %y) nounwind {
39 %mask = icmp uge <16 x i32> %x, %y
40 %max = select <16 x i1> %mask, <16 x i32> %x, <16 x i32> %y
45 ; CHECK: vpcmpeqq {{.*}}%k1
46 ; CHECK: vmovdqu64 {{.*}}%k1
48 define <8 x i64> @test5(<8 x i64> %x, <8 x i64> %y) nounwind {
49 %mask = icmp eq <8 x i64> %x, %y
50 %max = select <8 x i1> %mask, <8 x i64> %x, <8 x i64> %y
54 ; CHECK-LABEL: test6_unsigned
55 ; CHECK: vpcmpnleuq {{.*}}%k1
56 ; CHECK: vmovdqu64 {{.*}}%k1
58 define <8 x i64> @test6_unsigned(<8 x i64> %x, <8 x i64> %y) nounwind {
59 %mask = icmp ugt <8 x i64> %x, %y
60 %max = select <8 x i1> %mask, <8 x i64> %x, <8 x i64> %y
69 define <4 x float> @test7(<4 x float> %a, <4 x float> %b) {
70 %mask = fcmp olt <4 x float> %a, zeroinitializer
71 %c = select <4 x i1>%mask, <4 x float>%a, <4 x float>%b
80 define <2 x double> @test8(<2 x double> %a, <2 x double> %b) {
81 %mask = fcmp olt <2 x double> %a, zeroinitializer
82 %c = select <2 x i1>%mask, <2 x double>%a, <2 x double>%b
90 define <8 x i32> @test9(<8 x i32> %x, <8 x i32> %y) nounwind {
91 %mask = icmp eq <8 x i32> %x, %y
92 %max = select <8 x i1> %mask, <8 x i32> %x, <8 x i32> %y
100 define <8 x float> @test10(<8 x float> %x, <8 x float> %y) nounwind {
101 %mask = fcmp oeq <8 x float> %x, %y
102 %max = select <8 x i1> %mask, <8 x float> %x, <8 x float> %y
106 ; CHECK-LABEL: test11_unsigned
107 ; CHECK: vpcmpnleud %zmm
108 ; CHECK: vpblendmd %zmm
110 define <8 x i32> @test11_unsigned(<8 x i32> %x, <8 x i32> %y) nounwind {
111 %mask = icmp ugt <8 x i32> %x, %y
112 %max = select <8 x i1> %mask, <8 x i32> %x, <8 x i32> %y