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