about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/early_otherwise_branch.opt5.EarlyOtherwiseBranch.diff77
-rw-r--r--tests/mir-opt/early_otherwise_branch.opt5_failed.EarlyOtherwiseBranch.diff61
-rw-r--r--tests/mir-opt/early_otherwise_branch.opt5_failed_type.EarlyOtherwiseBranch.diff61
-rw-r--r--tests/mir-opt/early_otherwise_branch.rs48
4 files changed, 0 insertions, 247 deletions
diff --git a/tests/mir-opt/early_otherwise_branch.opt5.EarlyOtherwiseBranch.diff b/tests/mir-opt/early_otherwise_branch.opt5.EarlyOtherwiseBranch.diff
deleted file mode 100644
index b7447ef0c46..00000000000
--- a/tests/mir-opt/early_otherwise_branch.opt5.EarlyOtherwiseBranch.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-- // MIR for `opt5` before EarlyOtherwiseBranch
-+ // MIR for `opt5` after EarlyOtherwiseBranch
-  
-  fn opt5(_1: u32, _2: u32) -> u32 {
-      debug x => _1;
-      debug y => _2;
-      let mut _0: u32;
-      let mut _3: (u32, u32);
-      let mut _4: u32;
-      let mut _5: u32;
-+     let mut _6: bool;
-  
-      bb0: {
-          StorageLive(_3);
-          StorageLive(_4);
-          _4 = copy _1;
-          StorageLive(_5);
-          _5 = copy _2;
-          _3 = (move _4, move _5);
-          StorageDead(_5);
-          StorageDead(_4);
--         switchInt(copy (_3.0: u32)) -> [1: bb2, 2: bb3, 3: bb4, otherwise: bb1];
-+         StorageLive(_6);
-+         _6 = Ne(copy (_3.0: u32), copy (_3.1: u32));
-+         switchInt(move _6) -> [0: bb6, otherwise: bb1];
-      }
-  
-      bb1: {
-+         StorageDead(_6);
-          _0 = const 0_u32;
--         goto -> bb8;
-+         goto -> bb5;
-      }
-  
-      bb2: {
--         switchInt(copy (_3.1: u32)) -> [1: bb7, otherwise: bb1];
-+         _0 = const 6_u32;
-+         goto -> bb5;
-      }
-  
-      bb3: {
--         switchInt(copy (_3.1: u32)) -> [2: bb6, otherwise: bb1];
-+         _0 = const 5_u32;
-+         goto -> bb5;
-      }
-  
-      bb4: {
--         switchInt(copy (_3.1: u32)) -> [3: bb5, otherwise: bb1];
-+         _0 = const 4_u32;
-+         goto -> bb5;
-      }
-  
-      bb5: {
--         _0 = const 6_u32;
--         goto -> bb8;
-+         StorageDead(_3);
-+         return;
-      }
-  
-      bb6: {
--         _0 = const 5_u32;
--         goto -> bb8;
--     }
-- 
--     bb7: {
--         _0 = const 4_u32;
--         goto -> bb8;
--     }
-- 
--     bb8: {
--         StorageDead(_3);
--         return;
-+         StorageDead(_6);
-+         switchInt(copy (_3.0: u32)) -> [1: bb4, 2: bb3, 3: bb2, otherwise: bb1];
-      }
-  }
-  
diff --git a/tests/mir-opt/early_otherwise_branch.opt5_failed.EarlyOtherwiseBranch.diff b/tests/mir-opt/early_otherwise_branch.opt5_failed.EarlyOtherwiseBranch.diff
deleted file mode 100644
index af16271f8b1..00000000000
--- a/tests/mir-opt/early_otherwise_branch.opt5_failed.EarlyOtherwiseBranch.diff
+++ /dev/null
@@ -1,61 +0,0 @@
-- // MIR for `opt5_failed` before EarlyOtherwiseBranch
-+ // MIR for `opt5_failed` after EarlyOtherwiseBranch
-  
-  fn opt5_failed(_1: u32, _2: u32) -> u32 {
-      debug x => _1;
-      debug y => _2;
-      let mut _0: u32;
-      let mut _3: (u32, u32);
-      let mut _4: u32;
-      let mut _5: u32;
-  
-      bb0: {
-          StorageLive(_3);
-          StorageLive(_4);
-          _4 = copy _1;
-          StorageLive(_5);
-          _5 = copy _2;
-          _3 = (move _4, move _5);
-          StorageDead(_5);
-          StorageDead(_4);
-          switchInt(copy (_3.0: u32)) -> [1: bb2, 2: bb3, 3: bb4, otherwise: bb1];
-      }
-  
-      bb1: {
-          _0 = const 0_u32;
-          goto -> bb8;
-      }
-  
-      bb2: {
-          switchInt(copy (_3.1: u32)) -> [1: bb7, otherwise: bb1];
-      }
-  
-      bb3: {
-          switchInt(copy (_3.1: u32)) -> [2: bb6, otherwise: bb1];
-      }
-  
-      bb4: {
-          switchInt(copy (_3.1: u32)) -> [2: bb5, otherwise: bb1];
-      }
-  
-      bb5: {
-          _0 = const 6_u32;
-          goto -> bb8;
-      }
-  
-      bb6: {
-          _0 = const 5_u32;
-          goto -> bb8;
-      }
-  
-      bb7: {
-          _0 = const 4_u32;
-          goto -> bb8;
-      }
-  
-      bb8: {
-          StorageDead(_3);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/early_otherwise_branch.opt5_failed_type.EarlyOtherwiseBranch.diff b/tests/mir-opt/early_otherwise_branch.opt5_failed_type.EarlyOtherwiseBranch.diff
deleted file mode 100644
index 23f14b843b3..00000000000
--- a/tests/mir-opt/early_otherwise_branch.opt5_failed_type.EarlyOtherwiseBranch.diff
+++ /dev/null
@@ -1,61 +0,0 @@
-- // MIR for `opt5_failed_type` before EarlyOtherwiseBranch
-+ // MIR for `opt5_failed_type` after EarlyOtherwiseBranch
-  
-  fn opt5_failed_type(_1: u32, _2: u64) -> u32 {
-      debug x => _1;
-      debug y => _2;
-      let mut _0: u32;
-      let mut _3: (u32, u64);
-      let mut _4: u32;
-      let mut _5: u64;
-  
-      bb0: {
-          StorageLive(_3);
-          StorageLive(_4);
-          _4 = copy _1;
-          StorageLive(_5);
-          _5 = copy _2;
-          _3 = (move _4, move _5);
-          StorageDead(_5);
-          StorageDead(_4);
-          switchInt(copy (_3.0: u32)) -> [1: bb2, 2: bb3, 3: bb4, otherwise: bb1];
-      }
-  
-      bb1: {
-          _0 = const 0_u32;
-          goto -> bb8;
-      }
-  
-      bb2: {
-          switchInt(copy (_3.1: u64)) -> [1: bb7, otherwise: bb1];
-      }
-  
-      bb3: {
-          switchInt(copy (_3.1: u64)) -> [2: bb6, otherwise: bb1];
-      }
-  
-      bb4: {
-          switchInt(copy (_3.1: u64)) -> [3: bb5, otherwise: bb1];
-      }
-  
-      bb5: {
-          _0 = const 6_u32;
-          goto -> bb8;
-      }
-  
-      bb6: {
-          _0 = const 5_u32;
-          goto -> bb8;
-      }
-  
-      bb7: {
-          _0 = const 4_u32;
-          goto -> bb8;
-      }
-  
-      bb8: {
-          StorageDead(_3);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/early_otherwise_branch.rs b/tests/mir-opt/early_otherwise_branch.rs
index 382c38ceb3a..47bd4be295b 100644
--- a/tests/mir-opt/early_otherwise_branch.rs
+++ b/tests/mir-opt/early_otherwise_branch.rs
@@ -78,57 +78,9 @@ fn opt4(x: Option2<u32>, y: Option2<u32>) -> u32 {
     }
 }
 
-// EMIT_MIR early_otherwise_branch.opt5.EarlyOtherwiseBranch.diff
-fn opt5(x: u32, y: u32) -> u32 {
-    // CHECK-LABEL: fn opt5(
-    // CHECK: let mut [[CMP_LOCAL:_.*]]: bool;
-    // CHECK: bb0: {
-    // CHECK: [[CMP_LOCAL]] = Ne(
-    // CHECK: switchInt(move [[CMP_LOCAL]]) -> [
-    // CHECK-NEXT: }
-    match (x, y) {
-        (1, 1) => 4,
-        (2, 2) => 5,
-        (3, 3) => 6,
-        _ => 0,
-    }
-}
-
-// EMIT_MIR early_otherwise_branch.opt5_failed.EarlyOtherwiseBranch.diff
-fn opt5_failed(x: u32, y: u32) -> u32 {
-    // CHECK-LABEL: fn opt5_failed(
-    // CHECK: bb0: {
-    // CHECK-NOT: Ne(
-    // CHECK: switchInt(
-    // CHECK-NEXT: }
-    match (x, y) {
-        (1, 1) => 4,
-        (2, 2) => 5,
-        (3, 2) => 6,
-        _ => 0,
-    }
-}
-
-// EMIT_MIR early_otherwise_branch.opt5_failed_type.EarlyOtherwiseBranch.diff
-fn opt5_failed_type(x: u32, y: u64) -> u32 {
-    // CHECK-LABEL: fn opt5_failed_type(
-    // CHECK: bb0: {
-    // CHECK-NOT: Ne(
-    // CHECK: switchInt(
-    // CHECK-NEXT: }
-    match (x, y) {
-        (1, 1) => 4,
-        (2, 2) => 5,
-        (3, 3) => 6,
-        _ => 0,
-    }
-}
-
 fn main() {
     opt1(None, Some(0));
     opt2(None, Some(0));
     opt3(Option2::None, Option2::Some(false));
     opt4(Option2::None, Option2::Some(0));
-    opt5(0, 0);
-    opt5_failed(0, 0);
 }