summaryrefslogtreecommitdiff
path: root/test/Transforms/ConstProp/basictest.ll
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-03-01 09:15:35 +0000
committerTanya Lattner <tonic@nondot.org>2008-03-01 09:15:35 +0000
commitec9a35a6f9143cfa325e0413cc297c48f627973a (patch)
treec1b0621415acc20f94152c51174d53fae3dbc8cc /test/Transforms/ConstProp/basictest.ll
parentab3b77834c9232e4c13acb29afe1920b97c5a20b (diff)
downloadllvm-ec9a35a6f9143cfa325e0413cc297c48f627973a.tar.gz
llvm-ec9a35a6f9143cfa325e0413cc297c48f627973a.tar.bz2
llvm-ec9a35a6f9143cfa325e0413cc297c48f627973a.tar.xz
Remove llvm-upgrade and update test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ConstProp/basictest.ll')
-rw-r--r--test/Transforms/ConstProp/basictest.ll26
1 files changed, 15 insertions, 11 deletions
diff --git a/test/Transforms/ConstProp/basictest.ll b/test/Transforms/ConstProp/basictest.ll
index 178467d83e..56892d9318 100644
--- a/test/Transforms/ConstProp/basictest.ll
+++ b/test/Transforms/ConstProp/basictest.ll
@@ -1,16 +1,20 @@
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep add
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep add
-int %test(bool %B) {
- br bool %B, label %BB1, label %BB2
-BB1:
- %Val = add int 0, 0
- br label %BB3
-BB2:
- br label %BB3
-BB3:
- %Ret = phi int [%Val, %BB1], [1, %BB2]
- ret int %Ret
+define i32 @test(i1 %B) {
+ br i1 %B, label %BB1, label %BB2
+
+BB1: ; preds = %0
+ %Val = add i32 0, 0 ; <i32> [#uses=1]
+ br label %BB3
+
+BB2: ; preds = %0
+ br label %BB3
+
+BB3: ; preds = %BB2, %BB1
+ %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] ; <i32> [#uses=1]
+ ret i32 %Ret
}
+