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

287 lines
6.9 KiB
Rust
Raw Normal View History

// MIR for `main` after built
2022-07-26 02:05:31 -05:00
| User Type Annotations
2024-10-15 17:35:21 -05:00
| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
2022-07-26 02:05:31 -05:00
|
fn main() -> () {
2023-06-06 08:47:00 -05: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 02:05:31 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug left_val => _8;
debug right_val => _9;
let _14: core::panicking::AssertKind;
2022-07-26 02:05:31 -05:00
scope 2 {
debug kind => _14;
2022-07-26 02:05:31 -05:00
}
}
scope 3 {
debug left_val => _28;
debug right_val => _29;
let _34: core::panicking::AssertKind;
2022-07-26 02:05:31 -05:00
scope 4 {
debug kind => _34;
2022-07-26 02:05:31 -05:00
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
_4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb23];
2022-07-26 02:05:31 -05:00
}
bb1: {
2023-06-06 08:47:00 -05: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);
PlaceMention(_2);
2023-06-06 08:47:00 -05:00
StorageLive(_8);
2024-08-18 16:26:34 -05:00
_8 = copy (_2.0: &&[u8]);
2023-06-06 08:47:00 -05:00
StorageLive(_9);
2024-08-18 16:26:34 -05:00
_9 = copy (_2.1: &&[u8; 4]);
2023-06-06 08:47:00 -05:00
StorageLive(_10);
StorageLive(_11);
_11 = &(*_8);
2023-06-06 08:47:00 -05:00
StorageLive(_12);
_12 = &(*_9);
_10 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _11, move _12) -> [return: bb3, unwind: bb23];
2022-07-26 02:05:31 -05:00
}
bb2: {
2024-02-11 21:56:03 -06:00
FakeRead(ForMatchedPlace(None), _2);
unreachable;
2022-07-26 02:05:31 -05:00
}
bb3: {
switchInt(move _10) -> [0: bb5, otherwise: bb4];
}
bb4: {
2024-02-15 19:57:24 -06:00
StorageDead(_12);
StorageDead(_11);
goto -> bb9;
2024-02-11 21:56:03 -06:00
}
bb5: {
goto -> bb6;
2024-02-15 19:57:24 -06:00
}
bb6: {
StorageDead(_12);
StorageDead(_11);
StorageLive(_14);
_14 = core::panicking::AssertKind::Eq;
FakeRead(ForLet(None), _14);
2023-06-06 08:47:00 -05:00
StorageLive(_15);
StorageLive(_16);
_16 = move _14;
2023-06-06 08:47:00 -05:00
StorageLive(_17);
StorageLive(_18);
_18 = &(*_8);
_17 = &(*_18);
2023-06-06 08:47:00 -05:00
StorageLive(_19);
StorageLive(_20);
_20 = &(*_9);
_19 = &(*_20);
2023-06-06 08:47:00 -05:00
StorageLive(_21);
_21 = Option::<Arguments<'_>>::None;
_15 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _16, move _17, move _19, move _21) -> bb23;
2022-07-26 02:05:31 -05:00
}
bb7: {
2023-06-06 08:47:00 -05:00
StorageDead(_21);
StorageDead(_19);
StorageDead(_17);
2023-06-06 08:47:00 -05:00
StorageDead(_16);
StorageDead(_20);
StorageDead(_18);
2023-06-06 08:47:00 -05:00
StorageDead(_15);
StorageDead(_14);
2023-06-06 08:47:00 -05:00
unreachable;
2022-07-26 02:05:31 -05:00
}
bb8: {
goto -> bb10;
2022-07-26 02:05:31 -05:00
}
bb9: {
2023-06-06 08:47:00 -05:00
_1 = const ();
goto -> bb10;
2022-07-26 02:05:31 -05:00
}
bb10: {
2023-06-06 08:47:00 -05:00
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
goto -> bb11;
2022-07-26 02:05:31 -05:00
}
bb11: {
2023-06-06 08:47:00 -05:00
StorageDead(_7);
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
StorageDead(_1);
StorageLive(_22);
2023-06-06 08:47:00 -05:00
StorageLive(_23);
StorageLive(_24);
StorageLive(_25);
_25 = function_with_bytes::<&*b"AAAA">() -> [return: bb12, unwind: bb23];
2022-07-26 02:05:31 -05:00
}
bb12: {
_24 = &_25;
StorageLive(_26);
2023-06-06 08:47:00 -05:00
StorageLive(_27);
_27 = const b"AAAA";
_26 = &_27;
_23 = (move _24, move _26);
StorageDead(_26);
StorageDead(_24);
PlaceMention(_23);
2023-06-06 08:47:00 -05:00
StorageLive(_28);
2024-08-18 16:26:34 -05:00
_28 = copy (_23.0: &&[u8]);
2023-06-06 08:47:00 -05:00
StorageLive(_29);
2024-08-18 16:26:34 -05:00
_29 = copy (_23.1: &&[u8; 4]);
2023-06-06 08:47:00 -05:00
StorageLive(_30);
StorageLive(_31);
_31 = &(*_28);
2023-06-06 08:47:00 -05:00
StorageLive(_32);
_32 = &(*_29);
_30 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _31, move _32) -> [return: bb14, unwind: bb23];
2022-07-26 02:05:31 -05:00
}
bb13: {
2024-02-11 21:56:03 -06:00
FakeRead(ForMatchedPlace(None), _23);
unreachable;
}
bb14: {
switchInt(move _30) -> [0: bb16, otherwise: bb15];
2024-02-15 19:57:24 -06:00
}
bb15: {
2023-06-06 08:47:00 -05:00
StorageDead(_32);
StorageDead(_31);
goto -> bb20;
2022-07-26 02:05:31 -05:00
}
bb16: {
goto -> bb17;
}
bb17: {
StorageDead(_32);
StorageDead(_31);
StorageLive(_34);
_34 = core::panicking::AssertKind::Eq;
FakeRead(ForLet(None), _34);
StorageLive(_35);
2023-06-06 08:47:00 -05:00
StorageLive(_36);
_36 = move _34;
2023-06-06 08:47:00 -05:00
StorageLive(_37);
StorageLive(_38);
_38 = &(*_28);
_37 = &(*_38);
2023-06-06 08:47:00 -05: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) -> bb23;
2022-07-26 02:05:31 -05:00
}
bb18: {
2023-06-06 08:47:00 -05:00
StorageDead(_41);
StorageDead(_39);
StorageDead(_37);
StorageDead(_36);
StorageDead(_40);
StorageDead(_38);
StorageDead(_35);
StorageDead(_34);
2023-06-06 08:47:00 -05:00
unreachable;
2022-07-26 02:05:31 -05:00
}
bb19: {
goto -> bb21;
2022-07-26 02:05:31 -05:00
}
bb20: {
_22 = const ();
goto -> bb21;
2022-07-26 02:05:31 -05:00
}
bb21: {
2023-06-06 08:47:00 -05:00
StorageDead(_30);
StorageDead(_29);
StorageDead(_28);
goto -> bb22;
2022-07-26 02:05:31 -05:00
}
bb22: {
StorageDead(_27);
StorageDead(_25);
2023-06-06 08:47:00 -05:00
StorageDead(_23);
StorageDead(_22);
2023-06-06 08:47:00 -05:00
_0 = const ();
return;
2022-07-26 02:05:31 -05:00
}
bb23 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
2022-07-26 02:05:31 -05:00
}
}
2023-10-15 12:00:11 -05:00
ALLOC0 (size: 4, align: 1) {
2022-07-26 02:05:31 -05:00
41 41 41 41 AAAA
}