summary refs log tree commit diff
path: root/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2023-05-06 23:20:58 -0400
committerBen Kimock <kimockb@gmail.com>2023-05-06 23:22:32 -0400
commitff855547f463aecb0c86f8f78ebc605ef097664b (patch)
treeec64c766c0cbefd7c35d2edac9de2b5ae2b26b6c /tests/mir-opt/not_equal_false.opt.InstSimplify.diff
parenta77c552485a19245a266bc03c450676c666b605f (diff)
downloadrust-ff855547f463aecb0c86f8f78ebc605ef097664b.tar.gz
rust-ff855547f463aecb0c86f8f78ebc605ef097664b.zip
Rename InstCombine to InstSimplify
Diffstat (limited to 'tests/mir-opt/not_equal_false.opt.InstSimplify.diff')
-rw-r--r--tests/mir-opt/not_equal_false.opt.InstSimplify.diff35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/mir-opt/not_equal_false.opt.InstSimplify.diff b/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
new file mode 100644
index 00000000000..8e7776a0bbc
--- /dev/null
+++ b/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
@@ -0,0 +1,35 @@
+- // MIR for `opt` before InstSimplify
++ // MIR for `opt` after InstSimplify
+  
+  fn opt(_1: bool) -> u32 {
+      debug x => _1;                       // in scope 0 at $DIR/not_equal_false.rs:+0:8: +0:9
+      let mut _0: u32;                     // return place in scope 0 at $DIR/not_equal_false.rs:+0:20: +0:23
+      let mut _2: bool;                    // in scope 0 at $DIR/not_equal_false.rs:+1:8: +1:18
+      let mut _3: bool;                    // in scope 0 at $DIR/not_equal_false.rs:+1:8: +1:9
+  
+      bb0: {
+          StorageLive(_2);                 // scope 0 at $DIR/not_equal_false.rs:+1:8: +1:18
+          StorageLive(_3);                 // scope 0 at $DIR/not_equal_false.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/not_equal_false.rs:+1:8: +1:9
+-         _2 = Ne(move _3, const false);   // scope 0 at $DIR/not_equal_false.rs:+1:8: +1:18
++         _2 = move _3;                    // scope 0 at $DIR/not_equal_false.rs:+1:8: +1:18
+          StorageDead(_3);                 // scope 0 at $DIR/not_equal_false.rs:+1:17: +1:18
+          switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/not_equal_false.rs:+1:8: +1:18
+      }
+  
+      bb1: {
+          _0 = const 0_u32;                // scope 0 at $DIR/not_equal_false.rs:+1:21: +1:22
+          goto -> bb3;                     // scope 0 at $DIR/not_equal_false.rs:+1:5: +1:35
+      }
+  
+      bb2: {
+          _0 = const 1_u32;                // scope 0 at $DIR/not_equal_false.rs:+1:32: +1:33
+          goto -> bb3;                     // scope 0 at $DIR/not_equal_false.rs:+1:5: +1:35
+      }
+  
+      bb3: {
+          StorageDead(_2);                 // scope 0 at $DIR/not_equal_false.rs:+1:34: +1:35
+          return;                          // scope 0 at $DIR/not_equal_false.rs:+2:2: +2:2
+      }
+  }
+