-; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | grep '%A = alloca' &&
-; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep '%B = alloca'
+; RUN: opt < %s -instcombine -mem2reg -S | grep "%A = alloca"
+; RUN: opt < %s -instcombine -mem2reg -S | \
+; RUN: not grep "%B = alloca"
+; END.
; Ensure that instcombine doesn't sink the loads in entry/cond_true into
; cond_next. Doing so prevents mem2reg from promoting the B alloca.
%B = alloca i32
%tmp = call i32 (...)* @bar( i32* %A ) ; <i32> [#uses=0]
%T = load i32* %A ; <i32> [#uses=1]
- %tmp = icmp eq i32 %C, 0 ; <i1> [#uses=1]
- br i1 %tmp, label %cond_next, label %cond_true
+ %tmp2 = icmp eq i32 %C, 0 ; <i1> [#uses=1]
+ br i1 %tmp2, label %cond_next, label %cond_true
cond_true: ; preds = %entry
store i32 123, i32* %B