about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorDjzin <djzin@users.noreply.github.com>2017-11-07 00:07:32 +0000
committerDjzin <djzin@users.noreply.github.com>2017-11-14 06:33:39 +0000
commit829b70330e93779575daa35fc4ddc1dd0df15efa (patch)
tree7a099761e087209ab308405a69ed2dc0b641c62d /src/test/codegen
parent9b53f0a6620c3451a10573ea5c5a51b4c18088ec (diff)
downloadrust-829b70330e93779575daa35fc4ddc1dd0df15efa.tar.gz
rust-829b70330e93779575daa35fc4ddc1dd0df15efa.zip
always add an unreachable branch on matches to give more info to llvm about which values are possible
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/match.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/test/codegen/match.rs b/src/test/codegen/match.rs
index aa100da6013..660b6346c57 100644
--- a/src/test/codegen/match.rs
+++ b/src/test/codegen/match.rs
@@ -21,12 +21,15 @@ pub enum E {
 #[no_mangle]
 pub fn exhaustive_match(e: E) {
 // CHECK: switch{{.*}}, label %[[OTHERWISE:[a-zA-Z0-9_]+]] [
-// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[TRUE:[a-zA-Z0-9_]+]]
+// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[A:[a-zA-Z0-9_]+]]
+// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[B:[a-zA-Z0-9_]+]]
 // CHECK-NEXT: ]
-// CHECK: [[TRUE]]:
+// CHECK: [[A]]:
 // CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]]
-// CHECK: [[OTHERWISE]]:
+// CHECK: [[B]]:
 // CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]]
+// CHECK: [[OTHERWISE]]:
+// CHECK-NEXT: unreachable
     match e {
         E::A => (),
         E::B => (),