diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-07-23 00:22:17 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-07-23 00:22:17 +0000 |
commit | 5e6ebaf4d1d3043d3428b65ee8054c71c24af930 (patch) | |
tree | e0f2b1537a7ef8a61b937e0b3fccd8f2d0b48b26 /test | |
parent | 11e56cb4dc73bbb0bdc083042657ea3a5aad63f2 (diff) | |
download | llvm-5e6ebaf4d1d3043d3428b65ee8054c71c24af930.tar.gz llvm-5e6ebaf4d1d3043d3428b65ee8054c71c24af930.tar.bz2 llvm-5e6ebaf4d1d3043d3428b65ee8054c71c24af930.tar.xz |
Fix PR2485: do all 4-element SSE shuffles in max. of 2 shuffle instructions.
Based on patch by Nicolas Capens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/vec_insert-2.ll | 5 | ||||
-rw-r--r-- | test/CodeGen/X86/vec_insert-6.ll | 3 | ||||
-rw-r--r-- | test/CodeGen/X86/vec_shuffle-19.ll | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/test/CodeGen/X86/vec_insert-2.ll b/test/CodeGen/X86/vec_insert-2.ll index 8207afe634..a6d4f014d2 100644 --- a/test/CodeGen/X86/vec_insert-2.ll +++ b/test/CodeGen/X86/vec_insert-2.ll @@ -1,6 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {\$132,} | count 2 -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {\$2,} | count 2 -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps | count 4 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {\$36,} | count 2 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps | count 2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | count 1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhpd | count 1 ; RUN: llvm-as < %s | llc -march=x86-64 -mattr=+sse2 | grep unpcklpd | count 1 diff --git a/test/CodeGen/X86/vec_insert-6.ll b/test/CodeGen/X86/vec_insert-6.ll index 405152e2dc..865a6f009a 100644 --- a/test/CodeGen/X86/vec_insert-6.ll +++ b/test/CodeGen/X86/vec_insert-6.ll @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep pslldq +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pslldq +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats -info-output-file - | grep asm-printer | grep 6 define <4 x float> @t3(<4 x float>* %P) nounwind { %tmp1 = load <4 x float>* %P diff --git a/test/CodeGen/X86/vec_shuffle-19.ll b/test/CodeGen/X86/vec_shuffle-19.ll new file mode 100644 index 0000000000..eeeab81362 --- /dev/null +++ b/test/CodeGen/X86/vec_shuffle-19.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats -info-output-file - | grep asm-printer | grep 4 +; PR2485 + +define <4 x i32> @t(<4 x i32> %a, <4 x i32> %b) nounwind { +entry: + %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> < i32 4, i32 0, i32 0, i32 0 > ; <<4 x i32>> [#uses=1] + ret <4 x i32> %shuffle +} |