2010-11-14 13:30:18 +00:00
|
|
|
; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
|
2007-07-26 18:26:51 +00:00
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
@last = external global [65 x i32*]
|
2007-07-26 18:26:51 +00:00
|
|
|
|
|
|
|
define i32 @NextRootMove(i32 %wtm) {
|
2010-11-14 13:30:18 +00:00
|
|
|
entry:
|
2011-05-22 07:02:43 +00:00
|
|
|
%A = alloca i32*
|
2010-11-14 13:30:18 +00:00
|
|
|
%tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
|
2011-05-22 07:02:43 +00:00
|
|
|
store i32* %tmp17618, i32** %A
|
2010-11-14 13:30:18 +00:00
|
|
|
; CHECK: entry:
|
2011-05-22 07:02:43 +00:00
|
|
|
; CHECK-NEXT: alloca i32
|
2010-11-14 13:30:18 +00:00
|
|
|
; CHECK-NEXT: %tmp17618 = load
|
|
|
|
; CHECK-NOT: load
|
|
|
|
; CHECK-NOT: phi
|
2007-07-26 18:26:51 +00:00
|
|
|
br label %cond_true116
|
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
cond_true116:
|
2007-07-26 18:26:51 +00:00
|
|
|
br i1 false, label %cond_true128, label %cond_true145
|
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
cond_true128:
|
|
|
|
%tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
|
2011-05-22 07:02:43 +00:00
|
|
|
store i32* %tmp17625, i32** %A
|
2007-07-26 18:26:51 +00:00
|
|
|
br i1 false, label %bb98.backedge, label %return.loopexit
|
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
bb98.backedge:
|
2007-07-26 18:26:51 +00:00
|
|
|
br label %cond_true116
|
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
cond_true145:
|
|
|
|
%tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
|
2011-05-22 07:02:43 +00:00
|
|
|
store i32* %tmp17631, i32** %A
|
2007-07-26 18:26:51 +00:00
|
|
|
br i1 false, label %bb98.backedge, label %return.loopexit
|
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
return.loopexit:
|
2007-07-26 18:26:51 +00:00
|
|
|
br label %return
|
|
|
|
|
2010-11-14 13:30:18 +00:00
|
|
|
return:
|
2007-07-26 18:26:51 +00:00
|
|
|
ret i32 0
|
|
|
|
}
|