mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 09:54:09 +00:00
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
This commit is contained in:
parent
1632e882f1
commit
f289911a6c
@ -1,5 +1,7 @@
|
||||
%AConst = constant int 123
|
||||
|
||||
%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
|
||||
|
||||
implementation
|
||||
|
||||
; Test setting values of different constants in registers.
|
||||
@ -193,3 +195,13 @@ begin
|
||||
|
||||
ret void
|
||||
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
|
||||
|
@ -1,5 +1,7 @@
|
||||
%AConst = constant int 123
|
||||
|
||||
%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
|
||||
|
||||
implementation
|
||||
|
||||
; Test setting values of different constants in registers.
|
||||
@ -193,3 +195,13 @@ begin
|
||||
|
||||
ret void
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user