blob: f8957629f8a1d486f2c8129d2ba0ce24a12862ba [file] [log] [blame]
Dan Gohmanb243c282008-06-10 00:36:41 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
2; RUN: grep xorps %t | count 2
3; RUN: grep andnps %t
4; RUN: grep movaps %t | count 2
Evan Chenga135c522007-07-20 00:27:56 +00005
6define void @t(<4 x float> %A) {
Dan Gohman7ce405e2009-06-04 22:49:04 +00007 %tmp1277 = fsub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %A
Evan Chenga135c522007-07-20 00:27:56 +00008 store <4 x float> %tmp1277, <4 x float>* null
9 ret void
10}
11
12define <4 x float> @t1(<4 x float> %a, <4 x float> %b) {
13entry:
14 %tmp9 = bitcast <4 x float> %a to <4 x i32> ; <<4 x i32>> [#uses=1]
15 %tmp10 = bitcast <4 x float> %b to <4 x i32> ; <<4 x i32>> [#uses=1]
16 %tmp11 = xor <4 x i32> %tmp9, %tmp10 ; <<4 x i32>> [#uses=1]
17 %tmp13 = bitcast <4 x i32> %tmp11 to <4 x float> ; <<4 x float>> [#uses=1]
18 ret <4 x float> %tmp13
19}
20
21define <2 x double> @t2(<2 x double> %a, <2 x double> %b) {
22entry:
23 %tmp9 = bitcast <2 x double> %a to <2 x i64> ; <<2 x i64>> [#uses=1]
24 %tmp10 = bitcast <2 x double> %b to <2 x i64> ; <<2 x i64>> [#uses=1]
25 %tmp11 = and <2 x i64> %tmp9, %tmp10 ; <<2 x i64>> [#uses=1]
26 %tmp13 = bitcast <2 x i64> %tmp11 to <2 x double> ; <<2 x double>> [#uses=1]
27 ret <2 x double> %tmp13
28}
29
30define void @t3(<4 x float> %a, <4 x float> %b, <4 x float>* %c, <4 x float>* %d) {
31entry:
32 %tmp3 = load <4 x float>* %c ; <<4 x float>> [#uses=1]
33 %tmp11 = bitcast <4 x float> %a to <4 x i32> ; <<4 x i32>> [#uses=1]
34 %tmp12 = bitcast <4 x float> %b to <4 x i32> ; <<4 x i32>> [#uses=1]
35 %tmp13 = xor <4 x i32> %tmp11, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1]
36 %tmp14 = and <4 x i32> %tmp12, %tmp13 ; <<4 x i32>> [#uses=1]
37 %tmp27 = bitcast <4 x float> %tmp3 to <4 x i32> ; <<4 x i32>> [#uses=1]
38 %tmp28 = or <4 x i32> %tmp14, %tmp27 ; <<4 x i32>> [#uses=1]
39 %tmp30 = bitcast <4 x i32> %tmp28 to <4 x float> ; <<4 x float>> [#uses=1]
40 store <4 x float> %tmp30, <4 x float>* %d
41 ret void
42}