]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff
Test drop_tracking_mir before querying generator.
[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(_3);                 // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
33           StorageLive(_4);                 // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
34           StorageLive(_5);                 // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
35           StorageLive(_6);                 // scope 0 at $DIR/issue_76432.rs:+1:21: +1:22
36           _6 = _1;                         // scope 0 at $DIR/issue_76432.rs:+1:21: +1:22
37           StorageLive(_7);                 // scope 0 at $DIR/issue_76432.rs:+1:24: +1:25
38           _7 = _1;                         // scope 0 at $DIR/issue_76432.rs:+1:24: +1:25
39           StorageLive(_8);                 // scope 0 at $DIR/issue_76432.rs:+1:27: +1:28
40           _8 = _1;                         // scope 0 at $DIR/issue_76432.rs:+1:27: +1:28
41           _5 = [move _6, move _7, move _8]; // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
42           StorageDead(_8);                 // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
43           StorageDead(_7);                 // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
44           StorageDead(_6);                 // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
45           _4 = &_5;                        // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
46           _3 = _4;                         // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
47           _2 = move _3 as &[T] (Pointer(Unsize)); // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
48           StorageDead(_3);                 // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
49           StorageDead(_4);                 // scope 0 at $DIR/issue_76432.rs:+1:29: +1:30
50           _9 = Len((*_2));                 // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
51           _10 = const 3_usize;             // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
52 -         _11 = Eq(move _9, const 3_usize); // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
53 -         switchInt(move _11) -> [0: bb1, otherwise: bb2]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
54 +         nop;                             // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
55 +         switchInt(move _9) -> [3: bb2, otherwise: bb1]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
56       }
57   
58       bb1: {
59           StorageLive(_15);                // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL
60           _15 = core::panicking::panic(const "internal error: entered unreachable code"); // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL
61                                            // mir::Constant
62                                            // + span: $SRC_DIR/core/src/panic.rs:LL:COL
63                                            // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(<ZST>) }
64                                            // mir::Constant
65                                            // + span: $SRC_DIR/core/src/panic.rs:LL:COL
66                                            // + literal: Const { ty: &str, val: Value(Slice(..)) }
67       }
68   
69       bb2: {
70           StorageLive(_12);                // scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
71           _12 = &(*_2)[0 of 3];            // scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
72           StorageLive(_13);                // scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
73           _13 = &(*_2)[1 of 3];            // scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
74           StorageLive(_14);                // scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
75           _14 = &(*_2)[2 of 3];            // scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
76           StorageDead(_14);                // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
77           StorageDead(_13);                // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
78           StorageDead(_12);                // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
79           StorageDead(_5);                 // scope 0 at $DIR/issue_76432.rs:+6:1: +6:2
80           StorageDead(_2);                 // scope 0 at $DIR/issue_76432.rs:+6:1: +6:2
81           return;                          // scope 0 at $DIR/issue_76432.rs:+6:2: +6:2
82       }
83   }
84