diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-07-02 15:09:44 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-07-02 15:09:44 +0000 |
| commit | e739cf3eb59aeb67b0609136fb8e3556a64c0e9b (patch) | |
| tree | c4a5e1faabd35a3a9bc7dcc8f35f2ec0ff2e527b /llvm/test/CodeGen/X86/vector-shuffle-combining.ll | |
| parent | 742790cd9f682a7e739f62bdaac00c4151249e20 (diff) | |
| download | bcm5719-llvm-e739cf3eb59aeb67b0609136fb8e3556a64c0e9b.tar.gz bcm5719-llvm-e739cf3eb59aeb67b0609136fb8e3556a64c0e9b.zip | |
X86: When combining shuffles just remove shuffles that are completely redundant.
CombineTo doesn't allow replacing a node with itself so this would crash if the
combined shuffle is the same as the input shuffle.
llvm-svn: 212181
Diffstat (limited to 'llvm/test/CodeGen/X86/vector-shuffle-combining.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/vector-shuffle-combining.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-combining.ll b/llvm/test/CodeGen/X86/vector-shuffle-combining.ll index 1bc2aee6efe..e60ecb70dec 100644 --- a/llvm/test/CodeGen/X86/vector-shuffle-combining.ll +++ b/llvm/test/CodeGen/X86/vector-shuffle-combining.ll @@ -66,6 +66,16 @@ define <4 x i32> @combine_pshufd5(<4 x i32> %a) { ret <4 x i32> %d } +define <4 x i32> @combine_pshufd6(<4 x i32> %a) { +; CHECK-SSE2-LABEL: @combine_pshufd6 +; CHECK-SSE2: # BB#0: +; CHECK-SSE2-NEXT: pshufd $0 +; CHECK-SSE2-NEXT: retq + %b = call <4 x i32> @llvm.x86.sse2.pshuf.d(<4 x i32> %a, i8 0) + %c = call <4 x i32> @llvm.x86.sse2.pshuf.d(<4 x i32> %b, i8 8) + ret <4 x i32> %c +} + define <8 x i16> @combine_pshuflw1(<8 x i16> %a) { ; CHECK-SSE2-LABEL: @combine_pshuflw1 ; CHECK-SSE2: # BB#0: |

