From bc03f70a0710883f9417fc4701d395ce40defa36 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 29 Dec 2007 00:57:06 +0000 Subject: [PATCH] upgrade this test llvm-svn: 45391 --- llvm/test/Transforms/InstCombine/deadcode.ll | 23 ++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/llvm/test/Transforms/InstCombine/deadcode.ll b/llvm/test/Transforms/InstCombine/deadcode.ll index 370390a834cb..6ff5ae8e3407 100644 --- a/llvm/test/Transforms/InstCombine/deadcode.ll +++ b/llvm/test/Transforms/InstCombine/deadcode.ll @@ -1,13 +1,14 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \ -; RUN: grep {ret i32 %A} +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 %A} -int %test(int %A) { - %X = or bool false, false - br bool %X, label %T, label %C -T: - %B = add int %A, 1 - br label %C -C: - %C = phi int [%B, %T], [%A, %0] - ret int %C +define i32 @test(i32 %A) { + %X = or i1 false, false + br i1 %X, label %T, label %C + +T: ; preds = %0 + %B = add i32 %A, 1 + br label %C + +C: ; preds = %T, %0 + %C.upgrd.1 = phi i32 [ %B, %T ], [ %A, %0 ] + ret i32 %C.upgrd.1 }