summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-01-26 19:52:32 +0000
committerHans Wennborg <hans@hanshq.net>2015-01-26 19:52:32 +0000
commit6800008f049f4c33ec42acfd7055b82ed38d7559 (patch)
treef4ea36561ff554576e46edb07f6e68edfbb6768a /llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
parent90b827cae2d3b94d8794874cfe01a9d8fbf7c55b (diff)
downloadbcm5719-llvm-6800008f049f4c33ec42acfd7055b82ed38d7559.tar.gz
bcm5719-llvm-6800008f049f4c33ec42acfd7055b82ed38d7559.zip
SimplifyCFG: don't remove unreachable default switch destinations
An unreachable default destination can be exploited by other optimizations and allows for more efficient lowering. Both the SDag switch lowering and LowerSwitch can exploit unreachable defaults. Also make TurnSwitchRangeICmp handle switches with unreachable default. This is kind of separate change, but it cannot be tested without the change above, and I don't want to land the change above without this since that would regress other tests. Differential Revision: http://reviews.llvm.org/D6471 llvm-svn: 227125
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll26
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll b/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
index 21428c62f53..22b144b5cb8 100644
--- a/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
+++ b/llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
@@ -46,32 +46,6 @@ T:
ret i32 2
}
-; PR9450
-define i32 @test4(i32 %v, i32 %w) {
-; CHECK: entry:
-; CHECK-NEXT: switch i32 %v, label %T [
-; CHECK-NEXT: i32 3, label %V
-; CHECK-NEXT: i32 2, label %U
-; CHECK-NEXT: ]
-
-entry:
- br label %SWITCH
-V:
- ret i32 7
-SWITCH:
- switch i32 %v, label %default [
- i32 1, label %T
- i32 2, label %U
- i32 3, label %V
- ]
-default:
- unreachable
-U:
- ret i32 %w
-T:
- ret i32 2
-}
-
;; We can either convert the following control-flow to a select or remove the
;; unreachable control flow because of the undef store of null. Make sure we do
OpenPOWER on IntegriCloud