summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff
blob: cc4f7cc06991f6b77ce66f0cee3f33c8789ede9e (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
- // MIR for `test` before SimplifyComparisonIntegral
+ // MIR for `test` after SimplifyComparisonIntegral
  
  fn test(_1: T) -> () {
      debug x => _1;                       // in scope 0 at $DIR/issue_76432.rs:+0:38: +0:39
      let mut _0: ();                      // return place in scope 0 at $DIR/issue_76432.rs:+0:44: +0:44
      let _2: &[T];                        // in scope 0 at $DIR/issue_76432.rs:+1:9: +1:10
      let mut _3: &[T; 3];                 // in scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
      let _4: &[T; 3];                     // in scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
      let _5: [T; 3];                      // in scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
      let mut _6: T;                       // in scope 0 at $DIR/issue_76432.rs:+1:21: +1:22
      let mut _7: T;                       // in scope 0 at $DIR/issue_76432.rs:+1:24: +1:25
      let mut _8: T;                       // in scope 0 at $DIR/issue_76432.rs:+1:27: +1:28
      let mut _9: usize;                   // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
      let mut _10: usize;                  // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
      let mut _11: bool;                   // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
      let mut _15: !;                      // in scope 0 at $SRC_DIR/core/src/panic.rs:LL:COL
      scope 1 {
          debug v => _2;                   // in scope 1 at $DIR/issue_76432.rs:+1:9: +1:10
          let _12: &T;                     // in scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
          let _13: &T;                     // in scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
          let _14: &T;                     // in scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
          scope 2 {
              debug v1 => _12;             // in scope 2 at $DIR/issue_76432.rs:+3:10: +3:16
              debug v2 => _13;             // in scope 2 at $DIR/issue_76432.rs:+3:18: +3:24
              debug v3 => _14;             // in scope 2 at $DIR/issue_76432.rs:+3:26: +3:32
          }
      }
  
      bb0: {
          StorageLive(_2);                 // scope 0 at $DIR/issue_76432.rs:+1:9: +1:10
          StorageLive(_5);                 // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
          _5 = [_1, _1, _1];               // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
          _4 = &_5;                        // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
          _2 = _4 as &[T] (Pointer(Unsize)); // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
          _9 = Len((*_2));                 // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
          _10 = const 3_usize;             // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
-         _11 = Eq(move _9, const 3_usize); // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
-         switchInt(move _11) -> [0: bb1, otherwise: bb2]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
+         nop;                             // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
+         switchInt(move _9) -> [3: bb2, otherwise: bb1]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
      }
  
      bb1: {
          StorageLive(_15);                // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL
          _15 = core::panicking::panic(const "internal error: entered unreachable code"); // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL
                                           // mir::Constant
                                           // + span: $SRC_DIR/core/src/panic.rs:LL:COL
                                           // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(<ZST>) }
                                           // mir::Constant
                                           // + span: $SRC_DIR/core/src/panic.rs:LL:COL
                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
      }
  
      bb2: {
          StorageLive(_12);                // scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
          _12 = &(*_2)[0 of 3];            // scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
          StorageLive(_13);                // scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
          _13 = &(*_2)[1 of 3];            // scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
          StorageLive(_14);                // scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
          _14 = &(*_2)[2 of 3];            // scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
          StorageDead(_14);                // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
          StorageDead(_13);                // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
          StorageDead(_12);                // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
          StorageDead(_5);                 // scope 0 at $DIR/issue_76432.rs:+6:1: +6:2
          StorageDead(_2);                 // scope 0 at $DIR/issue_76432.rs:+6:1: +6:2
          return;                          // scope 0 at $DIR/issue_76432.rs:+6:2: +6:2
      }
  }