diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-07-20 00:27:56 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-07-20 00:27:56 +0000 |
commit | a135c5230b13504c06478d4ecfc1267cd733b35c (patch) | |
tree | 169c0342bfe82147e5f6e6adc9abba8c7473d139 /test | |
parent | 51a49b275b7bcd492ba92f90a9a9e46ed36bef9f (diff) | |
download | external_llvm-a135c5230b13504c06478d4ecfc1267cd733b35c.zip external_llvm-a135c5230b13504c06478d4ecfc1267cd733b35c.tar.gz external_llvm-a135c5230b13504c06478d4ecfc1267cd733b35c.tar.bz2 |
New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/vec_logical.ll | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_logical.ll b/test/CodeGen/X86/vec_logical.ll new file mode 100644 index 0000000..3aac23a --- /dev/null +++ b/test/CodeGen/X86/vec_logical.ll @@ -0,0 +1,42 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 2 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep andnps +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | wc -l | grep 2 + +define void @t(<4 x float> %A) { + %tmp1277 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %A + store <4 x float> %tmp1277, <4 x float>* null + ret void +} + +define <4 x float> @t1(<4 x float> %a, <4 x float> %b) { +entry: + %tmp9 = bitcast <4 x float> %a to <4 x i32> ; <<4 x i32>> [#uses=1] + %tmp10 = bitcast <4 x float> %b to <4 x i32> ; <<4 x i32>> [#uses=1] + %tmp11 = xor <4 x i32> %tmp9, %tmp10 ; <<4 x i32>> [#uses=1] + %tmp13 = bitcast <4 x i32> %tmp11 to <4 x float> ; <<4 x float>> [#uses=1] + ret <4 x float> %tmp13 +} + +define <2 x double> @t2(<2 x double> %a, <2 x double> %b) { +entry: + %tmp9 = bitcast <2 x double> %a to <2 x i64> ; <<2 x i64>> [#uses=1] + %tmp10 = bitcast <2 x double> %b to <2 x i64> ; <<2 x i64>> [#uses=1] + %tmp11 = and <2 x i64> %tmp9, %tmp10 ; <<2 x i64>> [#uses=1] + %tmp13 = bitcast <2 x i64> %tmp11 to <2 x double> ; <<2 x double>> [#uses=1] + ret <2 x double> %tmp13 +} + +define void @t3(<4 x float> %a, <4 x float> %b, <4 x float>* %c, <4 x float>* %d) { +entry: + %tmp3 = load <4 x float>* %c ; <<4 x float>> [#uses=1] + %tmp11 = bitcast <4 x float> %a to <4 x i32> ; <<4 x i32>> [#uses=1] + %tmp12 = bitcast <4 x float> %b to <4 x i32> ; <<4 x i32>> [#uses=1] + %tmp13 = xor <4 x i32> %tmp11, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <<4 x i32>> [#uses=1] + %tmp14 = and <4 x i32> %tmp12, %tmp13 ; <<4 x i32>> [#uses=1] + %tmp27 = bitcast <4 x float> %tmp3 to <4 x i32> ; <<4 x i32>> [#uses=1] + %tmp28 = or <4 x i32> %tmp14, %tmp27 ; <<4 x i32>> [#uses=1] + %tmp30 = bitcast <4 x i32> %tmp28 to <4 x float> ; <<4 x float>> [#uses=1] + store <4 x float> %tmp30, <4 x float>* %d + ret void +} |