summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff
blob: b473d0fdecd097cacabf304dec6934cedabbabcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- // MIR for `main` before SimplifyConstCondition-after-const-prop
+ // MIR for `main` after SimplifyConstCondition-after-const-prop
  
  fn main() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_if.rs:+0:11: +0:11
      let mut _1: bool;                    // in scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
      let _2: ();                          // in scope 0 at $DIR/simplify_if.rs:+2:9: +2:15
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
          _1 = const false;                // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
-         switchInt(const false) -> [0: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
+         goto -> bb3;                     // scope 0 at $DIR/simplify_if.rs:+1:8: +1:13
      }
  
      bb1: {
          _2 = noop() -> bb2;              // scope 0 at $DIR/simplify_if.rs:+2:9: +2:15
                                           // mir::Constant
                                           // + span: $DIR/simplify_if.rs:8:9: 8:13
                                           // + literal: Const { ty: fn() {noop}, val: Value(<ZST>) }
      }
  
      bb2: {
          goto -> bb4;                     // scope 0 at $DIR/simplify_if.rs:+1:5: +3:6
      }
  
      bb3: {
          goto -> bb4;                     // scope 0 at $DIR/simplify_if.rs:+1:5: +3:6
      }
  
      bb4: {
          StorageDead(_1);                 // scope 0 at $DIR/simplify_if.rs:+3:5: +3:6
          return;                          // scope 0 at $DIR/simplify_if.rs:+4:2: +4:2
      }
  }