]> git.proxmox.com Git - rustc.git/blame - tests/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / mir-opt / issues / issue_75439.foo.MatchBranchSimplification.diff
CommitLineData
1b1a35ee
XL
1- // MIR for `foo` before MatchBranchSimplification
2+ // MIR for `foo` after MatchBranchSimplification
3
4 fn foo(_1: [u8; 16]) -> Option<[u8; 4]> {
487cf647
FG
5 debug bytes => _1; // in scope 0 at $DIR/issue_75439.rs:+0:12: +0:17
6 let mut _0: std::option::Option<[u8; 4]>; // return place in scope 0 at $DIR/issue_75439.rs:+0:32: +0:47
7 let _2: [u32; 4]; // in scope 0 at $DIR/issue_75439.rs:+2:9: +2:15
8 let mut _3: [u8; 16]; // in scope 0 at $DIR/issue_75439.rs:+2:47: +2:52
9 let mut _5: [u8; 4]; // in scope 0 at $DIR/issue_75439.rs:+5:14: +5:38
10 let mut _6: u32; // in scope 0 at $DIR/issue_75439.rs:+5:33: +5:35
1b1a35ee 11 scope 1 {
487cf647 12 debug dwords => _2; // in scope 1 at $DIR/issue_75439.rs:+2:9: +2:15
1b1a35ee 13 scope 3 {
487cf647
FG
14 debug ip => _4; // in scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
15 let _4: u32; // in scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
923072b8
FG
16 scope 4 {
17 }
1b1a35ee
XL
18 }
19 }
20 scope 2 {
21 }
22
23 bb0: {
487cf647
FG
24 StorageLive(_2); // scope 0 at $DIR/issue_75439.rs:+2:9: +2:15
25 StorageLive(_3); // scope 2 at $DIR/issue_75439.rs:+2:47: +2:52
26 _3 = _1; // scope 2 at $DIR/issue_75439.rs:+2:47: +2:52
27 _2 = transmute::<[u8; 16], [u32; 4]>(move _3) -> bb1; // scope 2 at $DIR/issue_75439.rs:+2:37: +2:53
1b1a35ee 28 // mir::Constant
9c376795 29 // + span: $DIR/issue_75439.rs:8:37: 8:46
064997fb 30 // + literal: Const { ty: unsafe extern "rust-intrinsic" fn([u8; 16]) -> [u32; 4] {transmute::<[u8; 16], [u32; 4]>}, val: Value(<ZST>) }
1b1a35ee
XL
31 }
32
33 bb1: {
487cf647 34 StorageDead(_3); // scope 2 at $DIR/issue_75439.rs:+2:52: +2:53
9c376795 35 switchInt(_2[0 of 4]) -> [0: bb2, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
1b1a35ee
XL
36 }
37
38 bb2: {
9c376795 39 switchInt(_2[1 of 4]) -> [0: bb3, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
1b1a35ee
XL
40 }
41
42 bb3: {
9c376795 43 switchInt(_2[2 of 4]) -> [0: bb5, 4294901760: bb6, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
1b1a35ee
XL
44 }
45
46 bb4: {
487cf647
FG
47 StorageLive(_5); // scope 3 at $DIR/issue_75439.rs:+5:14: +5:38
48 StorageLive(_6); // scope 4 at $DIR/issue_75439.rs:+5:33: +5:35
49 _6 = _4; // scope 4 at $DIR/issue_75439.rs:+5:33: +5:35
50 _5 = transmute::<u32, [u8; 4]>(move _6) -> bb7; // scope 4 at $DIR/issue_75439.rs:+5:23: +5:36
94222f64 51 // mir::Constant
9c376795 52 // + span: $DIR/issue_75439.rs:11:23: 11:32
064997fb 53 // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u32) -> [u8; 4] {transmute::<u32, [u8; 4]>}, val: Value(<ZST>) }
1b1a35ee
XL
54 }
55
56 bb5: {
487cf647
FG
57 StorageLive(_4); // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
58 _4 = _2[3 of 4]; // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
59 goto -> bb4; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
1b1a35ee
XL
60 }
61
62 bb6: {
487cf647
FG
63 StorageLive(_4); // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
64 _4 = _2[3 of 4]; // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
65 goto -> bb4; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
1b1a35ee
XL
66 }
67
68 bb7: {
487cf647 69 StorageDead(_6); // scope 4 at $DIR/issue_75439.rs:+5:35: +5:36
9ffffee4 70 _0 = Option::<[u8; 4]>::Some(move _5); // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
487cf647
FG
71 StorageDead(_5); // scope 3 at $DIR/issue_75439.rs:+5:38: +5:39
72 StorageDead(_4); // scope 1 at $DIR/issue_75439.rs:+6:5: +6:6
73 goto -> bb9; // scope 1 at $DIR/issue_75439.rs:+4:5: +8:6
1b1a35ee
XL
74 }
75
76 bb8: {
9ffffee4 77 _0 = Option::<[u8; 4]>::None; // scope 1 at $DIR/issue_75439.rs:+7:9: +7:13
487cf647 78 goto -> bb9; // scope 1 at $DIR/issue_75439.rs:+4:5: +8:6
1b1a35ee
XL
79 }
80
81 bb9: {
487cf647
FG
82 StorageDead(_2); // scope 0 at $DIR/issue_75439.rs:+9:1: +9:2
83 return; // scope 0 at $DIR/issue_75439.rs:+9:2: +9:2
1b1a35ee
XL
84 }
85 }
86