diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-04-14 05:09:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-04-14 05:09:53 +0000 |
| commit | 1c4ecc0c739997c9a1ba863d16a9ccedb7592bcd (patch) | |
| tree | 851e93d2144919a1ee0543fc5974adb23672c648 /llvm | |
| parent | 326ff4eb93e9164d660ac075914ef16bbcb7f35b (diff) | |
| download | bcm5719-llvm-1c4ecc0c739997c9a1ba863d16a9ccedb7592bcd.tar.gz bcm5719-llvm-1c4ecc0c739997c9a1ba863d16a9ccedb7592bcd.zip | |
new testcase, vector operations should be CSE'd
llvm-svn: 27690
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/Regression/Transforms/GCSE/vectorops.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/GCSE/vectorops.ll b/llvm/test/Regression/Transforms/GCSE/vectorops.ll new file mode 100644 index 00000000000..41789605445 --- /dev/null +++ b/llvm/test/Regression/Transforms/GCSE/vectorops.ll @@ -0,0 +1,26 @@ +; RUN: llvm-as < %s | opt -gcse -instcombine -disable-output && +; RUN: llvm-as < %s | opt -gcse -instcombine | llvm-dis | not grep sub + +uint %test_extractelement(<4 x uint> %V) { + %R = extractelement <4 x uint> %V, uint 1 + %R2 = extractelement <4 x uint> %V, uint 1 + %V = sub uint %R, %R2 + ret uint %V +} + +<4 x uint> %test_insertelement(<4 x uint> %V) { + %R = insertelement <4 x uint> %V, uint 0, uint 0 + %R2 = insertelement <4 x uint> %V, uint 0, uint 0 + %x = sub <4 x uint> %R, %R2 + ret <4 x uint> %x +} + +<4 x uint> %test_shufflevector(<4 x uint> %V) { + %R = shufflevector <4 x uint> %V, <4 x uint> %V, + <4 x uint> < uint 1, uint undef, uint 7, uint 2> + %R2 = shufflevector <4 x uint> %V, <4 x uint> %V, + <4 x uint> < uint 1, uint undef, uint 7, uint 2> + %x = sub <4 x uint> %R, %R2 + ret <4 x uint> %x +} + |

