mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
New testcase
llvm-svn: 10533
This commit is contained in:
parent
b37f2a0c5e
commit
94c7fcf93b
19
test/Regression/Transforms/LICM/sink_multiple.ll
Normal file
19
test/Regression/Transforms/LICM/sink_multiple.ll
Normal file
@ -0,0 +1,19 @@
|
||||
; The loop sinker was running from the bottom of the loop to the top, causing
|
||||
; it to miss opportunities to sink instructions that depended on sinking other
|
||||
; instructions from the loop. Instead they got hoisted, which is better than
|
||||
; leaving them in the loop, but increases register pressure pointlessly.
|
||||
|
||||
; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 getelementptr | grep Out:
|
||||
|
||||
%Ty = type { int, int }
|
||||
%X = external global %Ty
|
||||
|
||||
int %test() {
|
||||
br label %Loop
|
||||
Loop:
|
||||
%dead = getelementptr %Ty* %X, long 0, ubyte 0
|
||||
%sunk2 = load int* %dead
|
||||
br bool false, label %Loop, label %Out
|
||||
Out:
|
||||
ret int %sunk2
|
||||
}
|
Loading…
Reference in New Issue
Block a user