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