define i32 @NextRootMove(i32 %wtm) {
entry:
+ %A = alloca i32*
%tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
+ store i32* %tmp17618, i32** %A
; CHECK: entry:
+; CHECK-NEXT: alloca i32
; CHECK-NEXT: %tmp17618 = load
; CHECK-NOT: load
; CHECK-NOT: phi
cond_true128:
%tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
+ store i32* %tmp17625, i32** %A
br i1 false, label %bb98.backedge, label %return.loopexit
bb98.backedge:
cond_true145:
%tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4
+ store i32* %tmp17631, i32** %A
br i1 false, label %bb98.backedge, label %return.loopexit
return.loopexit:
define i8 @func_1() nounwind {
entry:
+ %A = alloca i8
br i1 false, label %ifelse, label %ifthen
ifthen: ; preds = %entry
ifelse: ; preds = %entry
%tmp3 = load i8* @g_3 ; <i8> [#uses=0]
+ store i8 %tmp3, i8* %A
br label %forcond.thread
forcond.thread: ; preds = %ifelse
+++ /dev/null
-; RUN: opt < %s -basicaa -gvn -S | not grep DEADLOAD
-; RUN: opt < %s -basicaa -gvn -S | not grep DEADGEP
-
-define i32 @main(i32** %p) {
-block1:
- %z1 = load i32** %p
- %z2 = getelementptr i32* %z1, i32 0
- %z3 = load i32* %z2
- %DEADLOAD = load i32** %p
- %DEADGEP = getelementptr i32* %DEADLOAD, i32 0
- %DEADLOAD2 = load i32* %DEADGEP
- ret i32 %DEADLOAD2
-}
define i32 @chained_load(i32** %p) {
block1:
+ %A = alloca i32*
+
%z = load i32** %p
- br i1 true, label %block2, label %block3
+ store i32* %z, i32** %A
+ br i1 true, label %block2, label %block3
block2:
%a = load i32** %p