about summary refs log tree commit diff
path: root/src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-10-25 02:27:27 +0200
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-07 10:35:25 +0100
commitda4a40f81650222d86fa070aad87b5d20f8596e9 (patch)
tree44219710224634bc18b6c26d235715145b3d8e4a /src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff
parent1f82a9f89e3c0388442835df632b56ccea08a971 (diff)
downloadrust-da4a40f81650222d86fa070aad87b5d20f8596e9.tar.gz
rust-da4a40f81650222d86fa070aad87b5d20f8596e9.zip
Remove copy of current const prop tests and add a few new tests
Diffstat (limited to 'src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff')
-rw-r--r--src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff b/src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff
new file mode 100644
index 00000000000..7fb1c8b7caf
--- /dev/null
+++ b/src/test/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff
@@ -0,0 +1,86 @@
+- // MIR for `main` before DataflowConstProp
++ // MIR for `main` after DataflowConstProp
+  
+  fn main() -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/tuple.rs:+0:11: +0:11
+      let mut _1: (i32, i32);              // in scope 0 at $DIR/tuple.rs:+1:9: +1:14
+      let mut _4: i32;                     // in scope 0 at $DIR/tuple.rs:+3:13: +3:22
+      let mut _5: i32;                     // in scope 0 at $DIR/tuple.rs:+3:13: +3:16
+      let mut _6: i32;                     // in scope 0 at $DIR/tuple.rs:+3:19: +3:22
+      let mut _7: &(i32, i32);             // in scope 0 at $DIR/tuple.rs:+5:9: +5:11
+      let _8: &(i32, i32);                 // in scope 0 at $DIR/tuple.rs:+5:9: +5:11
+      let mut _10: i32;                    // in scope 0 at $DIR/tuple.rs:+6:13: +6:22
+      let mut _11: i32;                    // in scope 0 at $DIR/tuple.rs:+6:13: +6:16
+      let mut _12: i32;                    // in scope 0 at $DIR/tuple.rs:+6:19: +6:22
+      scope 1 {
+          debug a => _1;                   // in scope 1 at $DIR/tuple.rs:+1:9: +1:14
+          let mut _2: &(i32, i32);         // in scope 1 at $DIR/tuple.rs:+2:9: +2:14
+          scope 2 {
+              debug b => _2;               // in scope 2 at $DIR/tuple.rs:+2:9: +2:14
+              let _3: i32;                 // in scope 2 at $DIR/tuple.rs:+3:9: +3:10
+              scope 3 {
+                  debug c => _3;           // in scope 3 at $DIR/tuple.rs:+3:9: +3:10
+                  let _9: i32;             // in scope 3 at $DIR/tuple.rs:+6:9: +6:10
+                  scope 4 {
+                      debug d => _9;       // in scope 4 at $DIR/tuple.rs:+6:9: +6:10
+                  }
+              }
+          }
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/tuple.rs:+1:9: +1:14
+          Deinit(_1);                      // scope 0 at $DIR/tuple.rs:+1:17: +1:23
+          (_1.0: i32) = const 1_i32;       // scope 0 at $DIR/tuple.rs:+1:17: +1:23
+          (_1.1: i32) = const 2_i32;       // scope 0 at $DIR/tuple.rs:+1:17: +1:23
+          StorageLive(_2);                 // scope 1 at $DIR/tuple.rs:+2:9: +2:14
+          _2 = &_1;                        // scope 1 at $DIR/tuple.rs:+2:17: +2:19
+          StorageLive(_3);                 // scope 2 at $DIR/tuple.rs:+3:9: +3:10
+          StorageLive(_4);                 // scope 2 at $DIR/tuple.rs:+3:13: +3:22
+          StorageLive(_5);                 // scope 2 at $DIR/tuple.rs:+3:13: +3:16
+-         _5 = (_1.0: i32);                // scope 2 at $DIR/tuple.rs:+3:13: +3:16
++         _5 = const 1_i32;                // scope 2 at $DIR/tuple.rs:+3:13: +3:16
+          StorageLive(_6);                 // scope 2 at $DIR/tuple.rs:+3:19: +3:22
+-         _6 = ((*_2).1: i32);             // scope 2 at $DIR/tuple.rs:+3:19: +3:22
+-         _4 = Add(move _5, move _6);      // scope 2 at $DIR/tuple.rs:+3:13: +3:22
++         _6 = const 2_i32;                // scope 2 at $DIR/tuple.rs:+3:19: +3:22
++         _4 = const 3_i32;                // scope 2 at $DIR/tuple.rs:+3:13: +3:22
+          StorageDead(_6);                 // scope 2 at $DIR/tuple.rs:+3:21: +3:22
+          StorageDead(_5);                 // scope 2 at $DIR/tuple.rs:+3:21: +3:22
+-         _3 = Add(move _4, const 3_i32);  // scope 2 at $DIR/tuple.rs:+3:13: +3:26
++         _3 = const 6_i32;                // scope 2 at $DIR/tuple.rs:+3:13: +3:26
+          StorageDead(_4);                 // scope 2 at $DIR/tuple.rs:+3:25: +3:26
+          Deinit(_1);                      // scope 3 at $DIR/tuple.rs:+4:5: +4:15
+          (_1.0: i32) = const 2_i32;       // scope 3 at $DIR/tuple.rs:+4:5: +4:15
+          (_1.1: i32) = const 3_i32;       // scope 3 at $DIR/tuple.rs:+4:5: +4:15
+          StorageLive(_7);                 // scope 3 at $DIR/tuple.rs:+5:9: +5:11
+          StorageLive(_8);                 // scope 3 at $DIR/tuple.rs:+5:9: +5:11
+          _8 = &_1;                        // scope 3 at $DIR/tuple.rs:+5:9: +5:11
+          _7 = &(*_8);                     // scope 3 at $DIR/tuple.rs:+5:9: +5:11
+          _2 = move _7;                    // scope 3 at $DIR/tuple.rs:+5:5: +5:11
+          StorageDead(_7);                 // scope 3 at $DIR/tuple.rs:+5:10: +5:11
+          StorageDead(_8);                 // scope 3 at $DIR/tuple.rs:+5:11: +5:12
+          StorageLive(_9);                 // scope 3 at $DIR/tuple.rs:+6:9: +6:10
+          StorageLive(_10);                // scope 3 at $DIR/tuple.rs:+6:13: +6:22
+          StorageLive(_11);                // scope 3 at $DIR/tuple.rs:+6:13: +6:16
+-         _11 = (_1.0: i32);               // scope 3 at $DIR/tuple.rs:+6:13: +6:16
++         _11 = const 2_i32;               // scope 3 at $DIR/tuple.rs:+6:13: +6:16
+          StorageLive(_12);                // scope 3 at $DIR/tuple.rs:+6:19: +6:22
+-         _12 = ((*_2).1: i32);            // scope 3 at $DIR/tuple.rs:+6:19: +6:22
+-         _10 = Add(move _11, move _12);   // scope 3 at $DIR/tuple.rs:+6:13: +6:22
++         _12 = const 3_i32;               // scope 3 at $DIR/tuple.rs:+6:19: +6:22
++         _10 = const 5_i32;               // scope 3 at $DIR/tuple.rs:+6:13: +6:22
+          StorageDead(_12);                // scope 3 at $DIR/tuple.rs:+6:21: +6:22
+          StorageDead(_11);                // scope 3 at $DIR/tuple.rs:+6:21: +6:22
+-         _9 = Add(move _10, const 4_i32); // scope 3 at $DIR/tuple.rs:+6:13: +6:26
++         _9 = const 9_i32;                // scope 3 at $DIR/tuple.rs:+6:13: +6:26
+          StorageDead(_10);                // scope 3 at $DIR/tuple.rs:+6:25: +6:26
+          _0 = const ();                   // scope 0 at $DIR/tuple.rs:+0:11: +7:2
+          StorageDead(_9);                 // scope 3 at $DIR/tuple.rs:+7:1: +7:2
+          StorageDead(_3);                 // scope 2 at $DIR/tuple.rs:+7:1: +7:2
+          StorageDead(_2);                 // scope 1 at $DIR/tuple.rs:+7:1: +7:2
+          StorageDead(_1);                 // scope 0 at $DIR/tuple.rs:+7:1: +7:2
+          return;                          // scope 0 at $DIR/tuple.rs:+7:2: +7:2
+      }
+  }
+