Teach InstructionSimplify about phi nodes. I chose to have it simply
[oota-llvm.git] / test / Transforms / GVN / 2007-07-26-InterlockingLoops.ll
1 ; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
2
3 @last = external global [65 x i32*]
4
5 define i32 @NextRootMove(i32 %wtm) {
6 entry:
7         %tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
8 ; CHECK: entry:
9 ; CHECK-NEXT: %tmp17618 = load
10 ; CHECK-NOT: load
11 ; CHECK-NOT: phi
12         br label %cond_true116
13
14 cond_true116:
15         br i1 false, label %cond_true128, label %cond_true145
16
17 cond_true128:
18         %tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
19         br i1 false, label %bb98.backedge, label %return.loopexit
20
21 bb98.backedge:
22         br label %cond_true116
23
24 cond_true145:
25         %tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
26         br i1 false, label %bb98.backedge, label %return.loopexit
27
28 return.loopexit:
29         br label %return
30
31 return:
32         ret i32 0
33 }