Home | History | Annotate | Download | only in GVN
      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         %A = alloca i32*
      8 	%tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
      9         store i32* %tmp17618, i32** %A
     10 ; CHECK: entry:
     11 ; CHECK-NEXT: alloca i32
     12 ; CHECK-NEXT: %tmp17618 = load
     13 ; CHECK-NOT: load
     14 ; CHECK-NOT: phi
     15 	br label %cond_true116
     16 
     17 cond_true116:
     18 	br i1 false, label %cond_true128, label %cond_true145
     19 
     20 cond_true128:
     21 	%tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
     22         store i32* %tmp17625, i32** %A
     23 	br i1 false, label %bb98.backedge, label %return.loopexit
     24 
     25 bb98.backedge:
     26 	br label %cond_true116
     27 
     28 cond_true145:
     29 	%tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
     30         store i32* %tmp17631, i32** %A
     31 	br i1 false, label %bb98.backedge, label %return.loopexit
     32 
     33 return.loopexit:
     34 	br label %return
     35 
     36 return:
     37 	ret i32 0
     38 }
     39