llvm.org GIT mirror llvm / bb8d661
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10533 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; The loop sinker was running from the bottom of the loop to the top, causing
1 ; it to miss opportunities to sink instructions that depended on sinking other
2 ; instructions from the loop. Instead they got hoisted, which is better than
3 ; leaving them in the loop, but increases register pressure pointlessly.
4
5 ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 getelementptr | grep Out:
6
7 %Ty = type { int, int }
8 %X = external global %Ty
9
10 int %test() {
11 br label %Loop
12 Loop:
13 %dead = getelementptr %Ty* %X, long 0, ubyte 0
14 %sunk2 = load int* %dead
15 br bool false, label %Loop, label %Out
16 Out:
17 ret int %sunk2
18 }