[llvm-commits] CVS: llvm/test/Regression/Transforms/GCSE/vectorops.ll
Chris Lattner
lattner at cs.uiuc.edu
Thu Apr 13 22:10:05 PDT 2006
Changes in directory llvm/test/Regression/Transforms/GCSE:
vectorops.ll added (r1.1)
---
Log message:
new testcase, vector operations should be CSE'd
---
Diffs of the changes: (+26 -0)
vectorops.ll | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+)
Index: llvm/test/Regression/Transforms/GCSE/vectorops.ll
diff -c /dev/null llvm/test/Regression/Transforms/GCSE/vectorops.ll:1.1
*** /dev/null Fri Apr 14 00:10:03 2006
--- llvm/test/Regression/Transforms/GCSE/vectorops.ll Fri Apr 14 00:09:53 2006
***************
*** 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
+ }
+
More information about the llvm-commits
mailing list