diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-19 04:45:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-19 04:45:11 +0000 |
commit | 00e2c94788596d4a62fdd8a9a1500fa34c231e57 (patch) | |
tree | ff2d7e25c4b6a3b7215fd40ba07ada3ddf12a8a9 /test/CodeGen/Generic | |
parent | 0a7bff01d0117f1c73f96fed842f6b31a4f71b4f (diff) | |
download | external_llvm-00e2c94788596d4a62fdd8a9a1500fa34c231e57.zip external_llvm-00e2c94788596d4a62fdd8a9a1500fa34c231e57.tar.gz external_llvm-00e2c94788596d4a62fdd8a9a1500fa34c231e57.tar.bz2 |
add another testcase, explicitly check stuff works with G5 and G3 codegen on
PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r-- | test/CodeGen/Generic/vector.ll | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/CodeGen/Generic/vector.ll b/test/CodeGen/Generic/vector.ll index 92ded5f..a015e6f 100644 --- a/test/CodeGen/Generic/vector.ll +++ b/test/CodeGen/Generic/vector.ll @@ -1,5 +1,7 @@ -; RUN: llvm-as < %s | llc ; Test that vectors are scalarized/lowered correctly. +; RUN: llvm-as < %s | llc && +; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 && +; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 %f1 = type <1 x float> %f2 = type <2 x float> @@ -76,3 +78,17 @@ void %test_variable_buildvector(float %F, %f4 *%S) { store %f4 %R, %f4 *%S ret void } + +;;; TEST IMPORTANT IDIOMS + +void %splat(%f4* %P, %f4* %Q, float %X) { + %tmp = insertelement %f4 undef, float %X, uint 0 + %tmp2 = insertelement %f4 %tmp, float %X, uint 1 + %tmp4 = insertelement %f4 %tmp2, float %X, uint 2 + %tmp6 = insertelement %f4 %tmp4, float %X, uint 3 + %q = load %f4* %Q + %R = add %f4 %q, %tmp6 + store %f4 %R, %f4* %P + ret void +} + |