rust/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
2024-04-08 15:08:06 +00:00

309 lines
17 KiB
Rust

// MIR for `address_of_reborrow` after SimplifyCfg-initial
| User Type Annotations
| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:8:5: 8:18, inferred_ty: *const [i32; 10]
| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:10:5: 10:25, inferred_ty: *const dyn std::marker::Send
| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:19:5: 19:18, inferred_ty: *const [i32; 10]
| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:21:5: 21:25, inferred_ty: *const dyn std::marker::Send
| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:29:5: 29:16, inferred_ty: *mut [i32; 10]
| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:31:5: 31:23, inferred_ty: *mut dyn std::marker::Send
| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], defining_opaque_types: [] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
|
fn address_of_reborrow() -> () {
let mut _0: ();
let _1: &[i32; 10];
let _2: [i32; 10];
let mut _4: [i32; 10];
let _5: *const [i32; 10];
let mut _6: *const [i32; 10];
let _7: *const [i32; 10];
let _8: *const dyn std::marker::Send;
let mut _9: *const dyn std::marker::Send;
let mut _10: *const [i32; 10];
let _11: *const [i32];
let mut _12: *const [i32; 10];
let _13: *const i32;
let mut _14: *const [i32; 10];
let mut _18: *const [i32; 10];
let mut _20: *const [i32; 10];
let _21: *const [i32; 10];
let mut _22: *const [i32; 10];
let _23: *const [i32; 10];
let _24: *const dyn std::marker::Send;
let mut _25: *const dyn std::marker::Send;
let mut _26: *const [i32; 10];
let _27: *const [i32];
let mut _28: *const [i32; 10];
let mut _32: *const [i32; 10];
let mut _34: *const [i32; 10];
let _35: *mut [i32; 10];
let mut _36: *mut [i32; 10];
let _37: *mut [i32; 10];
let _38: *mut dyn std::marker::Send;
let mut _39: *mut dyn std::marker::Send;
let mut _40: *mut [i32; 10];
let _41: *mut [i32];
let mut _42: *mut [i32; 10];
let mut _46: *mut [i32; 10];
let mut _48: *mut [i32; 10];
scope 1 {
debug y => _1;
let mut _3: &mut [i32; 10];
scope 2 {
debug z => _3;
let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] };
scope 3 {
debug p => _15;
let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] };
scope 4 {
debug p => _16;
let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] };
scope 5 {
debug p => _17;
let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] };
scope 6 {
debug p => _19;
let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] };
scope 7 {
debug p => _29;
let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] };
scope 8 {
debug p => _30;
let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] };
scope 9 {
debug p => _31;
let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] };
scope 10 {
debug p => _33;
let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] };
scope 11 {
debug p => _43;
let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] };
scope 12 {
debug p => _44;
let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] };
scope 13 {
debug p => _45;
let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] };
scope 14 {
debug p => _47;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
bb0: {
StorageLive(_1);
StorageLive(_2);
_2 = [const 0_i32; 10];
_1 = &_2;
FakeRead(ForLet(None), _1);
StorageLive(_3);
StorageLive(_4);
_4 = [const 0_i32; 10];
_3 = &mut _4;
FakeRead(ForLet(None), _3);
StorageLive(_5);
StorageLive(_6);
_6 = &raw const (*_1);
AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] });
_5 = _6;
StorageDead(_6);
StorageDead(_5);
StorageLive(_7);
_7 = &raw const (*_1);
StorageDead(_7);
StorageLive(_8);
StorageLive(_9);
StorageLive(_10);
_10 = &raw const (*_1);
_9 = move _10 as *const dyn std::marker::Send (PointerCoercion(Unsize));
StorageDead(_10);
AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] });
_8 = _9;
StorageDead(_9);
StorageDead(_8);
StorageLive(_11);
StorageLive(_12);
_12 = &raw const (*_1);
_11 = move _12 as *const [i32] (PointerCoercion(Unsize));
StorageDead(_12);
StorageDead(_11);
StorageLive(_13);
StorageLive(_14);
_14 = &raw const (*_1);
_13 = move _14 as *const i32 (PointerCoercion(ArrayToPointer));
StorageDead(_14);
StorageDead(_13);
StorageLive(_15);
_15 = &raw const (*_1);
FakeRead(ForLet(None), _15);
AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] });
StorageLive(_16);
_16 = &raw const (*_1);
FakeRead(ForLet(None), _16);
AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] });
StorageLive(_17);
StorageLive(_18);
_18 = &raw const (*_1);
_17 = move _18 as *const dyn std::marker::Send (PointerCoercion(Unsize));
StorageDead(_18);
FakeRead(ForLet(None), _17);
AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] });
StorageLive(_19);
StorageLive(_20);
_20 = &raw const (*_1);
_19 = move _20 as *const [i32] (PointerCoercion(Unsize));
StorageDead(_20);
FakeRead(ForLet(None), _19);
AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] });
StorageLive(_21);
StorageLive(_22);
_22 = &raw const (*_3);
AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] });
_21 = _22;
StorageDead(_22);
StorageDead(_21);
StorageLive(_23);
_23 = &raw const (*_3);
StorageDead(_23);
StorageLive(_24);
StorageLive(_25);
StorageLive(_26);
_26 = &raw const (*_3);
_25 = move _26 as *const dyn std::marker::Send (PointerCoercion(Unsize));
StorageDead(_26);
AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] });
_24 = _25;
StorageDead(_25);
StorageDead(_24);
StorageLive(_27);
StorageLive(_28);
_28 = &raw const (*_3);
_27 = move _28 as *const [i32] (PointerCoercion(Unsize));
StorageDead(_28);
StorageDead(_27);
StorageLive(_29);
_29 = &raw const (*_3);
FakeRead(ForLet(None), _29);
AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] });
StorageLive(_30);
_30 = &raw const (*_3);
FakeRead(ForLet(None), _30);
AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] });
StorageLive(_31);
StorageLive(_32);
_32 = &raw const (*_3);
_31 = move _32 as *const dyn std::marker::Send (PointerCoercion(Unsize));
StorageDead(_32);
FakeRead(ForLet(None), _31);
AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] });
StorageLive(_33);
StorageLive(_34);
_34 = &raw const (*_3);
_33 = move _34 as *const [i32] (PointerCoercion(Unsize));
StorageDead(_34);
FakeRead(ForLet(None), _33);
AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] });
StorageLive(_35);
StorageLive(_36);
_36 = &raw mut (*_3);
AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] });
_35 = _36;
StorageDead(_36);
StorageDead(_35);
StorageLive(_37);
_37 = &raw mut (*_3);
StorageDead(_37);
StorageLive(_38);
StorageLive(_39);
StorageLive(_40);
_40 = &raw mut (*_3);
_39 = move _40 as *mut dyn std::marker::Send (PointerCoercion(Unsize));
StorageDead(_40);
AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] });
_38 = _39;
StorageDead(_39);
StorageDead(_38);
StorageLive(_41);
StorageLive(_42);
_42 = &raw mut (*_3);
_41 = move _42 as *mut [i32] (PointerCoercion(Unsize));
StorageDead(_42);
StorageDead(_41);
StorageLive(_43);
_43 = &raw mut (*_3);
FakeRead(ForLet(None), _43);
AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] });
StorageLive(_44);
_44 = &raw mut (*_3);
FakeRead(ForLet(None), _44);
AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] });
StorageLive(_45);
StorageLive(_46);
_46 = &raw mut (*_3);
_45 = move _46 as *mut dyn std::marker::Send (PointerCoercion(Unsize));
StorageDead(_46);
FakeRead(ForLet(None), _45);
AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] });
StorageLive(_47);
StorageLive(_48);
_48 = &raw mut (*_3);
_47 = move _48 as *mut [i32] (PointerCoercion(Unsize));
StorageDead(_48);
FakeRead(ForLet(None), _47);
AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] });
_0 = const ();
StorageDead(_47);
StorageDead(_45);
StorageDead(_44);
StorageDead(_43);
StorageDead(_33);
StorageDead(_31);
StorageDead(_30);
StorageDead(_29);
StorageDead(_19);
StorageDead(_17);
StorageDead(_16);
StorageDead(_15);
StorageDead(_4);
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
}
}