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