mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
This isn't really an assembler test. This tests to make sure the
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
This commit is contained in:
parent
92fa44c1cf
commit
c9f75b5700
11
test/Assembler/2004-01-11-getelementptrfolding.llx
Normal file
11
test/Assembler/2004-01-11-getelementptrfolding.llx
Normal file
@ -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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user