1 ; The loop sinker was running from the bottom of the loop to the top, causing
2 ; it to miss opportunities to sink instructions that depended on sinking other
3 ; instructions from the loop. Instead they got hoisted, which is better than
4 ; leaving them in the loop, but increases register pressure pointlessly.
6 ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 getelementptr | grep Out:
8 %Ty = type { int, int }
9 %X = external global %Ty
14 %dead = getelementptr %Ty* %X, long 0, ubyte 0
15 %sunk2 = load int* %dead
16 br bool false, label %Loop, label %Out