about summary refs log tree commit diff
path: root/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-05-21 10:33:03 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-12-24 20:08:57 +0000
commita03c9728168b5adb172c1f43951a7613d7f2a50a (patch)
tree2bcc4d3e683d112f771aaf01803466972d124e17 /tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
parent08cc634f1a26f30801daa1cbe7b866b12aaf1edd (diff)
downloadrust-a03c9728168b5adb172c1f43951a7613d7f2a50a.tar.gz
rust-a03c9728168b5adb172c1f43951a7613d7f2a50a.zip
Enable GVN by default.
Diffstat (limited to 'tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff')
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff47
1 files changed, 11 insertions, 36 deletions
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
index 297ebd79fad..5ba417a5b0f 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
@@ -4,60 +4,35 @@
   fn main() -> () {
       let mut _0: ();
       let _1: i32;
-      let mut _2: (i32, bool);
-      let mut _4: [i32; 6];
-      let _5: usize;
-      let mut _6: usize;
-      let mut _7: bool;
-      let mut _9: u32;
+      let mut _3: u32;
       scope 1 {
           debug x => _1;
-          let _3: i32;
+          let _2: i32;
           scope 2 {
-              debug y => _3;
-              let _8: u32;
+              debug y => _2;
               scope 3 {
-                  debug z => _9;
+                  debug z => _3;
               }
           }
       }
   
       bb0: {
           StorageLive(_1);
--         _2 = CheckedAdd(const 2_i32, const 2_i32);
--         assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
-+         _2 = const (4_i32, false);
-+         assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
+          assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
       }
   
       bb1: {
--         _1 = move (_2.0: i32);
-+         _1 = const 4_i32;
-          StorageLive(_3);
-          StorageLive(_4);
-          _4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
-          StorageLive(_5);
-          _5 = const 3_usize;
-          _6 = const 6_usize;
--         _7 = Lt(_5, _6);
--         assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> [success: bb2, unwind continue];
-+         _7 = const true;
-+         assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
+          _1 = const 4_i32;
+          StorageLive(_2);
+          assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
       }
   
       bb2: {
--         _3 = _4[_5];
-+         _3 = const 3_i32;
-          StorageDead(_5);
-          StorageDead(_4);
-          _9 = const 42_u32;
-          StorageDead(_3);
+          _2 = const 3_i32;
+          _3 = const 42_u32;
+          StorageDead(_2);
           StorageDead(_1);
           return;
       }
-+ }
-+ 
-+ ALLOC0 (size: 8, align: 4) {
-+     04 00 00 00 00 __ __ __                         │ .....░░░
   }