diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-09 23:50:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-09 23:50:29 +0000 |
commit | 4f21c174aa1ee3b12012079709ab4b48d08587bf (patch) | |
tree | 5bd310c3e8f3c98080b997459d361789347ccfd8 /test | |
parent | 7c4865dfff0cb53c6b2151d1bc3b32e038c2723e (diff) | |
download | external_llvm-4f21c174aa1ee3b12012079709ab4b48d08587bf.zip external_llvm-4f21c174aa1ee3b12012079709ab4b48d08587bf.tar.gz external_llvm-4f21c174aa1ee3b12012079709ab4b48d08587bf.tar.bz2 |
Simplify cfg now eliminates all of the branches in this testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/SimplifyCFG/PhiEliminate2.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/PhiEliminate2.ll b/test/Transforms/SimplifyCFG/PhiEliminate2.ll new file mode 100644 index 0000000..e93d293 --- /dev/null +++ b/test/Transforms/SimplifyCFG/PhiEliminate2.ll @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br + +int %test(bool %C, int %V1, int %V2) { +entry: + br bool %C, label %then, label %Cont + +then: + %V3 = or int %V2, %V1 + br label %Cont +Cont: + %V4 = phi int [%V1, %entry], [%V3, %then] + call int %test(bool false, int 0, int 0) ;; don't fold into preds + ret int %V1 +} + |