llvm.org GIT mirror llvm / f289911
Add a test for folding a GEP into a load. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4139 91177308-0d34-0410-b5e6-96231b3b80d8 Vikram S. Adve 18 years ago
2 changed file(s) with 24 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 %AConst = constant int 123
1
2 %Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
13
24 implementation
35
192194
193195 ret void
194196 end
197
198
199 ; Test case for folding getelementptr into a load/store
200 ;
201 int "checkFoldGEP"(%Domain* %D, long %idx)
202 begin
203 %reg841 = getelementptr %Domain* %D, long 0, ubyte 2, long %idx
204 %reg820 = load int* %reg841
205 ret int %reg820
206 end
0 %AConst = constant int 123
1
2 %Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
13
24 implementation
35
192194
193195 ret void
194196 end
197
198
199 ; Test case for folding getelementptr into a load/store
200 ;
201 int "checkFoldGEP"(%Domain* %D, long %idx)
202 begin
203 %reg841 = getelementptr %Domain* %D, long 0, ubyte 2, long %idx
204 %reg820 = load int* %reg841
205 ret int %reg820
206 end