[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
Chris Lattner
lattner at cs.uiuc.edu
Wed Mar 5 16:33:00 PST 2003
Changes in directory llvm/test/Regression/Transforms/InstCombine:
getelementptr.ll updated: 1.7 -> 1.8
---
Log message:
Add testcase for new instcombine xform
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/InstCombine/getelementptr.ll
diff -u llvm/test/Regression/Transforms/InstCombine/getelementptr.ll:1.7 llvm/test/Regression/Transforms/InstCombine/getelementptr.ll:1.8
--- llvm/test/Regression/Transforms/InstCombine/getelementptr.ll:1.7 Mon Nov 4 10:35:14 2002
+++ llvm/test/Regression/Transforms/InstCombine/getelementptr.ll Wed Mar 5 16:32:48 2003
@@ -1,6 +1,6 @@
; The %A getelementptr instruction should be eliminated here
-; RUN: if as < %s | opt -instcombine -die | dis | grep getelementptr | grep '%A'
+; RUN: if as < %s | opt -instcombine -die | dis | grep getelementptr | grep '%A '
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
@@ -9,7 +9,7 @@
implementation
-int *"foo1"(int * %I) { ; Test noop elimination
+int *%foo1(int* %I) { ; Test noop elimination
%A = getelementptr int* %I, long 0
ret int * %A
}
@@ -40,5 +40,11 @@
%M = malloc [4 x int]
%A = getelementptr [4 x int]* %M, long 0, long 0
%B = getelementptr int* %A, long 2
+ ret int* %B
+}
+
+int* %foo7(int* %I, long %C, long %D) {
+ %A = getelementptr int* %I, long %C
+ %B = getelementptr int* %A, long %D
ret int* %B
}
More information about the llvm-commits
mailing list