1 ; RUN: opt < %s -O3 | \
2 ; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
4 define <4 x i32> @test1(<4 x float> %a, <4 x float> %b, <4 x i32> %c) {
5 %f = fcmp ult <4 x float> %a, %b
6 %r = select <4 x i1> %f, <4 x i32> %c, <4 x i32> zeroinitializer
14 define <4 x i32> @test2(<4 x float> %a, <4 x float> %b, <4 x i32> %c) {
15 %f = fcmp ult <4 x float> %a, %b
16 %r = select <4 x i1> %f, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, <4 x i32> %c
24 define <4 x i32> @test3(<4 x float> %a, <4 x float> %b, <4 x i32> %c) {
25 %f = fcmp ult <4 x float> %a, %b
26 %r = select <4 x i1> %f, <4 x i32> zeroinitializer, <4 x i32> %c
34 define <4 x i32> @test4(<4 x float> %a, <4 x float> %b, <4 x i32> %c) {
35 %f = fcmp ult <4 x float> %a, %b
36 %r = select <4 x i1> %f, <4 x i32> %c, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
44 define <4 x i32> @test5(<4 x float> %a, <4 x float> %b, <4 x i32> %c) {
45 %f = fcmp ult <4 x float> %a, %b
46 %r = select <4 x i1> %f, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, <4 x i32> zeroinitializer
53 define <4 x i32> @test6(<4 x float> %a, <4 x float> %b, <4 x i32> %c) {
54 %f = fcmp ult <4 x float> %a, %b
55 %r = select <4 x i1> %f, <4 x i32> zeroinitializer, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
62 define <4 x i32> @test7(<4 x float> %a, <4 x float> %b, <4 x i32>* %p) {
63 %f = fcmp ult <4 x float> %a, %b
64 %s = sext <4 x i1> %f to <4 x i32>
65 %l = load <4 x i32>, <4 x i32>* %p
66 %r = and <4 x i32> %l, %s