rust/tests/mir-opt/issue_99325.main.built.after.32bit.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

277 lines
6.8 KiB
Rust
Raw Normal View History

// MIR for `main` after built
2022-07-26 07:05:31 +00:00
| User Type Annotations
| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:12:16: 12:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
2022-07-26 07:05:31 +00:00
|
fn main() -> () {
2023-06-06 13:47:00 +00:00
let mut _0: ();
let _1: ();
let mut _2: (&&[u8], &&[u8; 4]);
let mut _3: &&[u8];
let _4: &[u8];
let mut _5: &&[u8; 4];
let _6: &[u8; 4];
let _7: [u8; 4];
let _8: &&[u8];
let _9: &&[u8; 4];
let mut _10: bool;
let mut _11: &&[u8];
let mut _12: &&[u8; 4];
let mut _13: !;
let _15: !;
let mut _16: core::panicking::AssertKind;
let mut _17: &&[u8];
let _18: &&[u8];
let mut _19: &&[u8; 4];
let _20: &&[u8; 4];
let mut _21: std::option::Option<std::fmt::Arguments<'_>>;
let _22: ();
let mut _23: (&&[u8], &&[u8; 4]);
let mut _24: &&[u8];
let _25: &[u8];
let mut _26: &&[u8; 4];
let _27: &[u8; 4];
let _28: &&[u8];
let _29: &&[u8; 4];
let mut _30: bool;
let mut _31: &&[u8];
let mut _32: &&[u8; 4];
let mut _33: !;
let _35: !;
let mut _36: core::panicking::AssertKind;
let mut _37: &&[u8];
let _38: &&[u8];
let mut _39: &&[u8; 4];
let _40: &&[u8; 4];
let mut _41: std::option::Option<std::fmt::Arguments<'_>>;
2022-07-26 07:05:31 +00:00
scope 1 {
2023-06-06 13:47:00 +00:00
debug left_val => _8;
debug right_val => _9;
let _14: core::panicking::AssertKind;
2022-07-26 07:05:31 +00:00
scope 2 {
debug kind => _14;
2022-07-26 07:05:31 +00:00
}
}
scope 3 {
debug left_val => _28;
debug right_val => _29;
let _34: core::panicking::AssertKind;
2022-07-26 07:05:31 +00:00
scope 4 {
debug kind => _34;
2022-07-26 07:05:31 +00:00
}
}
bb0: {
2023-06-06 13:47:00 +00:00
StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
_4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb21];
2022-07-26 07:05:31 +00:00
}
bb1: {
2023-06-06 13:47:00 +00:00
_3 = &_4;
StorageLive(_5);
StorageLive(_6);
StorageLive(_7);
_7 = [const 65_u8, const 65_u8, const 65_u8, const 65_u8];
_6 = &_7;
_5 = &_6;
_2 = (move _3, move _5);
StorageDead(_5);
StorageDead(_3);
FakeRead(ForMatchedPlace(None), _2);
StorageLive(_8);
_8 = (_2.0: &&[u8]);
StorageLive(_9);
_9 = (_2.1: &&[u8; 4]);
StorageLive(_10);
StorageLive(_11);
_11 = &(*_8);
2023-06-06 13:47:00 +00:00
StorageLive(_12);
_12 = &(*_9);
_10 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _11, move _12) -> [return: bb2, unwind: bb21];
2022-07-26 07:05:31 +00:00
}
bb2: {
2023-06-06 13:47:00 +00:00
switchInt(move _10) -> [0: bb4, otherwise: bb3];
2022-07-26 07:05:31 +00:00
}
bb3: {
StorageDead(_12);
StorageDead(_11);
goto -> bb8;
}
bb4: {
goto -> bb5;
}
bb5: {
StorageDead(_12);
StorageDead(_11);
StorageLive(_14);
_14 = core::panicking::AssertKind::Eq;
FakeRead(ForLet(None), _14);
2023-06-06 13:47:00 +00:00
StorageLive(_15);
StorageLive(_16);
_16 = move _14;
2023-06-06 13:47:00 +00:00
StorageLive(_17);
StorageLive(_18);
_18 = &(*_8);
_17 = &(*_18);
2023-06-06 13:47:00 +00:00
StorageLive(_19);
StorageLive(_20);
_20 = &(*_9);
_19 = &(*_20);
2023-06-06 13:47:00 +00:00
StorageLive(_21);
_21 = Option::<Arguments<'_>>::None;
_15 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _16, move _17, move _19, move _21) -> bb21;
2022-07-26 07:05:31 +00:00
}
bb6: {
2023-06-06 13:47:00 +00:00
StorageDead(_21);
StorageDead(_19);
StorageDead(_17);
2023-06-06 13:47:00 +00:00
StorageDead(_16);
StorageDead(_20);
StorageDead(_18);
2023-06-06 13:47:00 +00:00
StorageDead(_15);
StorageDead(_14);
2023-06-06 13:47:00 +00:00
unreachable;
2022-07-26 07:05:31 +00:00
}
bb7: {
goto -> bb9;
2022-07-26 07:05:31 +00:00
}
bb8: {
2023-06-06 13:47:00 +00:00
_1 = const ();
goto -> bb9;
2022-07-26 07:05:31 +00:00
}
bb9: {
2023-06-06 13:47:00 +00:00
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
goto -> bb10;
2022-07-26 07:05:31 +00:00
}
bb10: {
2023-06-06 13:47:00 +00:00
StorageDead(_7);
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
StorageDead(_1);
StorageLive(_22);
2023-06-06 13:47:00 +00:00
StorageLive(_23);
StorageLive(_24);
StorageLive(_25);
_25 = function_with_bytes::<&*b"AAAA">() -> [return: bb11, unwind: bb21];
2022-07-26 07:05:31 +00:00
}
bb11: {
_24 = &_25;
StorageLive(_26);
2023-06-06 13:47:00 +00:00
StorageLive(_27);
_27 = const b"AAAA";
_26 = &_27;
_23 = (move _24, move _26);
StorageDead(_26);
StorageDead(_24);
FakeRead(ForMatchedPlace(None), _23);
2023-06-06 13:47:00 +00:00
StorageLive(_28);
_28 = (_23.0: &&[u8]);
2023-06-06 13:47:00 +00:00
StorageLive(_29);
_29 = (_23.1: &&[u8; 4]);
2023-06-06 13:47:00 +00:00
StorageLive(_30);
StorageLive(_31);
_31 = &(*_28);
2023-06-06 13:47:00 +00:00
StorageLive(_32);
_32 = &(*_29);
_30 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _31, move _32) -> [return: bb12, unwind: bb21];
2022-07-26 07:05:31 +00:00
}
bb12: {
switchInt(move _30) -> [0: bb14, otherwise: bb13];
}
bb13: {
2023-06-06 13:47:00 +00:00
StorageDead(_32);
StorageDead(_31);
goto -> bb18;
2022-07-26 07:05:31 +00:00
}
bb14: {
goto -> bb15;
}
bb15: {
StorageDead(_32);
StorageDead(_31);
StorageLive(_34);
_34 = core::panicking::AssertKind::Eq;
FakeRead(ForLet(None), _34);
StorageLive(_35);
2023-06-06 13:47:00 +00:00
StorageLive(_36);
_36 = move _34;
2023-06-06 13:47:00 +00:00
StorageLive(_37);
StorageLive(_38);
_38 = &(*_28);
_37 = &(*_38);
2023-06-06 13:47:00 +00:00
StorageLive(_39);
StorageLive(_40);
_40 = &(*_29);
_39 = &(*_40);
StorageLive(_41);
_41 = Option::<Arguments<'_>>::None;
_35 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _36, move _37, move _39, move _41) -> bb21;
2022-07-26 07:05:31 +00:00
}
bb16: {
2023-06-06 13:47:00 +00:00
StorageDead(_41);
StorageDead(_39);
StorageDead(_37);
StorageDead(_36);
StorageDead(_40);
StorageDead(_38);
StorageDead(_35);
StorageDead(_34);
2023-06-06 13:47:00 +00:00
unreachable;
2022-07-26 07:05:31 +00:00
}
bb17: {
goto -> bb19;
2022-07-26 07:05:31 +00:00
}
bb18: {
_22 = const ();
goto -> bb19;
2022-07-26 07:05:31 +00:00
}
bb19: {
2023-06-06 13:47:00 +00:00
StorageDead(_30);
StorageDead(_29);
StorageDead(_28);
goto -> bb20;
2022-07-26 07:05:31 +00:00
}
bb20: {
StorageDead(_27);
StorageDead(_25);
2023-06-06 13:47:00 +00:00
StorageDead(_23);
StorageDead(_22);
2023-06-06 13:47:00 +00:00
_0 = const ();
return;
2022-07-26 07:05:31 +00:00
}
bb21 (cleanup): {
2023-06-06 13:47:00 +00:00
resume;
2022-07-26 07:05:31 +00:00
}
}
alloc4 (size: 4, align: 1) {
41 41 41 41 AAAA
}