Add a test for folding a GEP into a load.

llvm-svn: 4139
This commit is contained in:
Vikram S. Adve 2002-10-13 00:44:00 +00:00
parent 9e5eb46362
commit 31dbda2a1c
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,7 @@
%AConst = constant int 123 %AConst = constant int 123
%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
implementation implementation
; Test setting values of different constants in registers. ; Test setting values of different constants in registers.
@ -193,3 +195,13 @@ begin
ret void ret void
end end
; Test case for folding getelementptr into a load/store
;
int "checkFoldGEP"(%Domain* %D, long %idx)
begin
%reg841 = getelementptr %Domain* %D, long 0, ubyte 2, long %idx
%reg820 = load int* %reg841
ret int %reg820
end