diff options
author | Marcello Maggioni <hayarms@gmail.com> | 2014-10-14 01:58:26 +0000 |
---|---|---|
committer | Marcello Maggioni <hayarms@gmail.com> | 2014-10-14 01:58:26 +0000 |
commit | 5bbe3df63f4788b42ead0344d431ecd9656d7ced (patch) | |
tree | f21c06072b1488f3df844eeb07fe8c14ae4dd86b /llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll | |
parent | 4121bce3f6bcedbcc987c2aa34df3461cb201930 (diff) | |
download | bcm5719-llvm-5bbe3df63f4788b42ead0344d431ecd9656d7ced.tar.gz bcm5719-llvm-5bbe3df63f4788b42ead0344d431ecd9656d7ced.zip |
Switch to select optimization for two-case switches
This is the same optimization of r219233 with modifications to support PHIs with multiple incoming edges from the same block
and a test to check that this condition is handled.
llvm-svn: 219656
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll')
-rw-r--r-- | llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll b/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll index fc987464869..21428c62f53 100644 --- a/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll +++ b/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll @@ -47,7 +47,7 @@ T: } ; PR9450 -define i32 @test4(i32 %v) { +define i32 @test4(i32 %v, i32 %w) { ; CHECK: entry: ; CHECK-NEXT: switch i32 %v, label %T [ ; CHECK-NEXT: i32 3, label %V @@ -67,7 +67,7 @@ SWITCH: default: unreachable U: - ret i32 1 + ret i32 %w T: ret i32 2 } |