[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Feb 21 23:25:01 PST 2004


Changes in directory llvm/test/Regression/Transforms/InstCombine:

cast.ll updated: 1.16 -> 1.17

---
Log message:

Test that the instruction combiner can fold away a cast in a GEP instruction.
This occurs in 164.gzip, as a result of it declaring arrays extern.


---
Diffs of the changes:  (+8 -0)

Index: llvm/test/Regression/Transforms/InstCombine/cast.ll
diff -u llvm/test/Regression/Transforms/InstCombine/cast.ll:1.16 llvm/test/Regression/Transforms/InstCombine/cast.ll:1.17
--- llvm/test/Regression/Transforms/InstCombine/cast.ll:1.16	Sat Nov  1 23:56:58 2003
+++ llvm/test/Regression/Transforms/InstCombine/cast.ll	Sat Feb 21 23:24:09 2004
@@ -2,6 +2,8 @@
 
 ; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep '%c' | not grep cast
 
+%inbuf = external global [32832 x ubyte]
+
 implementation
 
 int %test1(int %A) {
@@ -78,4 +80,10 @@
 	%p = malloc [4 x sbyte]
 	%c = cast [4 x sbyte]* %p to int*
 	ret int* %c
+}
+
+
+ubyte *%test13(long %A) {
+	%c = getelementptr [0 x ubyte]* cast ([32832 x ubyte]*  %inbuf to [0 x ubyte]*), long 0, long %A
+	ret ubyte* %c
 }





More information about the llvm-commits mailing list