[llvm-commits] CVS: llvm/test/Regression/Assembler/2004-01-11-getelementptrfolding.llx

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 11 17:57:14 PST 2004


Changes in directory llvm/test/Regression/Assembler:

2004-01-11-getelementptrfolding.llx added (r1.1)

---
Log message:

This isn't really an assembler test.  This tests to make sure the 
ConstantExpr::getGetElementPtr method folds two getelementptr instructions 
when possible.


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

Index: llvm/test/Regression/Assembler/2004-01-11-getelementptrfolding.llx
diff -c /dev/null llvm/test/Regression/Assembler/2004-01-11-getelementptrfolding.llx:1.1
*** /dev/null	Sun Jan 11 17:56:13 2004
--- llvm/test/Regression/Assembler/2004-01-11-getelementptrfolding.llx	Sun Jan 11 17:56:03 2004
***************
*** 0 ****
--- 1,11 ----
+ ; RUN: llvm-as < %s | llvm-dis | not grep 'getelementptr.*getelementptr'
+ 
+         %struct.TUVVertex = type { short, short, short, short }
+         %struct.TTriangleItem = type { sbyte*, sbyte*, [3 x %struct.TUVVertex] }
+ 
+ %data_triangleItems = internal constant [2908 x %struct.TTriangleItem] zeroinitializer          
+ 
+ void %foo() {
+         store short 0, short* getelementptr ([3 x %struct.TUVVertex]* getelementptr ([2908 x %struct.TTriangleItem]* %data_triangleItems, long 0, long 0, ubyte 2), long 0, long 0, ubyte 0)
+ 	ret void
+ }





More information about the llvm-commits mailing list