1 ; RUN: llc < %s -march=x86 -mcpu=yonah -promote-elements -mattr=+sse2,-sse41 | FileCheck %s 2 3 4 ; currently (xor v4i32) is defined as illegal, so we scalarize the code. 5 6 define void@vsel_float(<4 x float>* %v1, <4 x float>* %v2) { 7 %A = load <4 x float>* %v1 8 %B = load <4 x float>* %v2 9 %vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x float> %A, <4 x float> %B 10 store <4 x float > %vsel, <4 x float>* %v1 11 ret void 12 } 13 14 ; currently (xor v4i32) is defined as illegal, so we scalarize the code. 15 16 define void@vsel_i32(<4 x i32>* %v1, <4 x i32>* %v2) { 17 %A = load <4 x i32>* %v1 18 %B = load <4 x i32>* %v2 19 %vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x i32> %A, <4 x i32> %B 20 store <4 x i32 > %vsel, <4 x i32>* %v1 21 ret void 22 } 23 24 ; CHECK: vsel_i64 25 ; CHECK: pxor 26 ; CHECK: pand 27 ; CHECK: andnps 28 ; CHECK: orps 29 ; CHECK: ret 30 31 define void@vsel_i64(<4 x i64>* %v1, <4 x i64>* %v2) { 32 %A = load <4 x i64>* %v1 33 %B = load <4 x i64>* %v2 34 %vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x i64> %A, <4 x i64> %B 35 store <4 x i64 > %vsel, <4 x i64>* %v1 36 ret void 37 } 38 39 ; CHECK: vsel_double 40 ; CHECK: pxor 41 ; CHECK: pand 42 ; CHECK: andnps 43 ; CHECK: orps 44 ; CHECK: ret 45 46 47 define void@vsel_double(<4 x double>* %v1, <4 x double>* %v2) { 48 %A = load <4 x double>* %v1 49 %B = load <4 x double>* %v2 50 %vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x double> %A, <4 x double> %B 51 store <4 x double > %vsel, <4 x double>* %v1 52 ret void 53 } 54 55 56