diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-03-18 03:45:45 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-03-18 03:45:45 +0000 |
commit | f04d8d1593d0eedf5b9deaab48462dd88fefab93 (patch) | |
tree | 0cbf561bbe8c905283770e5ae2317f5f7367512c /test/Transforms/SimplifyCFG/branch-phi-thread.ll | |
parent | e856685710706e580a3ece2c59ced2cdf0719f55 (diff) | |
download | external_llvm-f04d8d1593d0eedf5b9deaab48462dd88fefab93.zip external_llvm-f04d8d1593d0eedf5b9deaab48462dd88fefab93.tar.gz external_llvm-f04d8d1593d0eedf5b9deaab48462dd88fefab93.tar.bz2 |
Upgrade tests to not use llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG/branch-phi-thread.ll')
-rw-r--r-- | test/Transforms/SimplifyCFG/branch-phi-thread.ll | 105 |
1 files changed, 53 insertions, 52 deletions
diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll index e370978..abad19c 100644 --- a/test/Transforms/SimplifyCFG/branch-phi-thread.ll +++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll @@ -1,65 +1,66 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce | llvm-dis | \ +; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | \ ; RUN: not grep {call void %f1} ; END. -declare void %f1() -declare void %f2() -declare void %f3() -declare void %f4() +declare void @f1() -implementation +declare void @f2() -int %test1(int %X, bool %D) { +declare void @f3() + +declare void @f4() + +define i32 @test1(i32 %X, i1 %D) { E: - %C = seteq int %X, 0 - br bool %C, label %T, label %F -T: - br bool %C, label %B, label %A -A: - call void %f1() - br bool %D, label %T, label %F -B: - call void %f2() - ret int 345 -F: - call void %f3() - ret int 123 + %C = icmp eq i32 %X, 0 ; <i1> [#uses=2] + br i1 %C, label %T, label %F +T: ; preds = %A, %E + br i1 %C, label %B, label %A +A: ; preds = %T + call void @f1( ) + br i1 %D, label %T, label %F +B: ; preds = %T + call void @f2( ) + ret i32 345 +F: ; preds = %A, %E + call void @f3( ) + ret i32 123 } -int %test2(int %X, bool %D) { +define i32 @test2(i32 %X, i1 %D) { E: - %C = seteq int %X, 0 - br bool %C, label %T, label %F -T: - %P = phi bool [true, %E], [%C, %A] - br bool %P, label %B, label %A -A: - call void %f1() - br bool %D, label %T, label %F -B: - call void %f2() - ret int 345 -F: - call void %f3() - ret int 123 + %C = icmp eq i32 %X, 0 ; <i1> [#uses=2] + br i1 %C, label %T, label %F +T: ; preds = %A, %E + %P = phi i1 [ true, %E ], [ %C, %A ] ; <i1> [#uses=1] + br i1 %P, label %B, label %A +A: ; preds = %T + call void @f1( ) + br i1 %D, label %T, label %F +B: ; preds = %T + call void @f2( ) + ret i32 345 +F: ; preds = %A, %E + call void @f3( ) + ret i32 123 } -int %test3(int %X, bool %D, int* %AP, int* %BP) { +define i32 @test3(i32 %X, i1 %D, i32* %AP, i32* %BP) { E: - %C = seteq int %X, 0 - br bool %C, label %T, label %F -T: - call void %f3() ;; Inst in block. - %XX = load int* %AP - store int %XX, int* %BP - br bool %C, label %B, label %A -A: - call void %f1() - br bool %D, label %T, label %F -B: - call void %f2() - ret int 345 -F: - call void %f3() - ret int 123 + %C = icmp eq i32 %X, 0 ; <i1> [#uses=2] + br i1 %C, label %T, label %F +T: ; preds = %A, %E + call void @f3( ) + %XX = load i32* %AP ; <i32> [#uses=1] + store i32 %XX, i32* %BP + br i1 %C, label %B, label %A +A: ; preds = %T + call void @f1( ) + br i1 %D, label %T, label %F +B: ; preds = %T + call void @f2( ) + ret i32 345 +F: ; preds = %A, %E + call void @f3( ) + ret i32 123 } |