diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-07 01:07:55 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-07 01:07:55 +0000 |
| commit | be1bb0f8b164e2a3b87348ecb35c0a07b2c94476 (patch) | |
| tree | 30e7616fc4a1862eab5dc320aa2d365e5259fdc6 /llvm/test/CodeGen | |
| parent | 5503c31ff9c1f9887e72942a5b680f7e76394ed2 (diff) | |
| download | bcm5719-llvm-be1bb0f8b164e2a3b87348ecb35c0a07b2c94476.tar.gz bcm5719-llvm-be1bb0f8b164e2a3b87348ecb35c0a07b2c94476.zip | |
PR3628: Add patterns to match SHL/SRL/SRA to the corresponding Altivec
instructions.
llvm-svn: 73009
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/vec_shift.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/vec_shift.ll b/llvm/test/CodeGen/PowerPC/vec_shift.ll new file mode 100644 index 00000000000..0cc699cee42 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/vec_shift.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 +; PR3628 + +define void @update(<4 x i32> %val, <4 x i32>* %dst) nounwind { +entry: + %shl = shl <4 x i32> %val, < i32 4, i32 3, i32 2, i32 1 > + %shr = ashr <4 x i32> %shl, < i32 1, i32 2, i32 3, i32 4 > + store <4 x i32> %shr, <4 x i32>* %dst + ret void +} |

