Skip to content

Commit

Permalink
This isn't really an assembler test. This tests to make sure the
Browse files Browse the repository at this point in the history
ConstantExpr::getGetElementPtr method folds two getelementptr instructions
when possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10758 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Jan 11, 2004
1 parent 92fa44c commit c9f75b5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/Assembler/2004-01-11-getelementptrfolding.llx
Original file line number Diff line number Diff line change
@@ -0,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
}

0 comments on commit c9f75b5

Please sign in to comment.