]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/inst_combine_deref.do_not_miscompile.InstCombine.diff
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / mir-opt / inst_combine_deref.do_not_miscompile.InstCombine.diff
CommitLineData
1b1a35ee
XL
1- // MIR for `do_not_miscompile` before InstCombine
2+ // MIR for `do_not_miscompile` after InstCombine
3
4 fn do_not_miscompile() -> () {
5 let mut _0: (); // return place in scope 0 at $DIR/inst_combine_deref.rs:54:24: 54:24
6 let _1: i32; // in scope 0 at $DIR/inst_combine_deref.rs:55:9: 55:10
7 let mut _5: &i32; // in scope 0 at $DIR/inst_combine_deref.rs:59:10: 59:12
8 let _6: &i32; // in scope 0 at $DIR/inst_combine_deref.rs:59:10: 59:12
9 let _7: (); // in scope 0 at $DIR/inst_combine_deref.rs:60:5: 60:23
10 let mut _8: bool; // in scope 0 at $DIR/inst_combine_deref.rs:60:5: 60:23
11 let mut _9: bool; // in scope 0 at $DIR/inst_combine_deref.rs:60:13: 60:21
12 let mut _10: i32; // in scope 0 at $DIR/inst_combine_deref.rs:60:13: 60:15
fc512014 13 let mut _11: !; // in scope 0 at $DIR/inst_combine_deref.rs:60:5: 60:23
1b1a35ee
XL
14 scope 1 {
15 debug x => _1; // in scope 1 at $DIR/inst_combine_deref.rs:55:9: 55:10
16 let _2: i32; // in scope 1 at $DIR/inst_combine_deref.rs:56:9: 56:10
17 scope 2 {
18 debug a => _2; // in scope 2 at $DIR/inst_combine_deref.rs:56:9: 56:10
19 let mut _3: &i32; // in scope 2 at $DIR/inst_combine_deref.rs:57:9: 57:14
20 scope 3 {
21 debug y => _3; // in scope 3 at $DIR/inst_combine_deref.rs:57:9: 57:14
22 let _4: &mut &i32; // in scope 3 at $DIR/inst_combine_deref.rs:58:9: 58:10
23 scope 4 {
24 debug z => _4; // in scope 4 at $DIR/inst_combine_deref.rs:58:9: 58:10
25 }
26 }
27 }
28 }
29
30 bb0: {
31 StorageLive(_1); // scope 0 at $DIR/inst_combine_deref.rs:55:9: 55:10
32 _1 = const 42_i32; // scope 0 at $DIR/inst_combine_deref.rs:55:13: 55:15
33 StorageLive(_2); // scope 1 at $DIR/inst_combine_deref.rs:56:9: 56:10
34 _2 = const 99_i32; // scope 1 at $DIR/inst_combine_deref.rs:56:13: 56:15
35 StorageLive(_3); // scope 2 at $DIR/inst_combine_deref.rs:57:9: 57:14
36 _3 = &_1; // scope 2 at $DIR/inst_combine_deref.rs:57:17: 57:19
37 StorageLive(_4); // scope 3 at $DIR/inst_combine_deref.rs:58:9: 58:10
38 _4 = &mut _3; // scope 3 at $DIR/inst_combine_deref.rs:58:13: 58:19
39 StorageLive(_5); // scope 4 at $DIR/inst_combine_deref.rs:59:10: 59:12
40 StorageLive(_6); // scope 4 at $DIR/inst_combine_deref.rs:59:10: 59:12
41 _6 = &_2; // scope 4 at $DIR/inst_combine_deref.rs:59:10: 59:12
42- _5 = &(*_6); // scope 4 at $DIR/inst_combine_deref.rs:59:10: 59:12
43+ _5 = _6; // scope 4 at $DIR/inst_combine_deref.rs:59:10: 59:12
44 (*_4) = move _5; // scope 4 at $DIR/inst_combine_deref.rs:59:5: 59:12
45 StorageDead(_5); // scope 4 at $DIR/inst_combine_deref.rs:59:11: 59:12
46 StorageDead(_6); // scope 4 at $DIR/inst_combine_deref.rs:59:12: 59:13
47 StorageLive(_7); // scope 4 at $DIR/inst_combine_deref.rs:60:5: 60:23
48 StorageLive(_8); // scope 4 at $DIR/inst_combine_deref.rs:60:5: 60:23
49 StorageLive(_9); // scope 4 at $DIR/inst_combine_deref.rs:60:13: 60:21
50 StorageLive(_10); // scope 4 at $DIR/inst_combine_deref.rs:60:13: 60:15
51 _10 = (*_3); // scope 4 at $DIR/inst_combine_deref.rs:60:13: 60:15
52 _9 = Eq(move _10, const 99_i32); // scope 4 at $DIR/inst_combine_deref.rs:60:13: 60:21
53 StorageDead(_10); // scope 4 at $DIR/inst_combine_deref.rs:60:20: 60:21
54 _8 = Not(move _9); // scope 4 at $DIR/inst_combine_deref.rs:60:5: 60:23
55 StorageDead(_9); // scope 4 at $DIR/inst_combine_deref.rs:60:22: 60:23
5869c6ff 56 switchInt(move _8) -> [false: bb2, otherwise: bb1]; // scope 4 at $DIR/inst_combine_deref.rs:60:5: 60:23
1b1a35ee
XL
57 }
58
59 bb1: {
fc512014
XL
60 StorageLive(_11); // scope 4 at $DIR/inst_combine_deref.rs:60:5: 60:23
61 core::panicking::panic(const "assertion failed: *y == 99"); // scope 4 at $DIR/inst_combine_deref.rs:60:5: 60:23
1b1a35ee 62 // mir::Constant
fc512014
XL
63 // + span: $DIR/inst_combine_deref.rs:60:5: 60:23
64 // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(Scalar(<ZST>)) }
1b1a35ee
XL
65 // ty::Const
66 // + ty: &str
67 // + val: Value(Slice { data: Allocation { bytes: [97, 115, 115, 101, 114, 116, 105, 111, 110, 32, 102, 97, 105, 108, 101, 100, 58, 32, 42, 121, 32, 61, 61, 32, 57, 57], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [67108863], len: Size { raw: 26 } }, size: Size { raw: 26 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 26 })
68 // mir::Constant
69 // + span: $DIR/inst_combine_deref.rs:1:1: 1:1
70 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [97, 115, 115, 101, 114, 116, 105, 111, 110, 32, 102, 97, 105, 108, 101, 100, 58, 32, 42, 121, 32, 61, 61, 32, 57, 57], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [67108863], len: Size { raw: 26 } }, size: Size { raw: 26 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 26 }) }
71 }
5869c6ff
XL
72
73 bb2: {
74 _7 = const (); // scope 4 at $DIR/inst_combine_deref.rs:60:23: 60:23
75 StorageDead(_8); // scope 4 at $DIR/inst_combine_deref.rs:60:22: 60:23
76 StorageDead(_7); // scope 4 at $DIR/inst_combine_deref.rs:60:22: 60:23
77 _0 = const (); // scope 0 at $DIR/inst_combine_deref.rs:54:24: 61:2
78 StorageDead(_4); // scope 3 at $DIR/inst_combine_deref.rs:61:1: 61:2
79 StorageDead(_3); // scope 2 at $DIR/inst_combine_deref.rs:61:1: 61:2
80 StorageDead(_2); // scope 1 at $DIR/inst_combine_deref.rs:61:1: 61:2
81 StorageDead(_1); // scope 0 at $DIR/inst_combine_deref.rs:61:1: 61:2
82 return; // scope 0 at $DIR/inst_combine_deref.rs:61:2: 61:2
83 }
1b1a35ee
XL
84 }
85