llvm-6502/test/Transforms/LICM/sink_multiple.ll
Reid Spencer e5d4efa63e Promote GEP ubyte indices to uint. Backwards compatibility for 1.2 and
older features will be dropped soon and these test cases must not rely
on the upgrade capability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31896 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-23 15:14:52 +00:00

20 lines
651 B
LLVM

; 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 | %prcontext getelementptr 1 | grep Out:
%Ty = type { int, int }
%X = external global %Ty
int %test() {
br label %Loop
Loop:
%dead = getelementptr %Ty* %X, long 0, uint 0
%sunk2 = load int* %dead
br bool false, label %Loop, label %Out
Out:
ret int %sunk2
}