[llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/shift-folding.ll
Chris Lattner
lattner at cs.uiuc.edu
Mon May 9 10:09:44 PDT 2005
Changes in directory llvm/test/Regression/CodeGen/Generic:
shift-folding.ll added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes: (+19 -0)
shift-folding.ll | 19 +++++++++++++++++++
1 files changed, 19 insertions(+)
Index: llvm/test/Regression/CodeGen/Generic/shift-folding.ll
diff -c /dev/null llvm/test/Regression/CodeGen/Generic/shift-folding.ll:1.1
*** /dev/null Mon May 9 12:09:41 2005
--- llvm/test/Regression/CodeGen/Generic/shift-folding.ll Mon May 9 12:09:31 2005
***************
*** 0 ****
--- 1,19 ----
+ ; RUN: llvm-as < %s | llc -march=x86 -enable-pattern-isel=1 | grep 's[ah][rl]l' | wc -l | grep 1
+
+ int* %test1(int *%P, uint %X) {
+ %Y = shr uint %X, ubyte 2
+ %P2 = getelementptr int* %P, uint %Y
+ ret int* %P2
+ }
+
+ int* %test2(int *%P, uint %X) {
+ %Y = shl uint %X, ubyte 2
+ %P2 = getelementptr int* %P, uint %Y
+ ret int* %P2
+ }
+
+ int* %test3(int *%P, int %X) {
+ %Y = shr int %X, ubyte 2
+ %P2 = getelementptr int* %P, int %Y
+ ret int* %P2
+ }
More information about the llvm-commits
mailing list