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.

295 lines
7.0 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[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">}
2024-03-12 15:53:35 +00:00
| 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: [] }: &'static [u8; 4_usize]], 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 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);
2024-02-16 01:57:24 +00:00
_4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb25];
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);
PlaceMention(_2);
2023-06-06 13:47:00 +00:00
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);
2024-02-16 01:57:24 +00:00
_10 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _11, move _12) -> [return: bb4, unwind: bb25];
2022-07-26 07:05:31 +00:00
}
bb2: {
2024-02-12 03:56:03 +00:00
FakeRead(ForMatchedPlace(None), _2);
unreachable;
2022-07-26 07:05:31 +00:00
}
bb3: {
2024-02-16 01:57:24 +00:00
goto -> bb2;
}
bb4: {
2024-02-16 01:57:24 +00:00
switchInt(move _10) -> [0: bb6, otherwise: bb5];
}
bb5: {
2024-02-16 01:57:24 +00:00
StorageDead(_12);
StorageDead(_11);
goto -> bb10;
2024-02-12 03:56:03 +00:00
}
bb6: {
2024-02-16 01:57:24 +00:00
goto -> bb7;
}
bb7: {
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;
2024-02-16 01:57:24 +00:00
_15 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _16, move _17, move _19, move _21) -> bb25;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb8: {
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
}
2024-02-16 01:57:24 +00:00
bb9: {
goto -> bb11;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb10: {
2023-06-06 13:47:00 +00:00
_1 = const ();
2024-02-16 01:57:24 +00:00
goto -> bb11;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb11: {
2023-06-06 13:47:00 +00:00
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
2024-02-16 01:57:24 +00:00
goto -> bb12;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb12: {
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);
2024-02-16 01:57:24 +00:00
_25 = function_with_bytes::<&*b"AAAA">() -> [return: bb13, unwind: bb25];
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb13: {
_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);
PlaceMention(_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);
2024-02-16 01:57:24 +00:00
_30 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _31, move _32) -> [return: bb16, unwind: bb25];
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb14: {
2024-02-12 03:56:03 +00:00
FakeRead(ForMatchedPlace(None), _23);
unreachable;
}
2024-02-16 01:57:24 +00:00
bb15: {
goto -> bb14;
2024-02-12 03:56:03 +00:00
}
2024-02-16 01:57:24 +00:00
bb16: {
switchInt(move _30) -> [0: bb18, otherwise: bb17];
}
bb17: {
2023-06-06 13:47:00 +00:00
StorageDead(_32);
StorageDead(_31);
2024-02-16 01:57:24 +00:00
goto -> bb22;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb18: {
goto -> bb19;
}
2024-02-16 01:57:24 +00:00
bb19: {
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;
2024-02-16 01:57:24 +00:00
_35 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _36, move _37, move _39, move _41) -> bb25;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb20: {
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
}
2024-02-16 01:57:24 +00:00
bb21: {
goto -> bb23;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb22: {
_22 = const ();
2024-02-16 01:57:24 +00:00
goto -> bb23;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb23: {
2023-06-06 13:47:00 +00:00
StorageDead(_30);
StorageDead(_29);
StorageDead(_28);
2024-02-16 01:57:24 +00:00
goto -> bb24;
2022-07-26 07:05:31 +00:00
}
2024-02-16 01:57:24 +00:00
bb24: {
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
}
2024-02-16 01:57:24 +00:00
bb25 (cleanup): {
2023-06-06 13:47:00 +00:00
resume;
2022-07-26 07:05:31 +00:00
}
}
2023-10-15 17:00:11 +00:00
ALLOC0 (size: 4, align: 1) {
2022-07-26 07:05:31 +00:00
41 41 41 41 AAAA
}