[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
Chris Lattner
lattner at cs.uiuc.edu
Sat Oct 16 12:44:36 PDT 2004
Changes in directory llvm/test/Regression/Transforms/InstCombine:
getelementptr.ll updated: 1.13 -> 1.14
---
Log message:
New testcase, rework testcases to fail if there are any gep's other than those
involving %B instead of allowing any geps except %A's.
---
Diffs of the changes: (+10 -3)
Index: llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
diff -u llvm/test/Regression/Transforms/InstCombine/getelementptr.ll:1.13 llvm/test/Regression/Transforms/InstCombine/getelementptr.ll:1.14
--- llvm/test/Regression/Transforms/InstCombine/getelementptr.ll:1.13 Fri Feb 27 23:26:06 2004
+++ llvm/test/Regression/Transforms/InstCombine/getelementptr.ll Sat Oct 16 14:44:23 2004
@@ -1,6 +1,6 @@
; The %A getelementptr instruction should be eliminated here
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep getelementptr | not grep '%A '
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v '%B' | not grep getelementptr
%Global = constant [10 x sbyte] c"helloworld"
@@ -27,10 +27,11 @@
ret int* %B
}
-sbyte * %foo5() {
+void %foo5(sbyte %B) {
; This should be turned into a constexpr instead of being an instruction
%A = getelementptr [10 x sbyte]* %Global, long 0, long 4
- ret sbyte* %A
+ store sbyte %B, sbyte* %A
+ ret void
}
int* %foo6() {
@@ -51,3 +52,9 @@
%B = cast int* %A to sbyte*
ret sbyte * %B
}
+
+int %test9() {
+ %A = getelementptr {int, double}* null, int 0, uint 1
+ %B = cast double* %A to int
+ ret int %B
+}
More information about the llvm-commits
mailing list