mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Check in old tests
llvm-svn: 6408
This commit is contained in:
parent
4f88ea97ba
commit
7e476cae1e
18
test/Regression/Transforms/DSAnalysis/fieldmerge.ll
Normal file
18
test/Regression/Transforms/DSAnalysis/fieldmerge.ll
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
%str = type { int*, int* }
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
void %bar(%str* %S, bool %C) {
|
||||||
|
br bool %C, label %T, label %F
|
||||||
|
T:
|
||||||
|
%A = getelementptr %str* %S, long 0, ubyte 0
|
||||||
|
br label %Out
|
||||||
|
F:
|
||||||
|
%B = getelementptr %str* %S, long 0, ubyte 1
|
||||||
|
br label %Out
|
||||||
|
Out:
|
||||||
|
%P = phi int** [%A, %T], [%B, %F]
|
||||||
|
store int* null, int** %P
|
||||||
|
ret void
|
||||||
|
}
|
18
test/Regression/Transforms/DSAnalysis/structpadding.ll
Normal file
18
test/Regression/Transforms/DSAnalysis/structpadding.ll
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
%str = type { int, int* }
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
void %bar(%str* %S, %str* %T) {
|
||||||
|
%A1 = getelementptr %str* %S, long 0, ubyte 0
|
||||||
|
%B1 = getelementptr %str* %S, long 0, ubyte 1
|
||||||
|
%A2 = getelementptr %str* %S, long 0, ubyte 0
|
||||||
|
%B2 = getelementptr %str* %S, long 0, ubyte 1
|
||||||
|
%a1 = cast int* %A1 to long*
|
||||||
|
%a2 = cast int* %A2 to long*
|
||||||
|
%V = load long* %a1
|
||||||
|
;store long %V, long* %a2
|
||||||
|
%V2 = load int** %B1
|
||||||
|
store int* %V2, int** %B2
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user