diff --git a/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs index 8829b10d5dd79..33542fb5d236e 100644 --- a/src/librustc_mir/util/pretty.rs +++ b/src/librustc_mir/util/pretty.rs @@ -305,9 +305,9 @@ where let indented_body = format!("{0}{0}{1:?};", INDENT, statement); writeln!( w, - "{:A$} // {:?}: {}", + "{:A$} // {}{}", indented_body, - current_location, + if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() }, comment(tcx, statement.source_info), A = ALIGN, )?; @@ -326,9 +326,9 @@ where let indented_terminator = format!("{0}{0}{1:?};", INDENT, data.terminator().kind); writeln!( w, - "{:A$} // {:?}: {}", + "{:A$} // {}{}", indented_terminator, - current_location, + if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() }, comment(tcx, data.terminator().source_info), A = ALIGN, )?; @@ -455,7 +455,7 @@ fn write_scope_tree( )?; } - // Local variable types (including the user's name in a comment). + // Local variable types. for (local, local_decl) in body.local_decls.iter_enumerated() { if (1..body.arg_count + 1).contains(&local.index()) { // Skip over argument locals, they're printed in the signature. diff --git a/src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir index d0b5c401beaba..9742530bd812f 100644 --- a/src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir @@ -126,201 +126,201 @@ fn address_of_reborrow() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/address-of.rs:4:9: 4:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/address-of.rs:4:14: 4:21 - _2 = [const 0i32; 10]; // bb0[2]: scope 0 at $DIR/address-of.rs:4:14: 4:21 + StorageLive(_1); // scope 0 at $DIR/address-of.rs:4:9: 4:10 + StorageLive(_2); // scope 0 at $DIR/address-of.rs:4:14: 4:21 + _2 = [const 0i32; 10]; // scope 0 at $DIR/address-of.rs:4:14: 4:21 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/address-of.rs:4:15: 4:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - _1 = &_2; // bb0[3]: scope 0 at $DIR/address-of.rs:4:13: 4:21 - FakeRead(ForLet, _1); // bb0[4]: scope 0 at $DIR/address-of.rs:4:9: 4:10 - StorageLive(_3); // bb0[5]: scope 1 at $DIR/address-of.rs:5:9: 5:14 - StorageLive(_4); // bb0[6]: scope 1 at $DIR/address-of.rs:5:22: 5:29 - _4 = [const 0i32; 10]; // bb0[7]: scope 1 at $DIR/address-of.rs:5:22: 5:29 + _1 = &_2; // scope 0 at $DIR/address-of.rs:4:13: 4:21 + FakeRead(ForLet, _1); // scope 0 at $DIR/address-of.rs:4:9: 4:10 + StorageLive(_3); // scope 1 at $DIR/address-of.rs:5:9: 5:14 + StorageLive(_4); // scope 1 at $DIR/address-of.rs:5:22: 5:29 + _4 = [const 0i32; 10]; // scope 1 at $DIR/address-of.rs:5:22: 5:29 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/address-of.rs:5:23: 5:24 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - _3 = &mut _4; // bb0[8]: scope 1 at $DIR/address-of.rs:5:17: 5:29 - FakeRead(ForLet, _3); // bb0[9]: scope 1 at $DIR/address-of.rs:5:9: 5:14 - StorageLive(_5); // bb0[10]: scope 2 at $DIR/address-of.rs:7:5: 7:18 - StorageLive(_6); // bb0[11]: scope 2 at $DIR/address-of.rs:7:5: 7:18 - _6 = &raw const (*_1); // bb0[12]: scope 2 at $DIR/address-of.rs:7:5: 7:6 - AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // bb0[13]: scope 2 at $DIR/address-of.rs:7:5: 7:18 - _5 = _6; // bb0[14]: scope 2 at $DIR/address-of.rs:7:5: 7:18 - StorageDead(_6); // bb0[15]: scope 2 at $DIR/address-of.rs:7:18: 7:19 - StorageDead(_5); // bb0[16]: scope 2 at $DIR/address-of.rs:7:18: 7:19 - StorageLive(_7); // bb0[17]: scope 2 at $DIR/address-of.rs:8:5: 8:26 - _7 = &raw const (*_1); // bb0[18]: scope 2 at $DIR/address-of.rs:8:5: 8:6 - StorageDead(_7); // bb0[19]: scope 2 at $DIR/address-of.rs:8:26: 8:27 - StorageLive(_8); // bb0[20]: scope 2 at $DIR/address-of.rs:9:5: 9:25 - StorageLive(_9); // bb0[21]: scope 2 at $DIR/address-of.rs:9:5: 9:25 - StorageLive(_10); // bb0[22]: scope 2 at $DIR/address-of.rs:9:5: 9:6 - _10 = &raw const (*_1); // bb0[23]: scope 2 at $DIR/address-of.rs:9:5: 9:6 - _9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // bb0[24]: scope 2 at $DIR/address-of.rs:9:5: 9:6 - StorageDead(_10); // bb0[25]: scope 2 at $DIR/address-of.rs:9:5: 9:6 - AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // bb0[26]: scope 2 at $DIR/address-of.rs:9:5: 9:25 - _8 = _9; // bb0[27]: scope 2 at $DIR/address-of.rs:9:5: 9:25 - StorageDead(_9); // bb0[28]: scope 2 at $DIR/address-of.rs:9:25: 9:26 - StorageDead(_8); // bb0[29]: scope 2 at $DIR/address-of.rs:9:25: 9:26 - StorageLive(_11); // bb0[30]: scope 2 at $DIR/address-of.rs:10:5: 10:22 - StorageLive(_12); // bb0[31]: scope 2 at $DIR/address-of.rs:10:5: 10:6 - _12 = &raw const (*_1); // bb0[32]: scope 2 at $DIR/address-of.rs:10:5: 10:6 - _11 = move _12 as *const [i32] (Pointer(Unsize)); // bb0[33]: scope 2 at $DIR/address-of.rs:10:5: 10:6 - StorageDead(_12); // bb0[34]: scope 2 at $DIR/address-of.rs:10:5: 10:6 - StorageDead(_11); // bb0[35]: scope 2 at $DIR/address-of.rs:10:22: 10:23 - StorageLive(_13); // bb0[36]: scope 2 at $DIR/address-of.rs:11:5: 11:20 - StorageLive(_14); // bb0[37]: scope 2 at $DIR/address-of.rs:11:5: 11:6 - _14 = &raw const (*_1); // bb0[38]: scope 2 at $DIR/address-of.rs:11:5: 11:6 - _13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // bb0[39]: scope 2 at $DIR/address-of.rs:11:5: 11:20 - StorageDead(_14); // bb0[40]: scope 2 at $DIR/address-of.rs:11:19: 11:20 - StorageDead(_13); // bb0[41]: scope 2 at $DIR/address-of.rs:11:20: 11:21 - StorageLive(_15); // bb0[42]: scope 2 at $DIR/address-of.rs:13:9: 13:10 - _15 = &raw const (*_1); // bb0[43]: scope 2 at $DIR/address-of.rs:13:23: 13:24 - FakeRead(ForLet, _15); // bb0[44]: scope 2 at $DIR/address-of.rs:13:9: 13:10 - AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // bb0[45]: scope 2 at $DIR/address-of.rs:13:12: 13:20 - StorageLive(_16); // bb0[46]: scope 3 at $DIR/address-of.rs:14:9: 14:10 - _16 = &raw const (*_1); // bb0[47]: scope 3 at $DIR/address-of.rs:14:31: 14:32 - FakeRead(ForLet, _16); // bb0[48]: scope 3 at $DIR/address-of.rs:14:9: 14:10 - AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // bb0[49]: scope 3 at $DIR/address-of.rs:14:12: 14:28 - StorageLive(_17); // bb0[50]: scope 4 at $DIR/address-of.rs:15:9: 15:10 - StorageLive(_18); // bb0[51]: scope 4 at $DIR/address-of.rs:15:30: 15:31 - _18 = &raw const (*_1); // bb0[52]: scope 4 at $DIR/address-of.rs:15:30: 15:31 - _17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // bb0[53]: scope 4 at $DIR/address-of.rs:15:30: 15:31 - StorageDead(_18); // bb0[54]: scope 4 at $DIR/address-of.rs:15:30: 15:31 - FakeRead(ForLet, _17); // bb0[55]: scope 4 at $DIR/address-of.rs:15:9: 15:10 - AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // bb0[56]: scope 4 at $DIR/address-of.rs:15:12: 15:27 - StorageLive(_19); // bb0[57]: scope 5 at $DIR/address-of.rs:16:9: 16:10 - StorageLive(_20); // bb0[58]: scope 5 at $DIR/address-of.rs:16:27: 16:28 - _20 = &raw const (*_1); // bb0[59]: scope 5 at $DIR/address-of.rs:16:27: 16:28 - _19 = move _20 as *const [i32] (Pointer(Unsize)); // bb0[60]: scope 5 at $DIR/address-of.rs:16:27: 16:28 - StorageDead(_20); // bb0[61]: scope 5 at $DIR/address-of.rs:16:27: 16:28 - FakeRead(ForLet, _19); // bb0[62]: scope 5 at $DIR/address-of.rs:16:9: 16:10 - AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // bb0[63]: scope 5 at $DIR/address-of.rs:16:12: 16:24 - StorageLive(_21); // bb0[64]: scope 6 at $DIR/address-of.rs:18:5: 18:18 - StorageLive(_22); // bb0[65]: scope 6 at $DIR/address-of.rs:18:5: 18:18 - _22 = &raw const (*_3); // bb0[66]: scope 6 at $DIR/address-of.rs:18:5: 18:6 - AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // bb0[67]: scope 6 at $DIR/address-of.rs:18:5: 18:18 - _21 = _22; // bb0[68]: scope 6 at $DIR/address-of.rs:18:5: 18:18 - StorageDead(_22); // bb0[69]: scope 6 at $DIR/address-of.rs:18:18: 18:19 - StorageDead(_21); // bb0[70]: scope 6 at $DIR/address-of.rs:18:18: 18:19 - StorageLive(_23); // bb0[71]: scope 6 at $DIR/address-of.rs:19:5: 19:26 - _23 = &raw const (*_3); // bb0[72]: scope 6 at $DIR/address-of.rs:19:5: 19:6 - StorageDead(_23); // bb0[73]: scope 6 at $DIR/address-of.rs:19:26: 19:27 - StorageLive(_24); // bb0[74]: scope 6 at $DIR/address-of.rs:20:5: 20:25 - StorageLive(_25); // bb0[75]: scope 6 at $DIR/address-of.rs:20:5: 20:25 - StorageLive(_26); // bb0[76]: scope 6 at $DIR/address-of.rs:20:5: 20:6 - _26 = &raw const (*_3); // bb0[77]: scope 6 at $DIR/address-of.rs:20:5: 20:6 - _25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // bb0[78]: scope 6 at $DIR/address-of.rs:20:5: 20:6 - StorageDead(_26); // bb0[79]: scope 6 at $DIR/address-of.rs:20:5: 20:6 - AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // bb0[80]: scope 6 at $DIR/address-of.rs:20:5: 20:25 - _24 = _25; // bb0[81]: scope 6 at $DIR/address-of.rs:20:5: 20:25 - StorageDead(_25); // bb0[82]: scope 6 at $DIR/address-of.rs:20:25: 20:26 - StorageDead(_24); // bb0[83]: scope 6 at $DIR/address-of.rs:20:25: 20:26 - StorageLive(_27); // bb0[84]: scope 6 at $DIR/address-of.rs:21:5: 21:22 - StorageLive(_28); // bb0[85]: scope 6 at $DIR/address-of.rs:21:5: 21:6 - _28 = &raw const (*_3); // bb0[86]: scope 6 at $DIR/address-of.rs:21:5: 21:6 - _27 = move _28 as *const [i32] (Pointer(Unsize)); // bb0[87]: scope 6 at $DIR/address-of.rs:21:5: 21:6 - StorageDead(_28); // bb0[88]: scope 6 at $DIR/address-of.rs:21:5: 21:6 - StorageDead(_27); // bb0[89]: scope 6 at $DIR/address-of.rs:21:22: 21:23 - StorageLive(_29); // bb0[90]: scope 6 at $DIR/address-of.rs:23:9: 23:10 - _29 = &raw const (*_3); // bb0[91]: scope 6 at $DIR/address-of.rs:23:23: 23:24 - FakeRead(ForLet, _29); // bb0[92]: scope 6 at $DIR/address-of.rs:23:9: 23:10 - AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // bb0[93]: scope 6 at $DIR/address-of.rs:23:12: 23:20 - StorageLive(_30); // bb0[94]: scope 7 at $DIR/address-of.rs:24:9: 24:10 - _30 = &raw const (*_3); // bb0[95]: scope 7 at $DIR/address-of.rs:24:31: 24:32 - FakeRead(ForLet, _30); // bb0[96]: scope 7 at $DIR/address-of.rs:24:9: 24:10 - AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // bb0[97]: scope 7 at $DIR/address-of.rs:24:12: 24:28 - StorageLive(_31); // bb0[98]: scope 8 at $DIR/address-of.rs:25:9: 25:10 - StorageLive(_32); // bb0[99]: scope 8 at $DIR/address-of.rs:25:30: 25:31 - _32 = &raw const (*_3); // bb0[100]: scope 8 at $DIR/address-of.rs:25:30: 25:31 - _31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // bb0[101]: scope 8 at $DIR/address-of.rs:25:30: 25:31 - StorageDead(_32); // bb0[102]: scope 8 at $DIR/address-of.rs:25:30: 25:31 - FakeRead(ForLet, _31); // bb0[103]: scope 8 at $DIR/address-of.rs:25:9: 25:10 - AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // bb0[104]: scope 8 at $DIR/address-of.rs:25:12: 25:27 - StorageLive(_33); // bb0[105]: scope 9 at $DIR/address-of.rs:26:9: 26:10 - StorageLive(_34); // bb0[106]: scope 9 at $DIR/address-of.rs:26:27: 26:28 - _34 = &raw const (*_3); // bb0[107]: scope 9 at $DIR/address-of.rs:26:27: 26:28 - _33 = move _34 as *const [i32] (Pointer(Unsize)); // bb0[108]: scope 9 at $DIR/address-of.rs:26:27: 26:28 - StorageDead(_34); // bb0[109]: scope 9 at $DIR/address-of.rs:26:27: 26:28 - FakeRead(ForLet, _33); // bb0[110]: scope 9 at $DIR/address-of.rs:26:9: 26:10 - AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // bb0[111]: scope 9 at $DIR/address-of.rs:26:12: 26:24 - StorageLive(_35); // bb0[112]: scope 10 at $DIR/address-of.rs:28:5: 28:16 - StorageLive(_36); // bb0[113]: scope 10 at $DIR/address-of.rs:28:5: 28:16 - _36 = &raw mut (*_3); // bb0[114]: scope 10 at $DIR/address-of.rs:28:5: 28:6 - AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // bb0[115]: scope 10 at $DIR/address-of.rs:28:5: 28:16 - _35 = _36; // bb0[116]: scope 10 at $DIR/address-of.rs:28:5: 28:16 - StorageDead(_36); // bb0[117]: scope 10 at $DIR/address-of.rs:28:16: 28:17 - StorageDead(_35); // bb0[118]: scope 10 at $DIR/address-of.rs:28:16: 28:17 - StorageLive(_37); // bb0[119]: scope 10 at $DIR/address-of.rs:29:5: 29:24 - _37 = &raw mut (*_3); // bb0[120]: scope 10 at $DIR/address-of.rs:29:5: 29:6 - StorageDead(_37); // bb0[121]: scope 10 at $DIR/address-of.rs:29:24: 29:25 - StorageLive(_38); // bb0[122]: scope 10 at $DIR/address-of.rs:30:5: 30:23 - StorageLive(_39); // bb0[123]: scope 10 at $DIR/address-of.rs:30:5: 30:23 - StorageLive(_40); // bb0[124]: scope 10 at $DIR/address-of.rs:30:5: 30:6 - _40 = &raw mut (*_3); // bb0[125]: scope 10 at $DIR/address-of.rs:30:5: 30:6 - _39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // bb0[126]: scope 10 at $DIR/address-of.rs:30:5: 30:6 - StorageDead(_40); // bb0[127]: scope 10 at $DIR/address-of.rs:30:5: 30:6 - AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // bb0[128]: scope 10 at $DIR/address-of.rs:30:5: 30:23 - _38 = _39; // bb0[129]: scope 10 at $DIR/address-of.rs:30:5: 30:23 - StorageDead(_39); // bb0[130]: scope 10 at $DIR/address-of.rs:30:23: 30:24 - StorageDead(_38); // bb0[131]: scope 10 at $DIR/address-of.rs:30:23: 30:24 - StorageLive(_41); // bb0[132]: scope 10 at $DIR/address-of.rs:31:5: 31:20 - StorageLive(_42); // bb0[133]: scope 10 at $DIR/address-of.rs:31:5: 31:6 - _42 = &raw mut (*_3); // bb0[134]: scope 10 at $DIR/address-of.rs:31:5: 31:6 - _41 = move _42 as *mut [i32] (Pointer(Unsize)); // bb0[135]: scope 10 at $DIR/address-of.rs:31:5: 31:6 - StorageDead(_42); // bb0[136]: scope 10 at $DIR/address-of.rs:31:5: 31:6 - StorageDead(_41); // bb0[137]: scope 10 at $DIR/address-of.rs:31:20: 31:21 - StorageLive(_43); // bb0[138]: scope 10 at $DIR/address-of.rs:33:9: 33:10 - _43 = &raw mut (*_3); // bb0[139]: scope 10 at $DIR/address-of.rs:33:21: 33:22 - FakeRead(ForLet, _43); // bb0[140]: scope 10 at $DIR/address-of.rs:33:9: 33:10 - AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // bb0[141]: scope 10 at $DIR/address-of.rs:33:12: 33:18 - StorageLive(_44); // bb0[142]: scope 11 at $DIR/address-of.rs:34:9: 34:10 - _44 = &raw mut (*_3); // bb0[143]: scope 11 at $DIR/address-of.rs:34:29: 34:30 - FakeRead(ForLet, _44); // bb0[144]: scope 11 at $DIR/address-of.rs:34:9: 34:10 - AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // bb0[145]: scope 11 at $DIR/address-of.rs:34:12: 34:26 - StorageLive(_45); // bb0[146]: scope 12 at $DIR/address-of.rs:35:9: 35:10 - StorageLive(_46); // bb0[147]: scope 12 at $DIR/address-of.rs:35:28: 35:29 - _46 = &raw mut (*_3); // bb0[148]: scope 12 at $DIR/address-of.rs:35:28: 35:29 - _45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // bb0[149]: scope 12 at $DIR/address-of.rs:35:28: 35:29 - StorageDead(_46); // bb0[150]: scope 12 at $DIR/address-of.rs:35:28: 35:29 - FakeRead(ForLet, _45); // bb0[151]: scope 12 at $DIR/address-of.rs:35:9: 35:10 - AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // bb0[152]: scope 12 at $DIR/address-of.rs:35:12: 35:25 - StorageLive(_47); // bb0[153]: scope 13 at $DIR/address-of.rs:36:9: 36:10 - StorageLive(_48); // bb0[154]: scope 13 at $DIR/address-of.rs:36:25: 36:26 - _48 = &raw mut (*_3); // bb0[155]: scope 13 at $DIR/address-of.rs:36:25: 36:26 - _47 = move _48 as *mut [i32] (Pointer(Unsize)); // bb0[156]: scope 13 at $DIR/address-of.rs:36:25: 36:26 - StorageDead(_48); // bb0[157]: scope 13 at $DIR/address-of.rs:36:25: 36:26 - FakeRead(ForLet, _47); // bb0[158]: scope 13 at $DIR/address-of.rs:36:9: 36:10 - AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // bb0[159]: scope 13 at $DIR/address-of.rs:36:12: 36:22 - _0 = const (); // bb0[160]: scope 0 at $DIR/address-of.rs:3:26: 37:2 + _3 = &mut _4; // scope 1 at $DIR/address-of.rs:5:17: 5:29 + FakeRead(ForLet, _3); // scope 1 at $DIR/address-of.rs:5:9: 5:14 + StorageLive(_5); // scope 2 at $DIR/address-of.rs:7:5: 7:18 + StorageLive(_6); // scope 2 at $DIR/address-of.rs:7:5: 7:18 + _6 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:7:5: 7:6 + AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // scope 2 at $DIR/address-of.rs:7:5: 7:18 + _5 = _6; // scope 2 at $DIR/address-of.rs:7:5: 7:18 + StorageDead(_6); // scope 2 at $DIR/address-of.rs:7:18: 7:19 + StorageDead(_5); // scope 2 at $DIR/address-of.rs:7:18: 7:19 + StorageLive(_7); // scope 2 at $DIR/address-of.rs:8:5: 8:26 + _7 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:8:5: 8:6 + StorageDead(_7); // scope 2 at $DIR/address-of.rs:8:26: 8:27 + StorageLive(_8); // scope 2 at $DIR/address-of.rs:9:5: 9:25 + StorageLive(_9); // scope 2 at $DIR/address-of.rs:9:5: 9:25 + StorageLive(_10); // scope 2 at $DIR/address-of.rs:9:5: 9:6 + _10 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:9:5: 9:6 + _9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:9:5: 9:6 + StorageDead(_10); // scope 2 at $DIR/address-of.rs:9:5: 9:6 + AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/address-of.rs:9:5: 9:25 + _8 = _9; // scope 2 at $DIR/address-of.rs:9:5: 9:25 + StorageDead(_9); // scope 2 at $DIR/address-of.rs:9:25: 9:26 + StorageDead(_8); // scope 2 at $DIR/address-of.rs:9:25: 9:26 + StorageLive(_11); // scope 2 at $DIR/address-of.rs:10:5: 10:22 + StorageLive(_12); // scope 2 at $DIR/address-of.rs:10:5: 10:6 + _12 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:10:5: 10:6 + _11 = move _12 as *const [i32] (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:10:5: 10:6 + StorageDead(_12); // scope 2 at $DIR/address-of.rs:10:5: 10:6 + StorageDead(_11); // scope 2 at $DIR/address-of.rs:10:22: 10:23 + StorageLive(_13); // scope 2 at $DIR/address-of.rs:11:5: 11:20 + StorageLive(_14); // scope 2 at $DIR/address-of.rs:11:5: 11:6 + _14 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:11:5: 11:6 + _13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // scope 2 at $DIR/address-of.rs:11:5: 11:20 + StorageDead(_14); // scope 2 at $DIR/address-of.rs:11:19: 11:20 + StorageDead(_13); // scope 2 at $DIR/address-of.rs:11:20: 11:21 + StorageLive(_15); // scope 2 at $DIR/address-of.rs:13:9: 13:10 + _15 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:13:23: 13:24 + FakeRead(ForLet, _15); // scope 2 at $DIR/address-of.rs:13:9: 13:10 + AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 2 at $DIR/address-of.rs:13:12: 13:20 + StorageLive(_16); // scope 3 at $DIR/address-of.rs:14:9: 14:10 + _16 = &raw const (*_1); // scope 3 at $DIR/address-of.rs:14:31: 14:32 + FakeRead(ForLet, _16); // scope 3 at $DIR/address-of.rs:14:9: 14:10 + AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // scope 3 at $DIR/address-of.rs:14:12: 14:28 + StorageLive(_17); // scope 4 at $DIR/address-of.rs:15:9: 15:10 + StorageLive(_18); // scope 4 at $DIR/address-of.rs:15:30: 15:31 + _18 = &raw const (*_1); // scope 4 at $DIR/address-of.rs:15:30: 15:31 + _17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 4 at $DIR/address-of.rs:15:30: 15:31 + StorageDead(_18); // scope 4 at $DIR/address-of.rs:15:30: 15:31 + FakeRead(ForLet, _17); // scope 4 at $DIR/address-of.rs:15:9: 15:10 + AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // scope 4 at $DIR/address-of.rs:15:12: 15:27 + StorageLive(_19); // scope 5 at $DIR/address-of.rs:16:9: 16:10 + StorageLive(_20); // scope 5 at $DIR/address-of.rs:16:27: 16:28 + _20 = &raw const (*_1); // scope 5 at $DIR/address-of.rs:16:27: 16:28 + _19 = move _20 as *const [i32] (Pointer(Unsize)); // scope 5 at $DIR/address-of.rs:16:27: 16:28 + StorageDead(_20); // scope 5 at $DIR/address-of.rs:16:27: 16:28 + FakeRead(ForLet, _19); // scope 5 at $DIR/address-of.rs:16:9: 16:10 + AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // scope 5 at $DIR/address-of.rs:16:12: 16:24 + StorageLive(_21); // scope 6 at $DIR/address-of.rs:18:5: 18:18 + StorageLive(_22); // scope 6 at $DIR/address-of.rs:18:5: 18:18 + _22 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:18:5: 18:6 + AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // scope 6 at $DIR/address-of.rs:18:5: 18:18 + _21 = _22; // scope 6 at $DIR/address-of.rs:18:5: 18:18 + StorageDead(_22); // scope 6 at $DIR/address-of.rs:18:18: 18:19 + StorageDead(_21); // scope 6 at $DIR/address-of.rs:18:18: 18:19 + StorageLive(_23); // scope 6 at $DIR/address-of.rs:19:5: 19:26 + _23 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:19:5: 19:6 + StorageDead(_23); // scope 6 at $DIR/address-of.rs:19:26: 19:27 + StorageLive(_24); // scope 6 at $DIR/address-of.rs:20:5: 20:25 + StorageLive(_25); // scope 6 at $DIR/address-of.rs:20:5: 20:25 + StorageLive(_26); // scope 6 at $DIR/address-of.rs:20:5: 20:6 + _26 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:20:5: 20:6 + _25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:20:5: 20:6 + StorageDead(_26); // scope 6 at $DIR/address-of.rs:20:5: 20:6 + AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // scope 6 at $DIR/address-of.rs:20:5: 20:25 + _24 = _25; // scope 6 at $DIR/address-of.rs:20:5: 20:25 + StorageDead(_25); // scope 6 at $DIR/address-of.rs:20:25: 20:26 + StorageDead(_24); // scope 6 at $DIR/address-of.rs:20:25: 20:26 + StorageLive(_27); // scope 6 at $DIR/address-of.rs:21:5: 21:22 + StorageLive(_28); // scope 6 at $DIR/address-of.rs:21:5: 21:6 + _28 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:21:5: 21:6 + _27 = move _28 as *const [i32] (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:21:5: 21:6 + StorageDead(_28); // scope 6 at $DIR/address-of.rs:21:5: 21:6 + StorageDead(_27); // scope 6 at $DIR/address-of.rs:21:22: 21:23 + StorageLive(_29); // scope 6 at $DIR/address-of.rs:23:9: 23:10 + _29 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:23:23: 23:24 + FakeRead(ForLet, _29); // scope 6 at $DIR/address-of.rs:23:9: 23:10 + AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // scope 6 at $DIR/address-of.rs:23:12: 23:20 + StorageLive(_30); // scope 7 at $DIR/address-of.rs:24:9: 24:10 + _30 = &raw const (*_3); // scope 7 at $DIR/address-of.rs:24:31: 24:32 + FakeRead(ForLet, _30); // scope 7 at $DIR/address-of.rs:24:9: 24:10 + AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // scope 7 at $DIR/address-of.rs:24:12: 24:28 + StorageLive(_31); // scope 8 at $DIR/address-of.rs:25:9: 25:10 + StorageLive(_32); // scope 8 at $DIR/address-of.rs:25:30: 25:31 + _32 = &raw const (*_3); // scope 8 at $DIR/address-of.rs:25:30: 25:31 + _31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 8 at $DIR/address-of.rs:25:30: 25:31 + StorageDead(_32); // scope 8 at $DIR/address-of.rs:25:30: 25:31 + FakeRead(ForLet, _31); // scope 8 at $DIR/address-of.rs:25:9: 25:10 + AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // scope 8 at $DIR/address-of.rs:25:12: 25:27 + StorageLive(_33); // scope 9 at $DIR/address-of.rs:26:9: 26:10 + StorageLive(_34); // scope 9 at $DIR/address-of.rs:26:27: 26:28 + _34 = &raw const (*_3); // scope 9 at $DIR/address-of.rs:26:27: 26:28 + _33 = move _34 as *const [i32] (Pointer(Unsize)); // scope 9 at $DIR/address-of.rs:26:27: 26:28 + StorageDead(_34); // scope 9 at $DIR/address-of.rs:26:27: 26:28 + FakeRead(ForLet, _33); // scope 9 at $DIR/address-of.rs:26:9: 26:10 + AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // scope 9 at $DIR/address-of.rs:26:12: 26:24 + StorageLive(_35); // scope 10 at $DIR/address-of.rs:28:5: 28:16 + StorageLive(_36); // scope 10 at $DIR/address-of.rs:28:5: 28:16 + _36 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:28:5: 28:6 + AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // scope 10 at $DIR/address-of.rs:28:5: 28:16 + _35 = _36; // scope 10 at $DIR/address-of.rs:28:5: 28:16 + StorageDead(_36); // scope 10 at $DIR/address-of.rs:28:16: 28:17 + StorageDead(_35); // scope 10 at $DIR/address-of.rs:28:16: 28:17 + StorageLive(_37); // scope 10 at $DIR/address-of.rs:29:5: 29:24 + _37 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:29:5: 29:6 + StorageDead(_37); // scope 10 at $DIR/address-of.rs:29:24: 29:25 + StorageLive(_38); // scope 10 at $DIR/address-of.rs:30:5: 30:23 + StorageLive(_39); // scope 10 at $DIR/address-of.rs:30:5: 30:23 + StorageLive(_40); // scope 10 at $DIR/address-of.rs:30:5: 30:6 + _40 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:30:5: 30:6 + _39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:30:5: 30:6 + StorageDead(_40); // scope 10 at $DIR/address-of.rs:30:5: 30:6 + AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // scope 10 at $DIR/address-of.rs:30:5: 30:23 + _38 = _39; // scope 10 at $DIR/address-of.rs:30:5: 30:23 + StorageDead(_39); // scope 10 at $DIR/address-of.rs:30:23: 30:24 + StorageDead(_38); // scope 10 at $DIR/address-of.rs:30:23: 30:24 + StorageLive(_41); // scope 10 at $DIR/address-of.rs:31:5: 31:20 + StorageLive(_42); // scope 10 at $DIR/address-of.rs:31:5: 31:6 + _42 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:31:5: 31:6 + _41 = move _42 as *mut [i32] (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:31:5: 31:6 + StorageDead(_42); // scope 10 at $DIR/address-of.rs:31:5: 31:6 + StorageDead(_41); // scope 10 at $DIR/address-of.rs:31:20: 31:21 + StorageLive(_43); // scope 10 at $DIR/address-of.rs:33:9: 33:10 + _43 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:33:21: 33:22 + FakeRead(ForLet, _43); // scope 10 at $DIR/address-of.rs:33:9: 33:10 + AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // scope 10 at $DIR/address-of.rs:33:12: 33:18 + StorageLive(_44); // scope 11 at $DIR/address-of.rs:34:9: 34:10 + _44 = &raw mut (*_3); // scope 11 at $DIR/address-of.rs:34:29: 34:30 + FakeRead(ForLet, _44); // scope 11 at $DIR/address-of.rs:34:9: 34:10 + AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // scope 11 at $DIR/address-of.rs:34:12: 34:26 + StorageLive(_45); // scope 12 at $DIR/address-of.rs:35:9: 35:10 + StorageLive(_46); // scope 12 at $DIR/address-of.rs:35:28: 35:29 + _46 = &raw mut (*_3); // scope 12 at $DIR/address-of.rs:35:28: 35:29 + _45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 12 at $DIR/address-of.rs:35:28: 35:29 + StorageDead(_46); // scope 12 at $DIR/address-of.rs:35:28: 35:29 + FakeRead(ForLet, _45); // scope 12 at $DIR/address-of.rs:35:9: 35:10 + AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // scope 12 at $DIR/address-of.rs:35:12: 35:25 + StorageLive(_47); // scope 13 at $DIR/address-of.rs:36:9: 36:10 + StorageLive(_48); // scope 13 at $DIR/address-of.rs:36:25: 36:26 + _48 = &raw mut (*_3); // scope 13 at $DIR/address-of.rs:36:25: 36:26 + _47 = move _48 as *mut [i32] (Pointer(Unsize)); // scope 13 at $DIR/address-of.rs:36:25: 36:26 + StorageDead(_48); // scope 13 at $DIR/address-of.rs:36:25: 36:26 + FakeRead(ForLet, _47); // scope 13 at $DIR/address-of.rs:36:9: 36:10 + AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // scope 13 at $DIR/address-of.rs:36:12: 36:22 + _0 = const (); // scope 0 at $DIR/address-of.rs:3:26: 37:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/address-of.rs:3:26: 37:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_47); // bb0[161]: scope 13 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_45); // bb0[162]: scope 12 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_44); // bb0[163]: scope 11 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_43); // bb0[164]: scope 10 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_33); // bb0[165]: scope 9 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_31); // bb0[166]: scope 8 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_30); // bb0[167]: scope 7 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_29); // bb0[168]: scope 6 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_19); // bb0[169]: scope 5 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_17); // bb0[170]: scope 4 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_16); // bb0[171]: scope 3 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_15); // bb0[172]: scope 2 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_4); // bb0[173]: scope 1 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_3); // bb0[174]: scope 1 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_2); // bb0[175]: scope 0 at $DIR/address-of.rs:37:1: 37:2 - StorageDead(_1); // bb0[176]: scope 0 at $DIR/address-of.rs:37:1: 37:2 - return; // bb0[177]: scope 0 at $DIR/address-of.rs:37:2: 37:2 + StorageDead(_47); // scope 13 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_45); // scope 12 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_44); // scope 11 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_43); // scope 10 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_33); // scope 9 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_31); // scope 8 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_30); // scope 7 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_29); // scope 6 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_19); // scope 5 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_17); // scope 4 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_16); // scope 3 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_15); // scope 2 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_4); // scope 1 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_3); // scope 1 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_2); // scope 0 at $DIR/address-of.rs:37:1: 37:2 + StorageDead(_1); // scope 0 at $DIR/address-of.rs:37:1: 37:2 + return; // scope 0 at $DIR/address-of.rs:37:2: 37:2 } } diff --git a/src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir index 0ed76f230fda2..4a7e8de29ec22 100644 --- a/src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir @@ -20,34 +20,34 @@ fn borrow_and_cast(_1: i32) -> () { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/address-of.rs:42:9: 42:10 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/address-of.rs:42:13: 42:15 - _3 = &_1; // bb0[2]: scope 0 at $DIR/address-of.rs:42:13: 42:15 - _2 = &raw const (*_3); // bb0[3]: scope 0 at $DIR/address-of.rs:42:13: 42:15 - FakeRead(ForLet, _2); // bb0[4]: scope 0 at $DIR/address-of.rs:42:9: 42:10 - StorageDead(_3); // bb0[5]: scope 0 at $DIR/address-of.rs:42:29: 42:30 - StorageLive(_4); // bb0[6]: scope 1 at $DIR/address-of.rs:43:9: 43:10 - StorageLive(_5); // bb0[7]: scope 1 at $DIR/address-of.rs:43:13: 43:19 - _5 = &mut _1; // bb0[8]: scope 1 at $DIR/address-of.rs:43:13: 43:19 - _4 = &raw const (*_5); // bb0[9]: scope 1 at $DIR/address-of.rs:43:13: 43:19 - FakeRead(ForLet, _4); // bb0[10]: scope 1 at $DIR/address-of.rs:43:9: 43:10 - StorageDead(_5); // bb0[11]: scope 1 at $DIR/address-of.rs:43:33: 43:34 - StorageLive(_6); // bb0[12]: scope 2 at $DIR/address-of.rs:44:9: 44:10 - StorageLive(_7); // bb0[13]: scope 2 at $DIR/address-of.rs:44:13: 44:19 - _7 = &mut _1; // bb0[14]: scope 2 at $DIR/address-of.rs:44:13: 44:19 - _6 = &raw mut (*_7); // bb0[15]: scope 2 at $DIR/address-of.rs:44:13: 44:19 - FakeRead(ForLet, _6); // bb0[16]: scope 2 at $DIR/address-of.rs:44:9: 44:10 - StorageDead(_7); // bb0[17]: scope 2 at $DIR/address-of.rs:44:31: 44:32 - _0 = const (); // bb0[18]: scope 0 at $DIR/address-of.rs:41:32: 45:2 + StorageLive(_2); // scope 0 at $DIR/address-of.rs:42:9: 42:10 + StorageLive(_3); // scope 0 at $DIR/address-of.rs:42:13: 42:15 + _3 = &_1; // scope 0 at $DIR/address-of.rs:42:13: 42:15 + _2 = &raw const (*_3); // scope 0 at $DIR/address-of.rs:42:13: 42:15 + FakeRead(ForLet, _2); // scope 0 at $DIR/address-of.rs:42:9: 42:10 + StorageDead(_3); // scope 0 at $DIR/address-of.rs:42:29: 42:30 + StorageLive(_4); // scope 1 at $DIR/address-of.rs:43:9: 43:10 + StorageLive(_5); // scope 1 at $DIR/address-of.rs:43:13: 43:19 + _5 = &mut _1; // scope 1 at $DIR/address-of.rs:43:13: 43:19 + _4 = &raw const (*_5); // scope 1 at $DIR/address-of.rs:43:13: 43:19 + FakeRead(ForLet, _4); // scope 1 at $DIR/address-of.rs:43:9: 43:10 + StorageDead(_5); // scope 1 at $DIR/address-of.rs:43:33: 43:34 + StorageLive(_6); // scope 2 at $DIR/address-of.rs:44:9: 44:10 + StorageLive(_7); // scope 2 at $DIR/address-of.rs:44:13: 44:19 + _7 = &mut _1; // scope 2 at $DIR/address-of.rs:44:13: 44:19 + _6 = &raw mut (*_7); // scope 2 at $DIR/address-of.rs:44:13: 44:19 + FakeRead(ForLet, _6); // scope 2 at $DIR/address-of.rs:44:9: 44:10 + StorageDead(_7); // scope 2 at $DIR/address-of.rs:44:31: 44:32 + _0 = const (); // scope 0 at $DIR/address-of.rs:41:32: 45:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/address-of.rs:41:32: 45:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_6); // bb0[19]: scope 2 at $DIR/address-of.rs:45:1: 45:2 - StorageDead(_4); // bb0[20]: scope 1 at $DIR/address-of.rs:45:1: 45:2 - StorageDead(_2); // bb0[21]: scope 0 at $DIR/address-of.rs:45:1: 45:2 - return; // bb0[22]: scope 0 at $DIR/address-of.rs:45:2: 45:2 + StorageDead(_6); // scope 2 at $DIR/address-of.rs:45:1: 45:2 + StorageDead(_4); // scope 1 at $DIR/address-of.rs:45:1: 45:2 + StorageDead(_2); // scope 0 at $DIR/address-of.rs:45:1: 45:2 + return; // scope 0 at $DIR/address-of.rs:45:2: 45:2 } } diff --git a/src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir index 217d080be4fd9..c42d5adce4f2b 100644 --- a/src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir @@ -24,8 +24,8 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 - _1 = [const 42u32, const 43u32, const 44u32]; // bb0[1]: scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 + StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 + _1 = [const 42u32, const 43u32, const 44u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) @@ -44,23 +44,23 @@ fn main() -> () { // mir::Constant // + span: $DIR/array-index-is-temporary.rs:13:26: 13:28 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 - _2 = const 1usize; // bb0[3]: scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18 + StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 + _2 = const 1usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/array-index-is-temporary.rs:14:17: 14:18 // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - StorageLive(_3); // bb0[4]: scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10 - StorageLive(_4); // bb0[5]: scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 - _4 = &mut _2; // bb0[6]: scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 - _3 = &raw mut (*_4); // bb0[7]: scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 - StorageDead(_4); // bb0[8]: scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32 - StorageLive(_5); // bb0[9]: scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29 - StorageLive(_6); // bb0[10]: scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 - _6 = _3; // bb0[11]: scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 - _5 = const foo(move _6) -> bb1; // bb0[12]: scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 + StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10 + StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 + _4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 + _3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 + StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32 + StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29 + StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 + _6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 + _5 = const foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 // ty::Const // + ty: unsafe fn(*mut usize) -> u32 {foo} // + val: Value(Scalar()) @@ -70,28 +70,28 @@ fn main() -> () { } bb1: { - StorageDead(_6); // bb1[0]: scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27 - StorageLive(_7); // bb1[1]: scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 - _7 = _2; // bb1[2]: scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 - _8 = Len(_1); // bb1[3]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 - _9 = Lt(_7, _8); // bb1[4]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 - assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // bb1[5]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 + StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27 + StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 + _7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 + _8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 + _9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 + assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 } bb2: { - _1[_7] = move _5; // bb2[0]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29 - StorageDead(_5); // bb2[1]: scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29 - StorageDead(_7); // bb2[2]: scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30 - _0 = const (); // bb2[3]: scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2 + _1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29 + StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29 + StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30 + _0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/array-index-is-temporary.rs:12:11: 17:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_3); // bb2[4]: scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2 - StorageDead(_2); // bb2[5]: scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2 - StorageDead(_1); // bb2[6]: scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2 - return; // bb2[7]: scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2 + StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2 + StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2 + StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2 + return; // scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir index c75acef2a27b0..05d9b3b9b6f77 100644 --- a/src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir @@ -24,8 +24,8 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 - _1 = [const 42u32, const 43u32, const 44u32]; // bb0[1]: scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 + StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 + _1 = [const 42u32, const 43u32, const 44u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) @@ -44,23 +44,23 @@ fn main() -> () { // mir::Constant // + span: $DIR/array-index-is-temporary.rs:13:26: 13:28 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 - _2 = const 1usize; // bb0[3]: scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18 + StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 + _2 = const 1usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $DIR/array-index-is-temporary.rs:14:17: 14:18 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - StorageLive(_3); // bb0[4]: scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10 - StorageLive(_4); // bb0[5]: scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 - _4 = &mut _2; // bb0[6]: scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 - _3 = &raw mut (*_4); // bb0[7]: scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 - StorageDead(_4); // bb0[8]: scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32 - StorageLive(_5); // bb0[9]: scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29 - StorageLive(_6); // bb0[10]: scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 - _6 = _3; // bb0[11]: scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 - _5 = const foo(move _6) -> bb1; // bb0[12]: scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 + StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10 + StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 + _4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 + _3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 + StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32 + StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29 + StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 + _6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 + _5 = const foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 // ty::Const // + ty: unsafe fn(*mut usize) -> u32 {foo} // + val: Value(Scalar()) @@ -70,28 +70,28 @@ fn main() -> () { } bb1: { - StorageDead(_6); // bb1[0]: scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27 - StorageLive(_7); // bb1[1]: scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 - _7 = _2; // bb1[2]: scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 - _8 = Len(_1); // bb1[3]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 - _9 = Lt(_7, _8); // bb1[4]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 - assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // bb1[5]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 + StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27 + StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 + _7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 + _8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 + _9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 + assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 } bb2: { - _1[_7] = move _5; // bb2[0]: scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29 - StorageDead(_5); // bb2[1]: scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29 - StorageDead(_7); // bb2[2]: scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30 - _0 = const (); // bb2[3]: scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2 + _1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29 + StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29 + StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30 + _0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/array-index-is-temporary.rs:12:11: 17:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_3); // bb2[4]: scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2 - StorageDead(_2); // bb2[5]: scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2 - StorageDead(_1); // bb2[6]: scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2 - return; // bb2[7]: scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2 + StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2 + StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2 + StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2 + return; // scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir index 86ee1be6f7404..de423cd907afe 100644 --- a/src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir @@ -26,71 +26,71 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/basic_assignment.rs:11:9: 11:17 - _1 = const false; // bb0[1]: scope 0 at $DIR/basic_assignment.rs:11:20: 11:25 + StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17 + _1 = const false; // scope 0 at $DIR/basic_assignment.rs:11:20: 11:25 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/basic_assignment.rs:11:20: 11:25 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/basic_assignment.rs:11:9: 11:17 - StorageLive(_2); // bb0[3]: scope 1 at $DIR/basic_assignment.rs:12:9: 12:17 - StorageLive(_3); // bb0[4]: scope 2 at $DIR/basic_assignment.rs:16:16: 16:24 - _3 = _1; // bb0[5]: scope 2 at $DIR/basic_assignment.rs:16:16: 16:24 - _2 = move _3; // bb0[6]: scope 2 at $DIR/basic_assignment.rs:16:5: 16:24 - StorageDead(_3); // bb0[7]: scope 2 at $DIR/basic_assignment.rs:16:23: 16:24 - StorageLive(_4); // bb0[8]: scope 2 at $DIR/basic_assignment.rs:18:9: 18:15 - _4 = std::option::Option::>::None; // bb0[9]: scope 2 at $DIR/basic_assignment.rs:18:36: 18:40 - FakeRead(ForLet, _4); // bb0[10]: scope 2 at $DIR/basic_assignment.rs:18:9: 18:15 - AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] }); // bb0[11]: scope 2 at $DIR/basic_assignment.rs:18:17: 18:33 - StorageLive(_5); // bb0[12]: scope 3 at $DIR/basic_assignment.rs:19:9: 19:15 - StorageLive(_6); // bb0[13]: scope 4 at $DIR/basic_assignment.rs:23:14: 23:20 - _6 = move _4; // bb0[14]: scope 4 at $DIR/basic_assignment.rs:23:14: 23:20 - replace(_5 <- move _6) -> [return: bb2, unwind: bb5]; // bb0[15]: scope 4 at $DIR/basic_assignment.rs:23:5: 23:11 + FakeRead(ForLet, _1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17 + StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:12:9: 12:17 + StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:16:16: 16:24 + _3 = _1; // scope 2 at $DIR/basic_assignment.rs:16:16: 16:24 + _2 = move _3; // scope 2 at $DIR/basic_assignment.rs:16:5: 16:24 + StorageDead(_3); // scope 2 at $DIR/basic_assignment.rs:16:23: 16:24 + StorageLive(_4); // scope 2 at $DIR/basic_assignment.rs:18:9: 18:15 + _4 = std::option::Option::>::None; // scope 2 at $DIR/basic_assignment.rs:18:36: 18:40 + FakeRead(ForLet, _4); // scope 2 at $DIR/basic_assignment.rs:18:9: 18:15 + AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/basic_assignment.rs:18:17: 18:33 + StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:19:9: 19:15 + StorageLive(_6); // scope 4 at $DIR/basic_assignment.rs:23:14: 23:20 + _6 = move _4; // scope 4 at $DIR/basic_assignment.rs:23:14: 23:20 + replace(_5 <- move _6) -> [return: bb2, unwind: bb5]; // scope 4 at $DIR/basic_assignment.rs:23:5: 23:11 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/basic_assignment.rs:10:1: 24:2 + resume; // scope 0 at $DIR/basic_assignment.rs:10:1: 24:2 } bb2: { - drop(_6) -> [return: bb6, unwind: bb4]; // bb2[0]: scope 4 at $DIR/basic_assignment.rs:23:19: 23:20 + drop(_6) -> [return: bb6, unwind: bb4]; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20 } bb3 (cleanup): { - drop(_4) -> bb1; // bb3[0]: scope 2 at $DIR/basic_assignment.rs:24:1: 24:2 + drop(_4) -> bb1; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2 } bb4 (cleanup): { - drop(_5) -> bb3; // bb4[0]: scope 3 at $DIR/basic_assignment.rs:24:1: 24:2 + drop(_5) -> bb3; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2 } bb5 (cleanup): { - drop(_6) -> bb4; // bb5[0]: scope 4 at $DIR/basic_assignment.rs:23:19: 23:20 + drop(_6) -> bb4; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20 } bb6: { - StorageDead(_6); // bb6[0]: scope 4 at $DIR/basic_assignment.rs:23:19: 23:20 - _0 = const (); // bb6[1]: scope 0 at $DIR/basic_assignment.rs:10:11: 24:2 + StorageDead(_6); // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20 + _0 = const (); // scope 0 at $DIR/basic_assignment.rs:10:11: 24:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/basic_assignment.rs:10:11: 24:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_5) -> [return: bb7, unwind: bb3]; // bb6[2]: scope 3 at $DIR/basic_assignment.rs:24:1: 24:2 + drop(_5) -> [return: bb7, unwind: bb3]; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2 } bb7: { - StorageDead(_5); // bb7[0]: scope 3 at $DIR/basic_assignment.rs:24:1: 24:2 - drop(_4) -> [return: bb8, unwind: bb1]; // bb7[1]: scope 2 at $DIR/basic_assignment.rs:24:1: 24:2 + StorageDead(_5); // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2 + drop(_4) -> [return: bb8, unwind: bb1]; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2 } bb8: { - StorageDead(_4); // bb8[0]: scope 2 at $DIR/basic_assignment.rs:24:1: 24:2 - StorageDead(_2); // bb8[1]: scope 1 at $DIR/basic_assignment.rs:24:1: 24:2 - StorageDead(_1); // bb8[2]: scope 0 at $DIR/basic_assignment.rs:24:1: 24:2 - return; // bb8[3]: scope 0 at $DIR/basic_assignment.rs:24:2: 24:2 + StorageDead(_4); // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2 + StorageDead(_2); // scope 1 at $DIR/basic_assignment.rs:24:1: 24:2 + StorageDead(_1); // scope 0 at $DIR/basic_assignment.rs:24:1: 24:2 + return; // scope 0 at $DIR/basic_assignment.rs:24:2: 24:2 } } diff --git a/src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir b/src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir index aef0da9d6f098..259501c7de951 100644 --- a/src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir +++ b/src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir @@ -11,10 +11,10 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/box_expr.rs:7:9: 7:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/box_expr.rs:7:13: 7:25 - _2 = Box(S); // bb0[2]: scope 0 at $DIR/box_expr.rs:7:13: 7:25 - (*_2) = const S::new() -> [return: bb2, unwind: bb3]; // bb0[3]: scope 0 at $DIR/box_expr.rs:7:17: 7:25 + StorageLive(_1); // scope 0 at $DIR/box_expr.rs:7:9: 7:10 + StorageLive(_2); // scope 0 at $DIR/box_expr.rs:7:13: 7:25 + _2 = Box(S); // scope 0 at $DIR/box_expr.rs:7:13: 7:25 + (*_2) = const S::new() -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25 // ty::Const // + ty: fn() -> S {S::new} // + val: Value(Scalar()) @@ -24,24 +24,24 @@ fn main() -> () { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/box_expr.rs:6:1: 9:2 + resume; // scope 0 at $DIR/box_expr.rs:6:1: 9:2 } bb2: { - _1 = move _2; // bb2[0]: scope 0 at $DIR/box_expr.rs:7:13: 7:25 - drop(_2) -> bb4; // bb2[1]: scope 0 at $DIR/box_expr.rs:7:24: 7:25 + _1 = move _2; // scope 0 at $DIR/box_expr.rs:7:13: 7:25 + drop(_2) -> bb4; // scope 0 at $DIR/box_expr.rs:7:24: 7:25 } bb3 (cleanup): { - drop(_2) -> bb1; // bb3[0]: scope 0 at $DIR/box_expr.rs:7:24: 7:25 + drop(_2) -> bb1; // scope 0 at $DIR/box_expr.rs:7:24: 7:25 } bb4: { - StorageDead(_2); // bb4[0]: scope 0 at $DIR/box_expr.rs:7:24: 7:25 - StorageLive(_3); // bb4[1]: scope 1 at $DIR/box_expr.rs:8:5: 8:12 - StorageLive(_4); // bb4[2]: scope 1 at $DIR/box_expr.rs:8:10: 8:11 - _4 = move _1; // bb4[3]: scope 1 at $DIR/box_expr.rs:8:10: 8:11 - _3 = const std::mem::drop::>(move _4) -> [return: bb5, unwind: bb7]; // bb4[4]: scope 1 at $DIR/box_expr.rs:8:5: 8:12 + StorageDead(_2); // scope 0 at $DIR/box_expr.rs:7:24: 7:25 + StorageLive(_3); // scope 1 at $DIR/box_expr.rs:8:5: 8:12 + StorageLive(_4); // scope 1 at $DIR/box_expr.rs:8:10: 8:11 + _4 = move _1; // scope 1 at $DIR/box_expr.rs:8:10: 8:11 + _3 = const std::mem::drop::>(move _4) -> [return: bb5, unwind: bb7]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12 // ty::Const // + ty: fn(std::boxed::Box) {std::mem::drop::>} // + val: Value(Scalar()) @@ -51,28 +51,28 @@ fn main() -> () { } bb5: { - StorageDead(_4); // bb5[0]: scope 1 at $DIR/box_expr.rs:8:11: 8:12 - StorageDead(_3); // bb5[1]: scope 1 at $DIR/box_expr.rs:8:12: 8:13 - _0 = const (); // bb5[2]: scope 0 at $DIR/box_expr.rs:6:11: 9:2 + StorageDead(_4); // scope 1 at $DIR/box_expr.rs:8:11: 8:12 + StorageDead(_3); // scope 1 at $DIR/box_expr.rs:8:12: 8:13 + _0 = const (); // scope 0 at $DIR/box_expr.rs:6:11: 9:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/box_expr.rs:6:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_1) -> bb8; // bb5[3]: scope 0 at $DIR/box_expr.rs:9:1: 9:2 + drop(_1) -> bb8; // scope 0 at $DIR/box_expr.rs:9:1: 9:2 } bb6 (cleanup): { - drop(_1) -> bb1; // bb6[0]: scope 0 at $DIR/box_expr.rs:9:1: 9:2 + drop(_1) -> bb1; // scope 0 at $DIR/box_expr.rs:9:1: 9:2 } bb7 (cleanup): { - drop(_4) -> bb6; // bb7[0]: scope 1 at $DIR/box_expr.rs:8:11: 8:12 + drop(_4) -> bb6; // scope 1 at $DIR/box_expr.rs:8:11: 8:12 } bb8: { - StorageDead(_1); // bb8[0]: scope 0 at $DIR/box_expr.rs:9:1: 9:2 - return; // bb8[1]: scope 0 at $DIR/box_expr.rs:9:2: 9:2 + StorageDead(_1); // scope 0 at $DIR/box_expr.rs:9:1: 9:2 + return; // scope 0 at $DIR/box_expr.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir index 4477b8a3f0d54..b8ecaf787fe72 100644 --- a/src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir @@ -12,16 +12,16 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/byte_slice.rs:5:9: 5:10 - _1 = const b"foo"; // bb0[1]: scope 0 at $DIR/byte_slice.rs:5:13: 5:19 + StorageLive(_1); // scope 0 at $DIR/byte_slice.rs:5:9: 5:10 + _1 = const b"foo"; // scope 0 at $DIR/byte_slice.rs:5:13: 5:19 // ty::Const // + ty: &[u8; 3] // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/byte_slice.rs:5:13: 5:19 // + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc0+0x0)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/byte_slice.rs:6:9: 6:10 - _2 = [const 5u8, const 120u8]; // bb0[3]: scope 1 at $DIR/byte_slice.rs:6:13: 6:24 + StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:6:9: 6:10 + _2 = [const 5u8, const 120u8]; // scope 1 at $DIR/byte_slice.rs:6:13: 6:24 // ty::Const // + ty: u8 // + val: Value(Scalar(0x05)) @@ -34,16 +34,16 @@ fn main() -> () { // mir::Constant // + span: $DIR/byte_slice.rs:6:19: 6:23 // + literal: Const { ty: u8, val: Value(Scalar(0x78)) } - _0 = const (); // bb0[4]: scope 0 at $DIR/byte_slice.rs:4:11: 7:2 + _0 = const (); // scope 0 at $DIR/byte_slice.rs:4:11: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/byte_slice.rs:4:11: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb0[5]: scope 1 at $DIR/byte_slice.rs:7:1: 7:2 - StorageDead(_1); // bb0[6]: scope 0 at $DIR/byte_slice.rs:7:1: 7:2 - return; // bb0[7]: scope 0 at $DIR/byte_slice.rs:7:2: 7:2 + StorageDead(_2); // scope 1 at $DIR/byte_slice.rs:7:1: 7:2 + StorageDead(_1); // scope 0 at $DIR/byte_slice.rs:7:1: 7:2 + return; // scope 0 at $DIR/byte_slice.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff b/src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff index 1deeee0f61239..e11619cf0cd0e 100644 --- a/src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff +++ b/src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff @@ -26,76 +26,76 @@ } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/combine_array_len.rs:5:9: 5:10 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 - _3 = const 0usize; // bb0[2]: scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 + StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10 + StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 + _3 = const 0usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/combine_array_len.rs:5:15: 5:16 // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } -- _4 = Len(_1); // bb0[3]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 -+ _4 = const 2usize; // bb0[3]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 +- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 ++ _4 = const 2usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + // ty::Const + // + ty: usize + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/combine_array_len.rs:5:13: 5:17 + // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } - _5 = Lt(_3, _4); // bb0[4]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 - assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // bb0[5]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + _5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 } bb1: { - _2 = _1[_3]; // bb1[0]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 - StorageDead(_3); // bb1[1]: scope 0 at $DIR/combine_array_len.rs:5:17: 5:18 - StorageLive(_6); // bb1[2]: scope 1 at $DIR/combine_array_len.rs:6:9: 6:10 - StorageLive(_7); // bb1[3]: scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 - _7 = const 1usize; // bb1[4]: scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 + _2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:5:17: 5:18 + StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10 + StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 + _7 = const 1usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/combine_array_len.rs:6:15: 6:16 // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } -- _8 = Len(_1); // bb1[5]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 -+ _8 = const 2usize; // bb1[5]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 +- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 ++ _8 = const 2usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + // ty::Const + // + ty: usize + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/combine_array_len.rs:6:13: 6:17 + // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } - _9 = Lt(_7, _8); // bb1[6]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 - assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // bb1[7]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + _9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 } bb2: { - _6 = _1[_7]; // bb2[0]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 - StorageDead(_7); // bb2[1]: scope 1 at $DIR/combine_array_len.rs:6:17: 6:18 - StorageLive(_10); // bb2[2]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 - StorageLive(_11); // bb2[3]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 - _11 = _2; // bb2[4]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 - StorageLive(_12); // bb2[5]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - _12 = _2; // bb2[6]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - _10 = Mul(move _11, move _12); // bb2[7]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 - StorageDead(_12); // bb2[8]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - StorageDead(_11); // bb2[9]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - StorageLive(_13); // bb2[10]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 - StorageLive(_14); // bb2[11]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 - _14 = _6; // bb2[12]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 - StorageLive(_15); // bb2[13]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - _15 = _6; // bb2[14]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - _13 = Mul(move _14, move _15); // bb2[15]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 - StorageDead(_15); // bb2[16]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - StorageDead(_14); // bb2[17]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - _0 = Add(move _10, move _13); // bb2[18]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:14 - StorageDead(_13); // bb2[19]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - StorageDead(_10); // bb2[20]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - StorageDead(_6); // bb2[21]: scope 1 at $DIR/combine_array_len.rs:8:1: 8:2 - StorageDead(_2); // bb2[22]: scope 0 at $DIR/combine_array_len.rs:8:1: 8:2 - return; // bb2[23]: scope 0 at $DIR/combine_array_len.rs:8:2: 8:2 + _6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:6:17: 6:18 + StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 + StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 + _11 = _2; // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 + StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + _12 = _2; // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + _10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 + StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 + StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 + _14 = _6; // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 + StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + _15 = _6; // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + _13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 + StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + _0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:14 + StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:8:1: 8:2 + StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:8:1: 8:2 + return; // scope 0 at $DIR/combine_array_len.rs:8:2: 8:2 } } diff --git a/src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff b/src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff index 7120829e2b54a..050cfe359a175 100644 --- a/src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff +++ b/src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff @@ -26,76 +26,76 @@ } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/combine_array_len.rs:5:9: 5:10 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 - _3 = const 0usize; // bb0[2]: scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 + StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10 + StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 + _3 = const 0usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000000)) // mir::Constant // + span: $DIR/combine_array_len.rs:5:15: 5:16 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } -- _4 = Len(_1); // bb0[3]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 -+ _4 = const 2usize; // bb0[3]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 +- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 ++ _4 = const 2usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + // ty::Const + // + ty: usize + // + val: Value(Scalar(0x0000000000000002)) + // mir::Constant + // + span: $DIR/combine_array_len.rs:5:13: 5:17 + // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } - _5 = Lt(_3, _4); // bb0[4]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 - assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // bb0[5]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + _5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 } bb1: { - _2 = _1[_3]; // bb1[0]: scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 - StorageDead(_3); // bb1[1]: scope 0 at $DIR/combine_array_len.rs:5:17: 5:18 - StorageLive(_6); // bb1[2]: scope 1 at $DIR/combine_array_len.rs:6:9: 6:10 - StorageLive(_7); // bb1[3]: scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 - _7 = const 1usize; // bb1[4]: scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 + _2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:5:17: 5:18 + StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10 + StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 + _7 = const 1usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $DIR/combine_array_len.rs:6:15: 6:16 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } -- _8 = Len(_1); // bb1[5]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 -+ _8 = const 2usize; // bb1[5]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 +- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 ++ _8 = const 2usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + // ty::Const + // + ty: usize + // + val: Value(Scalar(0x0000000000000002)) + // mir::Constant + // + span: $DIR/combine_array_len.rs:6:13: 6:17 + // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } - _9 = Lt(_7, _8); // bb1[6]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 - assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // bb1[7]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + _9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 } bb2: { - _6 = _1[_7]; // bb2[0]: scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 - StorageDead(_7); // bb2[1]: scope 1 at $DIR/combine_array_len.rs:6:17: 6:18 - StorageLive(_10); // bb2[2]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 - StorageLive(_11); // bb2[3]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 - _11 = _2; // bb2[4]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 - StorageLive(_12); // bb2[5]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - _12 = _2; // bb2[6]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - _10 = Mul(move _11, move _12); // bb2[7]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 - StorageDead(_12); // bb2[8]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - StorageDead(_11); // bb2[9]: scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 - StorageLive(_13); // bb2[10]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 - StorageLive(_14); // bb2[11]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 - _14 = _6; // bb2[12]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 - StorageLive(_15); // bb2[13]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - _15 = _6; // bb2[14]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - _13 = Mul(move _14, move _15); // bb2[15]: scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 - StorageDead(_15); // bb2[16]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - StorageDead(_14); // bb2[17]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - _0 = Add(move _10, move _13); // bb2[18]: scope 2 at $DIR/combine_array_len.rs:7:5: 7:14 - StorageDead(_13); // bb2[19]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - StorageDead(_10); // bb2[20]: scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 - StorageDead(_6); // bb2[21]: scope 1 at $DIR/combine_array_len.rs:8:1: 8:2 - StorageDead(_2); // bb2[22]: scope 0 at $DIR/combine_array_len.rs:8:1: 8:2 - return; // bb2[23]: scope 0 at $DIR/combine_array_len.rs:8:2: 8:2 + _6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:6:17: 6:18 + StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 + StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 + _11 = _2; // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6 + StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + _12 = _2; // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + _10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8 + StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8 + StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 + StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 + _14 = _6; // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12 + StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + _15 = _6; // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + _13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14 + StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + _0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:14 + StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14 + StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:8:1: 8:2 + StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:8:1: 8:2 + return; // scope 0 at $DIR/combine_array_len.rs:8:2: 8:2 } } diff --git a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir index c8456dbbd6165..d202531c7ab63 100644 --- a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir +++ b/src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir @@ -7,17 +7,17 @@ promoted[0] in BAR: &[&i32; 1] = { let mut _3: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 bb0: { - _3 = const {alloc0+0x0: &i32}; // bb0[0]: scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 + _3 = const {alloc0+0x0: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 // ty::Const // + ty: &i32 // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34 // + literal: Const { ty: &i32, val: Value(Scalar(alloc0+0x0)) } - _2 = _3; // bb0[1]: scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34 - _1 = [move _2]; // bb0[2]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 - _0 = &_1; // bb0[3]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 - return; // bb0[4]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + _2 = _3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34 + _1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + _0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 } } diff --git a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff b/src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff index dc71961d4e318..5b98830c62903 100644 --- a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff +++ b/src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff @@ -11,13 +11,13 @@ + let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -- StorageLive(_3); // bb0[2]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -- StorageLive(_4); // bb0[3]: scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34 -- StorageLive(_5); // bb0[4]: scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 -- _5 = const {alloc0+0x0: &i32}; // bb0[5]: scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 -+ _6 = const BAR::promoted[0]; // bb0[2]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 +- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 +- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34 +- StorageLive(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 +- _5 = const {alloc0+0x0: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34 ++ _6 = const BAR::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 // ty::Const - // + ty: &i32 - // + val: Value(Scalar(alloc0+0x0)) @@ -26,16 +26,14 @@ // mir::Constant - // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34 - // + literal: Const { ty: &i32, val: Value(Scalar(alloc0+0x0)) } -- _4 = &(*_5); // bb0[6]: scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34 -- _3 = [move _4]; // bb0[7]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -- _2 = &_3; // bb0[8]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -- _1 = move _2 as &[&i32] (Pointer(Unsize)); // bb0[9]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -- _0 = const core::slice::::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // bb0[10]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44 +- _4 = &(*_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34 +- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 +- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:35 + // + literal: Const { ty: &[&i32; 1], val: Unevaluated(DefId(0:6 ~ const_promotion_extern_static[317d]::BAR[0]), [], Some(promoted[0])) } -+ _2 = &(*_6); // bb0[3]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -+ _1 = move _2 as &[&i32] (Pointer(Unsize)); // bb0[4]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 -+ _0 = const core::slice::::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // bb0[5]: scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44 ++ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + _1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35 + _0 = const core::slice::::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44 // ty::Const // + ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::::as_ptr} // + val: Value(Scalar()) @@ -45,14 +43,13 @@ } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45 + resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45 } bb2: { -- StorageDead(_5); // bb2[0]: scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44 -- StorageDead(_3); // bb2[1]: scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44 -- return; // bb2[2]: scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45 -+ return; // bb2[0]: scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45 +- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44 +- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44 + return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:45 } - } - diff --git a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir index 7a1a95b448a9e..b49c1aaa86669 100644 --- a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir +++ b/src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir @@ -9,17 +9,17 @@ promoted[0] in FOO: &[&i32; 1] = { } bb0: { - _3 = const {alloc2+0x0: &i32}; // bb0[0]: scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 + _3 = const {alloc2+0x0: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 // ty::Const // + ty: &i32 // + val: Value(Scalar(alloc2+0x0)) // mir::Constant // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43 // + literal: Const { ty: &i32, val: Value(Scalar(alloc2+0x0)) } - _2 = _3; // bb0[1]: scope 0 at $DIR/const-promotion-extern-static.rs:13:41: 13:43 - _1 = [move _2]; // bb0[2]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 - _0 = &_1; // bb0[3]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 - return; // bb0[4]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + _2 = _3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:41: 13:43 + _1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + _0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 } } diff --git a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff b/src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff index 18623743382f8..0724575b9d23b 100644 --- a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff +++ b/src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff @@ -13,13 +13,13 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -- StorageLive(_3); // bb0[2]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -- StorageLive(_4); // bb0[3]: scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45 -- StorageLive(_5); // bb0[4]: scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 -- _5 = const {alloc2+0x0: &i32}; // bb0[5]: scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 -+ _6 = const FOO::promoted[0]; // bb0[2]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 +- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 +- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45 +- StorageLive(_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 +- _5 = const {alloc2+0x0: &i32}; // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43 ++ _6 = const FOO::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 // ty::Const - // + ty: &i32 - // + val: Value(Scalar(alloc2+0x0)) @@ -28,16 +28,14 @@ // mir::Constant - // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43 - // + literal: Const { ty: &i32, val: Value(Scalar(alloc2+0x0)) } -- _4 = &(*_5); // bb0[6]: scope 1 at $DIR/const-promotion-extern-static.rs:13:41: 13:43 -- _3 = [move _4]; // bb0[7]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -- _2 = &_3; // bb0[8]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -- _1 = move _2 as &[&i32] (Pointer(Unsize)); // bb0[9]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -- _0 = const core::slice::::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // bb0[10]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55 +- _4 = &(*_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:41: 13:43 +- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 +- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:46 + // + literal: Const { ty: &[&i32; 1], val: Unevaluated(DefId(0:7 ~ const_promotion_extern_static[317d]::FOO[0]), [], Some(promoted[0])) } -+ _2 = &(*_6); // bb0[3]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -+ _1 = move _2 as &[&i32] (Pointer(Unsize)); // bb0[4]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 -+ _0 = const core::slice::::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // bb0[5]: scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55 ++ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + _1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46 + _0 = const core::slice::::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55 // ty::Const // + ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::::as_ptr} // + val: Value(Scalar()) @@ -47,14 +45,13 @@ } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56 + resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56 } bb2: { -- StorageDead(_5); // bb2[0]: scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55 -- StorageDead(_3); // bb2[1]: scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55 -- return; // bb2[2]: scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56 -+ return; // bb2[0]: scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56 +- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55 +- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55 + return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:56 } } - diff --git a/src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir index 5249a63a8f2f5..3883bba42a3ab 100644 --- a/src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir +++ b/src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir @@ -6,26 +6,26 @@ fn main() -> () { let mut _2: &&[(std::option::Option, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:8:5: 8:8 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - _2 = const {alloc0+0x0: &&[(std::option::Option, &[&str])]}; // bb0[2]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + _2 = const {alloc0+0x0: &&[(std::option::Option, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 // ty::Const // + ty: &&[(std::option::Option, &[&str])] // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const_allocation.rs:8:5: 8:8 // + literal: Const { ty: &&[(std::option::Option, &[&str])], val: Value(Scalar(alloc0+0x0)) } - _1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation.rs:8:8: 8:9 - StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation.rs:8:8: 8:9 - _0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation.rs:7:11: 9:2 + _1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9 + StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9 + _0 = const (); // scope 0 at $DIR/const_allocation.rs:7:11: 9:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_allocation.rs:7:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[7]: scope 0 at $DIR/const_allocation.rs:9:2: 9:2 + return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir index 66a6c10430a12..54a6483f4696e 100644 --- a/src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir +++ b/src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir @@ -6,26 +6,26 @@ fn main() -> () { let mut _2: &&[(std::option::Option, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:8:5: 8:8 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - _2 = const {alloc0+0x0: &&[(std::option::Option, &[&str])]}; // bb0[2]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + _2 = const {alloc0+0x0: &&[(std::option::Option, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 // ty::Const // + ty: &&[(std::option::Option, &[&str])] // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const_allocation.rs:8:5: 8:8 // + literal: Const { ty: &&[(std::option::Option, &[&str])], val: Value(Scalar(alloc0+0x0)) } - _1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation.rs:8:8: 8:9 - StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation.rs:8:8: 8:9 - _0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation.rs:7:11: 9:2 + _1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9 + StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9 + _0 = const (); // scope 0 at $DIR/const_allocation.rs:7:11: 9:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_allocation.rs:7:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[7]: scope 0 at $DIR/const_allocation.rs:9:2: 9:2 + return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir index 0db9fdcee811a..e11a2090c5a8a 100644 --- a/src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir +++ b/src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir @@ -6,26 +6,26 @@ fn main() -> () { let mut _2: &&[(std::option::Option, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - _2 = const {alloc0+0x0: &&[(std::option::Option, &[&u8])]}; // bb0[2]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + _2 = const {alloc0+0x0: &&[(std::option::Option, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 // ty::Const // + ty: &&[(std::option::Option, &[&u8])] // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const_allocation2.rs:5:5: 5:8 // + literal: Const { ty: &&[(std::option::Option, &[&u8])], val: Value(Scalar(alloc0+0x0)) } - _1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 - StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 - _0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation2.rs:4:11: 6:2 + _1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 + StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 + _0 = const (); // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_allocation2.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[7]: scope 0 at $DIR/const_allocation2.rs:6:2: 6:2 + return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir index 38514fe65b99e..a56534a7690ce 100644 --- a/src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir +++ b/src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir @@ -6,26 +6,26 @@ fn main() -> () { let mut _2: &&[(std::option::Option, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - _2 = const {alloc0+0x0: &&[(std::option::Option, &[&u8])]}; // bb0[2]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + _2 = const {alloc0+0x0: &&[(std::option::Option, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 // ty::Const // + ty: &&[(std::option::Option, &[&u8])] // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const_allocation2.rs:5:5: 5:8 // + literal: Const { ty: &&[(std::option::Option, &[&u8])], val: Value(Scalar(alloc0+0x0)) } - _1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 - StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 - _0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation2.rs:4:11: 6:2 + _1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 + StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9 + _0 = const (); // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_allocation2.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[7]: scope 0 at $DIR/const_allocation2.rs:6:2: 6:2 + return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir index b7fda5dedbfc1..e69ff17149b24 100644 --- a/src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir +++ b/src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir @@ -6,26 +6,26 @@ fn main() -> () { let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 - _2 = const {alloc0+0x0: &&Packed}; // bb0[2]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + _2 = const {alloc0+0x0: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 // ty::Const // + ty: &&Packed // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const_allocation3.rs:5:5: 5:8 // + literal: Const { ty: &&Packed, val: Value(Scalar(alloc0+0x0)) } - _1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 - StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 - _0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation3.rs:4:11: 6:2 + _1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 + StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 + _0 = const (); // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_allocation3.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[7]: scope 0 at $DIR/const_allocation3.rs:6:2: 6:2 + return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir index 60caef9585a84..ad669b25a7935 100644 --- a/src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir +++ b/src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir @@ -6,26 +6,26 @@ fn main() -> () { let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 - _2 = const {alloc0+0x0: &&Packed}; // bb0[2]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + _2 = const {alloc0+0x0: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 // ty::Const // + ty: &&Packed // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/const_allocation3.rs:5:5: 5:8 // + literal: Const { ty: &&Packed, val: Value(Scalar(alloc0+0x0)) } - _1 = (*_2); // bb0[3]: scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 - StorageDead(_1); // bb0[5]: scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 - _0 = const (); // bb0[6]: scope 0 at $DIR/const_allocation3.rs:4:11: 6:2 + _1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8 + StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 + StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9 + _0 = const (); // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_allocation3.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[7]: scope 0 at $DIR/const_allocation3.rs:6:2: 6:2 + return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff index 50e6cfc37eea3..f4b6c7db444e5 100644 --- a/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff @@ -11,10 +11,10 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/aggregate.rs:5:9: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/aggregate.rs:5:13: 5:24 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/aggregate.rs:5:13: 5:22 - _3 = (const 0i32, const 1i32, const 2i32); // bb0[3]: scope 0 at $DIR/aggregate.rs:5:13: 5:22 + StorageLive(_1); // scope 0 at $DIR/aggregate.rs:5:9: 5:10 + StorageLive(_2); // scope 0 at $DIR/aggregate.rs:5:13: 5:24 + StorageLive(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22 + _3 = (const 0i32, const 1i32, const 2i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:22 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) @@ -33,9 +33,9 @@ // mir::Constant // + span: $DIR/aggregate.rs:5:20: 5:21 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } -- _2 = (_3.1: i32); // bb0[4]: scope 0 at $DIR/aggregate.rs:5:13: 5:24 -- _1 = Add(move _2, const 0i32); // bb0[5]: scope 0 at $DIR/aggregate.rs:5:13: 5:28 -+ _2 = const 1i32; // bb0[4]: scope 0 at $DIR/aggregate.rs:5:13: 5:24 +- _2 = (_3.1: i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:24 +- _1 = Add(move _2, const 0i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:28 ++ _2 = const 1i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:24 // ty::Const // + ty: i32 - // + val: Value(Scalar(0x00000000)) @@ -45,24 +45,24 @@ - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } + // + span: $DIR/aggregate.rs:5:13: 5:24 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ _1 = const 1i32; // bb0[5]: scope 0 at $DIR/aggregate.rs:5:13: 5:28 ++ _1 = const 1i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:28 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000001)) + // mir::Constant + // + span: $DIR/aggregate.rs:5:13: 5:28 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - StorageDead(_2); // bb0[6]: scope 0 at $DIR/aggregate.rs:5:27: 5:28 - StorageDead(_3); // bb0[7]: scope 0 at $DIR/aggregate.rs:5:28: 5:29 - _0 = const (); // bb0[8]: scope 0 at $DIR/aggregate.rs:4:11: 6:2 + StorageDead(_2); // scope 0 at $DIR/aggregate.rs:5:27: 5:28 + StorageDead(_3); // scope 0 at $DIR/aggregate.rs:5:28: 5:29 + _0 = const (); // scope 0 at $DIR/aggregate.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/aggregate.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb0[9]: scope 0 at $DIR/aggregate.rs:6:1: 6:2 - return; // bb0[10]: scope 0 at $DIR/aggregate.rs:6:2: 6:2 + StorageDead(_1); // scope 0 at $DIR/aggregate.rs:6:1: 6:2 + return; // scope 0 at $DIR/aggregate.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff index 474d50100b03a..e24751d39a7df 100644 --- a/src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff @@ -13,9 +13,9 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/array_index.rs:5:9: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/array_index.rs:5:18: 5:30 - _2 = [const 0u32, const 1u32, const 2u32, const 3u32]; // bb0[2]: scope 0 at $DIR/array_index.rs:5:18: 5:30 + StorageLive(_1); // scope 0 at $DIR/array_index.rs:5:9: 5:10 + StorageLive(_2); // scope 0 at $DIR/array_index.rs:5:18: 5:30 + _2 = [const 0u32, const 1u32, const 2u32, const 3u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -40,31 +40,31 @@ // mir::Constant // + span: $DIR/array_index.rs:5:28: 5:29 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_3); // bb0[3]: scope 0 at $DIR/array_index.rs:5:31: 5:32 - _3 = const 2usize; // bb0[4]: scope 0 at $DIR/array_index.rs:5:31: 5:32 + StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32 + _3 = const 2usize; // scope 0 at $DIR/array_index.rs:5:31: 5:32 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/array_index.rs:5:31: 5:32 // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } - _4 = const 4usize; // bb0[5]: scope 0 at $DIR/array_index.rs:5:18: 5:33 + _4 = const 4usize; // scope 0 at $DIR/array_index.rs:5:18: 5:33 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000004)) // mir::Constant // + span: $DIR/array_index.rs:5:18: 5:33 // + literal: Const { ty: usize, val: Value(Scalar(0x00000004)) } -- _5 = Lt(_3, _4); // bb0[6]: scope 0 at $DIR/array_index.rs:5:18: 5:33 -- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // bb0[7]: scope 0 at $DIR/array_index.rs:5:18: 5:33 -+ _5 = const true; // bb0[6]: scope 0 at $DIR/array_index.rs:5:18: 5:33 +- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:5:18: 5:33 +- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33 ++ _5 = const true; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/array_index.rs:5:18: 5:33 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // bb0[7]: scope 0 at $DIR/array_index.rs:5:18: 5:33 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -74,25 +74,25 @@ } bb1: { -- _1 = _2[_3]; // bb1[0]: scope 0 at $DIR/array_index.rs:5:18: 5:33 -+ _1 = const 2u32; // bb1[0]: scope 0 at $DIR/array_index.rs:5:18: 5:33 +- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33 ++ _1 = const 2u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/array_index.rs:5:18: 5:33 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageDead(_3); // bb1[1]: scope 0 at $DIR/array_index.rs:5:33: 5:34 - StorageDead(_2); // bb1[2]: scope 0 at $DIR/array_index.rs:5:33: 5:34 - _0 = const (); // bb1[3]: scope 0 at $DIR/array_index.rs:4:11: 6:2 + StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34 + StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34 + _0 = const (); // scope 0 at $DIR/array_index.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/array_index.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[4]: scope 0 at $DIR/array_index.rs:6:1: 6:2 - return; // bb1[5]: scope 0 at $DIR/array_index.rs:6:2: 6:2 + StorageDead(_1); // scope 0 at $DIR/array_index.rs:6:1: 6:2 + return; // scope 0 at $DIR/array_index.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff index b3d353bd48780..ad9992bb94905 100644 --- a/src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff @@ -13,9 +13,9 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/array_index.rs:5:9: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/array_index.rs:5:18: 5:30 - _2 = [const 0u32, const 1u32, const 2u32, const 3u32]; // bb0[2]: scope 0 at $DIR/array_index.rs:5:18: 5:30 + StorageLive(_1); // scope 0 at $DIR/array_index.rs:5:9: 5:10 + StorageLive(_2); // scope 0 at $DIR/array_index.rs:5:18: 5:30 + _2 = [const 0u32, const 1u32, const 2u32, const 3u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -40,31 +40,31 @@ // mir::Constant // + span: $DIR/array_index.rs:5:28: 5:29 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_3); // bb0[3]: scope 0 at $DIR/array_index.rs:5:31: 5:32 - _3 = const 2usize; // bb0[4]: scope 0 at $DIR/array_index.rs:5:31: 5:32 + StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32 + _3 = const 2usize; // scope 0 at $DIR/array_index.rs:5:31: 5:32 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000002)) // mir::Constant // + span: $DIR/array_index.rs:5:31: 5:32 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } - _4 = const 4usize; // bb0[5]: scope 0 at $DIR/array_index.rs:5:18: 5:33 + _4 = const 4usize; // scope 0 at $DIR/array_index.rs:5:18: 5:33 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000004)) // mir::Constant // + span: $DIR/array_index.rs:5:18: 5:33 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000004)) } -- _5 = Lt(_3, _4); // bb0[6]: scope 0 at $DIR/array_index.rs:5:18: 5:33 -- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // bb0[7]: scope 0 at $DIR/array_index.rs:5:18: 5:33 -+ _5 = const true; // bb0[6]: scope 0 at $DIR/array_index.rs:5:18: 5:33 +- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:5:18: 5:33 +- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33 ++ _5 = const true; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/array_index.rs:5:18: 5:33 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // bb0[7]: scope 0 at $DIR/array_index.rs:5:18: 5:33 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -74,25 +74,25 @@ } bb1: { -- _1 = _2[_3]; // bb1[0]: scope 0 at $DIR/array_index.rs:5:18: 5:33 -+ _1 = const 2u32; // bb1[0]: scope 0 at $DIR/array_index.rs:5:18: 5:33 +- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33 ++ _1 = const 2u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/array_index.rs:5:18: 5:33 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageDead(_3); // bb1[1]: scope 0 at $DIR/array_index.rs:5:33: 5:34 - StorageDead(_2); // bb1[2]: scope 0 at $DIR/array_index.rs:5:33: 5:34 - _0 = const (); // bb1[3]: scope 0 at $DIR/array_index.rs:4:11: 6:2 + StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34 + StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34 + _0 = const (); // scope 0 at $DIR/array_index.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/array_index.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[4]: scope 0 at $DIR/array_index.rs:6:1: 6:2 - return; // bb1[5]: scope 0 at $DIR/array_index.rs:6:2: 6:2 + StorageDead(_1); // scope 0 at $DIR/array_index.rs:6:1: 6:2 + return; // scope 0 at $DIR/array_index.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff index bf5aff0cf4699..16f937f3e7b5e 100644 --- a/src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff @@ -12,47 +12,47 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/boxes.rs:12:9: 12:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/boxes.rs:12:13: 12:22 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/boxes.rs:12:14: 12:22 - StorageLive(_4); // bb0[3]: scope 0 at $DIR/boxes.rs:12:14: 12:22 - _4 = Box(i32); // bb0[4]: scope 0 at $DIR/boxes.rs:12:14: 12:22 - (*_4) = const 42i32; // bb0[5]: scope 0 at $DIR/boxes.rs:12:19: 12:21 + StorageLive(_1); // scope 0 at $DIR/boxes.rs:12:9: 12:10 + StorageLive(_2); // scope 0 at $DIR/boxes.rs:12:13: 12:22 + StorageLive(_3); // scope 0 at $DIR/boxes.rs:12:14: 12:22 + StorageLive(_4); // scope 0 at $DIR/boxes.rs:12:14: 12:22 + _4 = Box(i32); // scope 0 at $DIR/boxes.rs:12:14: 12:22 + (*_4) = const 42i32; // scope 0 at $DIR/boxes.rs:12:19: 12:21 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/boxes.rs:12:19: 12:21 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - _3 = move _4; // bb0[6]: scope 0 at $DIR/boxes.rs:12:14: 12:22 - StorageDead(_4); // bb0[7]: scope 0 at $DIR/boxes.rs:12:21: 12:22 - _2 = (*_3); // bb0[8]: scope 0 at $DIR/boxes.rs:12:13: 12:22 - _1 = Add(move _2, const 0i32); // bb0[9]: scope 0 at $DIR/boxes.rs:12:13: 12:26 + _3 = move _4; // scope 0 at $DIR/boxes.rs:12:14: 12:22 + StorageDead(_4); // scope 0 at $DIR/boxes.rs:12:21: 12:22 + _2 = (*_3); // scope 0 at $DIR/boxes.rs:12:13: 12:22 + _1 = Add(move _2, const 0i32); // scope 0 at $DIR/boxes.rs:12:13: 12:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/boxes.rs:12:25: 12:26 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - StorageDead(_2); // bb0[10]: scope 0 at $DIR/boxes.rs:12:25: 12:26 - drop(_3) -> [return: bb2, unwind: bb1]; // bb0[11]: scope 0 at $DIR/boxes.rs:12:26: 12:27 + StorageDead(_2); // scope 0 at $DIR/boxes.rs:12:25: 12:26 + drop(_3) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/boxes.rs:12:26: 12:27 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/boxes.rs:11:1: 13:2 + resume; // scope 0 at $DIR/boxes.rs:11:1: 13:2 } bb2: { - StorageDead(_3); // bb2[0]: scope 0 at $DIR/boxes.rs:12:26: 12:27 - _0 = const (); // bb2[1]: scope 0 at $DIR/boxes.rs:11:11: 13:2 + StorageDead(_3); // scope 0 at $DIR/boxes.rs:12:26: 12:27 + _0 = const (); // scope 0 at $DIR/boxes.rs:11:11: 13:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/boxes.rs:11:11: 13:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb2[2]: scope 0 at $DIR/boxes.rs:13:1: 13:2 - return; // bb2[3]: scope 0 at $DIR/boxes.rs:13:2: 13:2 + StorageDead(_1); // scope 0 at $DIR/boxes.rs:13:1: 13:2 + return; // scope 0 at $DIR/boxes.rs:13:2: 13:2 } } diff --git a/src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff index ca0a309b1b5df..58c27c5a20f8c 100644 --- a/src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff @@ -13,17 +13,17 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/cast.rs:4:9: 4:10 -- _1 = const 42u8 as u32 (Misc); // bb0[1]: scope 0 at $DIR/cast.rs:4:13: 4:24 -+ _1 = const 42u32; // bb0[1]: scope 0 at $DIR/cast.rs:4:13: 4:24 + StorageLive(_1); // scope 0 at $DIR/cast.rs:4:9: 4:10 +- _1 = const 42u8 as u32 (Misc); // scope 0 at $DIR/cast.rs:4:13: 4:24 ++ _1 = const 42u32; // scope 0 at $DIR/cast.rs:4:13: 4:24 // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x2a)) - // mir::Constant - // + span: $DIR/cast.rs:4:13: 4:17 - // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) } -- StorageLive(_2); // bb0[2]: scope 1 at $DIR/cast.rs:6:9: 6:10 -- _2 = const 42u32 as u8 (Misc); // bb0[3]: scope 1 at $DIR/cast.rs:6:13: 6:24 +- StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10 +- _2 = const 42u32 as u8 (Misc); // scope 1 at $DIR/cast.rs:6:13: 6:24 - // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) @@ -31,24 +31,24 @@ - // + span: $DIR/cast.rs:6:13: 6:18 + // + span: $DIR/cast.rs:4:13: 4:24 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } -+ StorageLive(_2); // bb0[2]: scope 1 at $DIR/cast.rs:6:9: 6:10 -+ _2 = const 42u8; // bb0[3]: scope 1 at $DIR/cast.rs:6:13: 6:24 ++ StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10 ++ _2 = const 42u8; // scope 1 at $DIR/cast.rs:6:13: 6:24 + // ty::Const + // + ty: u8 + // + val: Value(Scalar(0x2a)) + // mir::Constant + // + span: $DIR/cast.rs:6:13: 6:24 + // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) } - _0 = const (); // bb0[4]: scope 0 at $DIR/cast.rs:3:11: 7:2 + _0 = const (); // scope 0 at $DIR/cast.rs:3:11: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/cast.rs:3:11: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb0[5]: scope 1 at $DIR/cast.rs:7:1: 7:2 - StorageDead(_1); // bb0[6]: scope 0 at $DIR/cast.rs:7:1: 7:2 - return; // bb0[7]: scope 0 at $DIR/cast.rs:7:2: 7:2 + StorageDead(_2); // scope 1 at $DIR/cast.rs:7:1: 7:2 + StorageDead(_1); // scope 0 at $DIR/cast.rs:7:1: 7:2 + return; // scope 0 at $DIR/cast.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff index 762927575f0f3..92add8bafdc03 100644 --- a/src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff @@ -10,9 +10,9 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/checked_add.rs:5:9: 5:10 -- _2 = CheckedAdd(const 1u32, const 1u32); // bb0[1]: scope 0 at $DIR/checked_add.rs:5:18: 5:23 -+ _2 = (const 2u32, const false); // bb0[1]: scope 0 at $DIR/checked_add.rs:5:18: 5:23 + StorageLive(_1); // scope 0 at $DIR/checked_add.rs:5:9: 5:10 +- _2 = CheckedAdd(const 1u32, const 1u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 ++ _2 = (const 2u32, const false); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 // ty::Const // + ty: u32 - // + val: Value(Scalar(0x00000001)) @@ -30,10 +30,10 @@ // mir::Constant - // + span: $DIR/checked_add.rs:5:22: 5:23 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } -- assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; // bb0[2]: scope 0 at $DIR/checked_add.rs:5:18: 5:23 +- assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23 + // + span: $DIR/checked_add.rs:5:18: 5:23 + // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ assert(!const false, "attempt to add with overflow") -> bb1; // bb0[2]: scope 0 at $DIR/checked_add.rs:5:18: 5:23 ++ assert(!const false, "attempt to add with overflow") -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x00)) @@ -43,23 +43,23 @@ } bb1: { -- _1 = move (_2.0: u32); // bb1[0]: scope 0 at $DIR/checked_add.rs:5:18: 5:23 -+ _1 = const 2u32; // bb1[0]: scope 0 at $DIR/checked_add.rs:5:18: 5:23 +- _1 = move (_2.0: u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 ++ _1 = const 2u32; // scope 0 at $DIR/checked_add.rs:5:18: 5:23 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/checked_add.rs:5:18: 5:23 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - _0 = const (); // bb1[1]: scope 0 at $DIR/checked_add.rs:4:11: 6:2 + _0 = const (); // scope 0 at $DIR/checked_add.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/checked_add.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[2]: scope 0 at $DIR/checked_add.rs:6:1: 6:2 - return; // bb1[3]: scope 0 at $DIR/checked_add.rs:6:2: 6:2 + StorageDead(_1); // scope 0 at $DIR/checked_add.rs:6:1: 6:2 + return; // scope 0 at $DIR/checked_add.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff index d3a6105a85225..6c5fe7454b4ed 100644 --- a/src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff @@ -13,24 +13,24 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 - _3 = const main::FOO; // bb0[3]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 + StorageLive(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10 + StorageLive(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30 + StorageLive(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 + _3 = const main::FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 // ty::Const // + ty: &i32 // + val: Unevaluated(DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), [], None) // mir::Constant // + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), [], None) } - _2 = &raw const (*_3); // bb0[4]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 - _1 = move _2 as usize (Misc); // bb0[5]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39 - StorageDead(_2); // bb0[6]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39 - StorageDead(_3); // bb0[7]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:39: 7:40 - StorageLive(_4); // bb0[8]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12 - StorageLive(_5); // bb0[9]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11 - _5 = _1; // bb0[10]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11 - _4 = const read(move _5) -> bb1; // bb0[11]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12 + _2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 + _1 = move _2 as usize (Misc); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39 + StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39 + StorageDead(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:39: 7:40 + StorageLive(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12 + StorageLive(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11 + _5 = _1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11 + _4 = const read(move _5) -> bb1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12 // ty::Const // + ty: fn(usize) {read} // + val: Value(Scalar()) @@ -40,17 +40,17 @@ } bb1: { - StorageDead(_5); // bb1[0]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12 - StorageDead(_4); // bb1[1]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13 - _0 = const (); // bb1[2]: scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2 + StorageDead(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12 + StorageDead(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13 + _0 = const (); // scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/const_prop_fails_gracefully.rs:5:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[3]: scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2 - return; // bb1[4]: scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2 + StorageDead(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2 + return; // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff index cbda5e4ef864a..07a144942caa9 100644 --- a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff +++ b/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff @@ -7,9 +7,9 @@ let mut _2: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 -- _1 = const ::NEEDS; // bb0[1]: scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 -+ _1 = const false; // bb0[1]: scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 + StorageLive(_1); // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 +- _1 = const ::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 ++ _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 // ty::Const // + ty: bool - // + val: Unevaluated(DefId(0:4 ~ control_flow_simplification[317d]::NeedsDrop[0]::NEEDS[0]), [bool], None) @@ -17,9 +17,9 @@ // mir::Constant // + span: $DIR/control-flow-simplification.rs:12:8: 12:21 - // + literal: Const { ty: bool, val: Unevaluated(DefId(0:4 ~ control_flow_simplification[317d]::NeedsDrop[0]::NEEDS[0]), [bool], None) } -- switchInt(_1) -> [false: bb1, otherwise: bb2]; // bb0[2]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 +- switchInt(_1) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 + // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ switchInt(const false) -> [false: bb1, otherwise: bb2]; // bb0[2]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 ++ switchInt(const false) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x00)) @@ -29,20 +29,20 @@ } bb1: { - _0 = const (); // bb1[0]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 + _0 = const (); // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/control-flow-simplification.rs:12:5: 14:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[1]: scope 0 at $DIR/control-flow-simplification.rs:15:1: 15:2 - return; // bb1[2]: scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2 + StorageDead(_1); // scope 0 at $DIR/control-flow-simplification.rs:15:1: 15:2 + return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2 } bb2: { - StorageLive(_2); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL - const std::rt::begin_panic::<&str>(const "explicit panic"); // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL + StorageLive(_2); // scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL + const std::rt::begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL // ty::Const // + ty: fn(&str) -> ! {std::rt::begin_panic::<&str>} // + val: Value(Scalar()) diff --git a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir b/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir index 73922b5666905..3569b9897f96c 100644 --- a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir +++ b/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir @@ -4,13 +4,13 @@ fn hello() -> () { let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14 bb0: { - _0 = const (); // bb0[0]: scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 + _0 = const (); // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/control-flow-simplification.rs:12:5: 14:6 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[1]: scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2 + return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff index 753c64d6c3298..9979ea9549891 100644 --- a/src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff @@ -12,11 +12,11 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/discriminant.rs:6:9: 6:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/discriminant.rs:6:34: 6:44 -- _3 = std::option::Option::::Some(const true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44 -+ _3 = const std::option::Option::::Some(true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44 + StorageLive(_1); // scope 0 at $DIR/discriminant.rs:6:9: 6:10 + StorageLive(_2); // scope 0 at $DIR/discriminant.rs:6:13: 6:64 + StorageLive(_3); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 +- _3 = std::option::Option::::Some(const true); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 ++ _3 = const std::option::Option::::Some(true); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 // ty::Const - // + ty: bool + // + ty: std::option::Option @@ -24,18 +24,18 @@ // mir::Constant - // + span: $DIR/discriminant.rs:6:39: 6:43 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -- _4 = discriminant(_3); // bb0[4]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 -- switchInt(move _4) -> [1isize: bb2, otherwise: bb1]; // bb0[5]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 +- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:6:21: 6:31 +- switchInt(move _4) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 + // + span: $DIR/discriminant.rs:6:34: 6:44 + // + literal: Const { ty: std::option::Option, val: Value(Scalar(0x01)) } -+ _4 = const 1isize; // bb0[4]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 ++ _4 = const 1isize; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 + // ty::Const + // + ty: isize + // + val: Value(Scalar(0x00000001)) + // mir::Constant + // + span: $DIR/discriminant.rs:6:21: 6:31 + // + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) } -+ switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1]; // bb0[5]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 ++ switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 + // ty::Const + // + ty: isize + // + val: Value(Scalar(0x00000001)) @@ -45,19 +45,19 @@ } bb1: { - _2 = const 10i32; // bb1[0]: scope 0 at $DIR/discriminant.rs:6:59: 6:61 + _2 = const 10i32; // scope 0 at $DIR/discriminant.rs:6:59: 6:61 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000000a)) // mir::Constant // + span: $DIR/discriminant.rs:6:59: 6:61 // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } - goto -> bb4; // bb1[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64 + goto -> bb4; // scope 0 at $DIR/discriminant.rs:6:13: 6:64 } bb2: { -- switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // bb2[0]: scope 0 at $DIR/discriminant.rs:6:26: 6:30 -+ switchInt(const true) -> [false: bb1, otherwise: bb3]; // bb2[0]: scope 0 at $DIR/discriminant.rs:6:26: 6:30 +- switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:6:26: 6:30 ++ switchInt(const true) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:6:26: 6:30 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -67,35 +67,35 @@ } bb3: { - _2 = const 42i32; // bb3[0]: scope 0 at $DIR/discriminant.rs:6:47: 6:49 + _2 = const 42i32; // scope 0 at $DIR/discriminant.rs:6:47: 6:49 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/discriminant.rs:6:47: 6:49 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - goto -> bb4; // bb3[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64 + goto -> bb4; // scope 0 at $DIR/discriminant.rs:6:13: 6:64 } bb4: { - _1 = Add(move _2, const 0i32); // bb4[0]: scope 0 at $DIR/discriminant.rs:6:13: 6:68 + _1 = Add(move _2, const 0i32); // scope 0 at $DIR/discriminant.rs:6:13: 6:68 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/discriminant.rs:6:67: 6:68 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - StorageDead(_2); // bb4[1]: scope 0 at $DIR/discriminant.rs:6:67: 6:68 - StorageDead(_3); // bb4[2]: scope 0 at $DIR/discriminant.rs:6:68: 6:69 - _0 = const (); // bb4[3]: scope 0 at $DIR/discriminant.rs:5:11: 7:2 + StorageDead(_2); // scope 0 at $DIR/discriminant.rs:6:67: 6:68 + StorageDead(_3); // scope 0 at $DIR/discriminant.rs:6:68: 6:69 + _0 = const (); // scope 0 at $DIR/discriminant.rs:5:11: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/discriminant.rs:5:11: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb4[4]: scope 0 at $DIR/discriminant.rs:7:1: 7:2 - return; // bb4[5]: scope 0 at $DIR/discriminant.rs:7:2: 7:2 + StorageDead(_1); // scope 0 at $DIR/discriminant.rs:7:1: 7:2 + return; // scope 0 at $DIR/discriminant.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff index 1d8e945f87a6d..ec0341e3de251 100644 --- a/src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff @@ -12,11 +12,11 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/discriminant.rs:6:9: 6:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/discriminant.rs:6:34: 6:44 -- _3 = std::option::Option::::Some(const true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44 -+ _3 = const std::option::Option::::Some(true); // bb0[3]: scope 0 at $DIR/discriminant.rs:6:34: 6:44 + StorageLive(_1); // scope 0 at $DIR/discriminant.rs:6:9: 6:10 + StorageLive(_2); // scope 0 at $DIR/discriminant.rs:6:13: 6:64 + StorageLive(_3); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 +- _3 = std::option::Option::::Some(const true); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 ++ _3 = const std::option::Option::::Some(true); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 // ty::Const - // + ty: bool + // + ty: std::option::Option @@ -24,18 +24,18 @@ // mir::Constant - // + span: $DIR/discriminant.rs:6:39: 6:43 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -- _4 = discriminant(_3); // bb0[4]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 -- switchInt(move _4) -> [1isize: bb2, otherwise: bb1]; // bb0[5]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 +- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:6:21: 6:31 +- switchInt(move _4) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 + // + span: $DIR/discriminant.rs:6:34: 6:44 + // + literal: Const { ty: std::option::Option, val: Value(Scalar(0x01)) } -+ _4 = const 1isize; // bb0[4]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 ++ _4 = const 1isize; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 + // ty::Const + // + ty: isize + // + val: Value(Scalar(0x0000000000000001)) + // mir::Constant + // + span: $DIR/discriminant.rs:6:21: 6:31 + // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) } -+ switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1]; // bb0[5]: scope 0 at $DIR/discriminant.rs:6:21: 6:31 ++ switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 + // ty::Const + // + ty: isize + // + val: Value(Scalar(0x0000000000000001)) @@ -45,19 +45,19 @@ } bb1: { - _2 = const 10i32; // bb1[0]: scope 0 at $DIR/discriminant.rs:6:59: 6:61 + _2 = const 10i32; // scope 0 at $DIR/discriminant.rs:6:59: 6:61 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000000a)) // mir::Constant // + span: $DIR/discriminant.rs:6:59: 6:61 // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } - goto -> bb4; // bb1[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64 + goto -> bb4; // scope 0 at $DIR/discriminant.rs:6:13: 6:64 } bb2: { -- switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // bb2[0]: scope 0 at $DIR/discriminant.rs:6:26: 6:30 -+ switchInt(const true) -> [false: bb1, otherwise: bb3]; // bb2[0]: scope 0 at $DIR/discriminant.rs:6:26: 6:30 +- switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:6:26: 6:30 ++ switchInt(const true) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:6:26: 6:30 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -67,35 +67,35 @@ } bb3: { - _2 = const 42i32; // bb3[0]: scope 0 at $DIR/discriminant.rs:6:47: 6:49 + _2 = const 42i32; // scope 0 at $DIR/discriminant.rs:6:47: 6:49 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/discriminant.rs:6:47: 6:49 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - goto -> bb4; // bb3[1]: scope 0 at $DIR/discriminant.rs:6:13: 6:64 + goto -> bb4; // scope 0 at $DIR/discriminant.rs:6:13: 6:64 } bb4: { - _1 = Add(move _2, const 0i32); // bb4[0]: scope 0 at $DIR/discriminant.rs:6:13: 6:68 + _1 = Add(move _2, const 0i32); // scope 0 at $DIR/discriminant.rs:6:13: 6:68 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/discriminant.rs:6:67: 6:68 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - StorageDead(_2); // bb4[1]: scope 0 at $DIR/discriminant.rs:6:67: 6:68 - StorageDead(_3); // bb4[2]: scope 0 at $DIR/discriminant.rs:6:68: 6:69 - _0 = const (); // bb4[3]: scope 0 at $DIR/discriminant.rs:5:11: 7:2 + StorageDead(_2); // scope 0 at $DIR/discriminant.rs:6:67: 6:68 + StorageDead(_3); // scope 0 at $DIR/discriminant.rs:6:68: 6:69 + _0 = const (); // scope 0 at $DIR/discriminant.rs:5:11: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/discriminant.rs:5:11: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb4[4]: scope 0 at $DIR/discriminant.rs:7:1: 7:2 - return; // bb4[5]: scope 0 at $DIR/discriminant.rs:7:2: 7:2 + StorageDead(_1); // scope 0 at $DIR/discriminant.rs:7:1: 7:2 + return; // scope 0 at $DIR/discriminant.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff index 4c80d0d127844..941cde9172a6f 100644 --- a/src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff @@ -11,10 +11,10 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/indirect.rs:5:9: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/indirect.rs:5:13: 5:25 -- _2 = const 2u32 as u8 (Misc); // bb0[2]: scope 0 at $DIR/indirect.rs:5:13: 5:25 -+ _2 = const 2u8; // bb0[2]: scope 0 at $DIR/indirect.rs:5:13: 5:25 + StorageLive(_1); // scope 0 at $DIR/indirect.rs:5:9: 5:10 + StorageLive(_2); // scope 0 at $DIR/indirect.rs:5:13: 5:25 +- _2 = const 2u32 as u8 (Misc); // scope 0 at $DIR/indirect.rs:5:13: 5:25 ++ _2 = const 2u8; // scope 0 at $DIR/indirect.rs:5:13: 5:25 // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) @@ -23,10 +23,10 @@ // mir::Constant - // + span: $DIR/indirect.rs:5:14: 5:18 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } -- _3 = CheckedAdd(move _2, const 1u8); // bb0[3]: scope 0 at $DIR/indirect.rs:5:13: 5:29 +- _3 = CheckedAdd(move _2, const 1u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29 + // + span: $DIR/indirect.rs:5:13: 5:25 + // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } -+ _3 = (const 3u8, const false); // bb0[3]: scope 0 at $DIR/indirect.rs:5:13: 5:29 ++ _3 = (const 3u8, const false); // scope 0 at $DIR/indirect.rs:5:13: 5:29 // ty::Const // + ty: u8 - // + val: Value(Scalar(0x01)) @@ -34,7 +34,7 @@ // mir::Constant - // + span: $DIR/indirect.rs:5:28: 5:29 - // + literal: Const { ty: u8, val: Value(Scalar(0x01)) } -- assert(!move (_3.1: bool), "attempt to add with overflow") -> bb1; // bb0[4]: scope 0 at $DIR/indirect.rs:5:13: 5:29 +- assert(!move (_3.1: bool), "attempt to add with overflow") -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29 + // + span: $DIR/indirect.rs:5:13: 5:29 + // + literal: Const { ty: u8, val: Value(Scalar(0x03)) } + // ty::Const @@ -43,7 +43,7 @@ + // mir::Constant + // + span: $DIR/indirect.rs:5:13: 5:29 + // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ assert(!const false, "attempt to add with overflow") -> bb1; // bb0[4]: scope 0 at $DIR/indirect.rs:5:13: 5:29 ++ assert(!const false, "attempt to add with overflow") -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x00)) @@ -53,24 +53,24 @@ } bb1: { -- _1 = move (_3.0: u8); // bb1[0]: scope 0 at $DIR/indirect.rs:5:13: 5:29 -+ _1 = const 3u8; // bb1[0]: scope 0 at $DIR/indirect.rs:5:13: 5:29 +- _1 = move (_3.0: u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29 ++ _1 = const 3u8; // scope 0 at $DIR/indirect.rs:5:13: 5:29 + // ty::Const + // + ty: u8 + // + val: Value(Scalar(0x03)) + // mir::Constant + // + span: $DIR/indirect.rs:5:13: 5:29 + // + literal: Const { ty: u8, val: Value(Scalar(0x03)) } - StorageDead(_2); // bb1[1]: scope 0 at $DIR/indirect.rs:5:28: 5:29 - _0 = const (); // bb1[2]: scope 0 at $DIR/indirect.rs:4:11: 6:2 + StorageDead(_2); // scope 0 at $DIR/indirect.rs:5:28: 5:29 + _0 = const (); // scope 0 at $DIR/indirect.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/indirect.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[3]: scope 0 at $DIR/indirect.rs:6:1: 6:2 - return; // bb1[4]: scope 0 at $DIR/indirect.rs:6:2: 6:2 + StorageDead(_1); // scope 0 at $DIR/indirect.rs:6:1: 6:2 + return; // scope 0 at $DIR/indirect.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff index 76c6759f700ad..c26494bdc1042 100644 --- a/src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff @@ -8,18 +8,18 @@ let mut _3: (); // in scope 0 at $DIR/issue-66971.rs:16:13: 16:15 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/issue-66971.rs:16:5: 16:23 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/issue-66971.rs:16:12: 16:22 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/issue-66971.rs:16:13: 16:15 -- _3 = (); // bb0[3]: scope 0 at $DIR/issue-66971.rs:16:13: 16:15 -+ _3 = const (); // bb0[3]: scope 0 at $DIR/issue-66971.rs:16:13: 16:15 + StorageLive(_1); // scope 0 at $DIR/issue-66971.rs:16:5: 16:23 + StorageLive(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22 + StorageLive(_3); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15 +- _3 = (); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15 ++ _3 = const (); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15 + // ty::Const + // + ty: () + // + val: Value(Scalar()) + // mir::Constant + // + span: $DIR/issue-66971.rs:16:13: 16:15 + // + literal: Const { ty: (), val: Value(Scalar()) } - _2 = (move _3, const 0u8, const 0u8); // bb0[4]: scope 0 at $DIR/issue-66971.rs:16:12: 16:22 + _2 = (move _3, const 0u8, const 0u8); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22 // ty::Const // + ty: u8 // + val: Value(Scalar(0x00)) @@ -32,8 +32,8 @@ // mir::Constant // + span: $DIR/issue-66971.rs:16:20: 16:21 // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } - StorageDead(_3); // bb0[5]: scope 0 at $DIR/issue-66971.rs:16:21: 16:22 - _1 = const encode(move _2) -> bb1; // bb0[6]: scope 0 at $DIR/issue-66971.rs:16:5: 16:23 + StorageDead(_3); // scope 0 at $DIR/issue-66971.rs:16:21: 16:22 + _1 = const encode(move _2) -> bb1; // scope 0 at $DIR/issue-66971.rs:16:5: 16:23 // ty::Const // + ty: fn(((), u8, u8)) {encode} // + val: Value(Scalar()) @@ -43,16 +43,16 @@ } bb1: { - StorageDead(_2); // bb1[0]: scope 0 at $DIR/issue-66971.rs:16:22: 16:23 - StorageDead(_1); // bb1[1]: scope 0 at $DIR/issue-66971.rs:16:23: 16:24 - _0 = const (); // bb1[2]: scope 0 at $DIR/issue-66971.rs:15:11: 17:2 + StorageDead(_2); // scope 0 at $DIR/issue-66971.rs:16:22: 16:23 + StorageDead(_1); // scope 0 at $DIR/issue-66971.rs:16:23: 16:24 + _0 = const (); // scope 0 at $DIR/issue-66971.rs:15:11: 17:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-66971.rs:15:11: 17:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb1[3]: scope 0 at $DIR/issue-66971.rs:17:2: 17:2 + return; // scope 0 at $DIR/issue-66971.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff index 05e1a615953ae..e328febb407ae 100644 --- a/src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff @@ -8,10 +8,10 @@ let mut _3: (u8, u8); // in scope 0 at $DIR/issue-67019.rs:11:11: 11:17 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/issue-67019.rs:11:5: 11:20 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/issue-67019.rs:11:10: 11:19 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/issue-67019.rs:11:11: 11:17 - _3 = (const 1u8, const 2u8); // bb0[3]: scope 0 at $DIR/issue-67019.rs:11:11: 11:17 + StorageLive(_1); // scope 0 at $DIR/issue-67019.rs:11:5: 11:20 + StorageLive(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19 + StorageLive(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17 + _3 = (const 1u8, const 2u8); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17 // ty::Const // + ty: u8 // + val: Value(Scalar(0x01)) @@ -26,9 +26,9 @@ - // + span: $DIR/issue-67019.rs:11:15: 11:16 + // + span: $DIR/issue-67019.rs:11:11: 11:17 // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } - _2 = (move _3,); // bb0[4]: scope 0 at $DIR/issue-67019.rs:11:10: 11:19 - StorageDead(_3); // bb0[5]: scope 0 at $DIR/issue-67019.rs:11:18: 11:19 - _1 = const test(move _2) -> bb1; // bb0[6]: scope 0 at $DIR/issue-67019.rs:11:5: 11:20 + _2 = (move _3,); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19 + StorageDead(_3); // scope 0 at $DIR/issue-67019.rs:11:18: 11:19 + _1 = const test(move _2) -> bb1; // scope 0 at $DIR/issue-67019.rs:11:5: 11:20 // ty::Const // + ty: fn(((u8, u8),)) {test} // + val: Value(Scalar()) @@ -38,16 +38,16 @@ } bb1: { - StorageDead(_2); // bb1[0]: scope 0 at $DIR/issue-67019.rs:11:19: 11:20 - StorageDead(_1); // bb1[1]: scope 0 at $DIR/issue-67019.rs:11:20: 11:21 - _0 = const (); // bb1[2]: scope 0 at $DIR/issue-67019.rs:10:11: 12:2 + StorageDead(_2); // scope 0 at $DIR/issue-67019.rs:11:19: 11:20 + StorageDead(_1); // scope 0 at $DIR/issue-67019.rs:11:20: 11:21 + _0 = const (); // scope 0 at $DIR/issue-67019.rs:10:11: 12:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-67019.rs:10:11: 12:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb1[3]: scope 0 at $DIR/issue-67019.rs:12:2: 12:2 + return; // scope 0 at $DIR/issue-67019.rs:12:2: 12:2 } } diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff index 2868365e9ac8e..9bd9bfa9f2796 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff @@ -23,9 +23,9 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 -- _2 = CheckedAdd(const 2i32, const 2i32); // bb0[1]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ _2 = (const 4i32, const false); // bb0[1]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 +- _2 = CheckedAdd(const 2i32, const 2i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 ++ _2 = (const 4i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 // ty::Const // + ty: i32 - // + val: Value(Scalar(0x00000002)) @@ -43,10 +43,10 @@ // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:12:17: 12:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } -- assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; // bb0[2]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 +- assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 + // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ assert(!const false, "attempt to add with overflow") -> bb1; // bb0[2]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 ++ assert(!const false, "attempt to add with overflow") -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x00)) @@ -56,17 +56,17 @@ } bb1: { -- _1 = move (_2.0: i32); // bb1[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ _1 = const 4i32; // bb1[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 +- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 ++ _1 = const 4i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000004)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageLive(_3); // bb1[1]: scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 - StorageLive(_4); // bb1[2]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 - _4 = [const 0i32, const 1i32, const 2i32, const 3i32, const 4i32, const 5i32]; // bb1[3]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 + StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 + StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 + _4 = [const 0i32, const 1i32, const 2i32, const 3i32, const 4i32, const 5i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) @@ -103,31 +103,31 @@ // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:29: 13:30 // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } - StorageLive(_5); // bb1[4]: scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 - _5 = const 3usize; // bb1[5]: scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 + StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 + _5 = const 3usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:32: 13:33 // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } - _6 = const 6usize; // bb1[6]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + _6 = const 6usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000006)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 // + literal: Const { ty: usize, val: Value(Scalar(0x00000006)) } -- _7 = Lt(_5, _6); // bb1[7]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 -- assert(move _7, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // bb1[8]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 -+ _7 = const true; // bb1[7]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 +- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 +- assert(move _7, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 ++ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // bb1[8]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -137,19 +137,19 @@ } bb2: { -- _3 = _4[_5]; // bb2[0]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 -+ _3 = const 3i32; // bb2[0]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 +- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 ++ _3 = const 3i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000003)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_5); // bb2[1]: scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 - StorageDead(_4); // bb2[2]: scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 - StorageLive(_8); // bb2[3]: scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 - StorageLive(_9); // bb2[4]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 - _9 = Point { x: const 12u32, y: const 42u32 }; // bb2[5]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 + StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 + StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 + StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 + StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 + _9 = Point { x: const 12u32, y: const 42u32 }; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000000c)) @@ -162,26 +162,26 @@ // mir::Constant // + span: $DIR/optimizes_into_variable.rs:14:32: 14:34 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } -- _8 = (_9.1: u32); // bb2[6]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 -+ _8 = const 42u32; // bb2[6]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 +- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 ++ _8 = const 42u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x0000002a)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - StorageDead(_9); // bb2[7]: scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39 - _0 = const (); // bb2[8]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 + StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39 + _0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:11:11: 15:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_8); // bb2[9]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_3); // bb2[10]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_1); // bb2[11]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - return; // bb2[12]: scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 + StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir b/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir index f8aea27df6660..8ea9316c7d49b 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir +++ b/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir @@ -16,40 +16,40 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 - _1 = const 4i32; // bb0[1]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 + _1 = const 4i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000004)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 - _2 = const 3i32; // bb0[3]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 + _2 = const 3i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageLive(_3); // bb0[4]: scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 - _3 = const 42u32; // bb0[5]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 + StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 + _3 = const 42u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - _0 = const (); // bb0[6]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 + _0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:11:11: 15:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_3); // bb0[7]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_2); // bb0[8]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_1); // bb0[9]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - return; // bb0[10]: scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 + StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff index 0097d9448c81f..1da763ec9558a 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff @@ -23,9 +23,9 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 -- _2 = CheckedAdd(const 2i32, const 2i32); // bb0[1]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ _2 = (const 4i32, const false); // bb0[1]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 +- _2 = CheckedAdd(const 2i32, const 2i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 ++ _2 = (const 4i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 // ty::Const // + ty: i32 - // + val: Value(Scalar(0x00000002)) @@ -43,10 +43,10 @@ // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:12:17: 12:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } -- assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; // bb0[2]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 +- assert(!move (_2.1: bool), "attempt to add with overflow") -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 + // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ assert(!const false, "attempt to add with overflow") -> bb1; // bb0[2]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 ++ assert(!const false, "attempt to add with overflow") -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x00)) @@ -56,17 +56,17 @@ } bb1: { -- _1 = move (_2.0: i32); // bb1[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ _1 = const 4i32; // bb1[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 +- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 ++ _1 = const 4i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000004)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageLive(_3); // bb1[1]: scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 - StorageLive(_4); // bb1[2]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 - _4 = [const 0i32, const 1i32, const 2i32, const 3i32, const 4i32, const 5i32]; // bb1[3]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 + StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 + StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 + _4 = [const 0i32, const 1i32, const 2i32, const 3i32, const 4i32, const 5i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) @@ -103,31 +103,31 @@ // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:29: 13:30 // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } - StorageLive(_5); // bb1[4]: scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 - _5 = const 3usize; // bb1[5]: scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 + StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 + _5 = const 3usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000003)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:32: 13:33 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } - _6 = const 6usize; // bb1[6]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + _6 = const 6usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000006)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000006)) } -- _7 = Lt(_5, _6); // bb1[7]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 -- assert(move _7, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // bb1[8]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 -+ _7 = const true; // bb1[7]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 +- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 +- assert(move _7, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 ++ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // bb1[8]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -137,19 +137,19 @@ } bb2: { -- _3 = _4[_5]; // bb2[0]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 -+ _3 = const 3i32; // bb2[0]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 +- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 ++ _3 = const 3i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000003)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_5); // bb2[1]: scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 - StorageDead(_4); // bb2[2]: scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 - StorageLive(_8); // bb2[3]: scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 - StorageLive(_9); // bb2[4]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 - _9 = Point { x: const 12u32, y: const 42u32 }; // bb2[5]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 + StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 + StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35 + StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 + StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 + _9 = Point { x: const 12u32, y: const 42u32 }; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000000c)) @@ -162,26 +162,26 @@ // mir::Constant // + span: $DIR/optimizes_into_variable.rs:14:32: 14:34 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } -- _8 = (_9.1: u32); // bb2[6]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 -+ _8 = const 42u32; // bb2[6]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 +- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 ++ _8 = const 42u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x0000002a)) + // mir::Constant + // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - StorageDead(_9); // bb2[7]: scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39 - _0 = const (); // bb2[8]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 + StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39 + _0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:11:11: 15:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_8); // bb2[9]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_3); // bb2[10]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_1); // bb2[11]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - return; // bb2[12]: scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 + StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir b/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir index f8aea27df6660..8ea9316c7d49b 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir +++ b/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir @@ -16,40 +16,40 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 - _1 = const 4i32; // bb0[1]: scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 + _1 = const 4i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000004)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 - _2 = const 3i32; // bb0[3]: scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 + _2 = const 3i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageLive(_3); // bb0[4]: scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 - _3 = const 42u32; // bb0[5]: scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 + StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 + _3 = const 42u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - _0 = const (); // bb0[6]: scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 + _0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/optimizes_into_variable.rs:11:11: 15:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_3); // bb0[7]: scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_2); // bb0[8]: scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - StorageDead(_1); // bb0[9]: scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 - return; // bb0[10]: scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 + StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2 + return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff index 826e3695e32b7..bbe0d10601147 100644 --- a/src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff @@ -13,62 +13,62 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/read_immutable_static.rs:7:9: 7:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 - _3 = const {alloc0+0x0: &u8}; // bb0[3]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 + StorageLive(_1); // scope 0 at $DIR/read_immutable_static.rs:7:9: 7:10 + StorageLive(_2); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 + StorageLive(_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 + _3 = const {alloc0+0x0: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 // ty::Const // + ty: &u8 // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/read_immutable_static.rs:7:13: 7:16 // + literal: Const { ty: &u8, val: Value(Scalar(alloc0+0x0)) } -- _2 = (*_3); // bb0[4]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 -+ _2 = const 2u8; // bb0[4]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 +- _2 = (*_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 ++ _2 = const 2u8; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 + // ty::Const + // + ty: u8 + // + val: Value(Scalar(0x02)) + // mir::Constant + // + span: $DIR/read_immutable_static.rs:7:13: 7:16 + // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } - StorageLive(_4); // bb0[5]: scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 - StorageLive(_5); // bb0[6]: scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 - _5 = const {alloc0+0x0: &u8}; // bb0[7]: scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 + StorageLive(_4); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 + StorageLive(_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 + _5 = const {alloc0+0x0: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 // ty::Const // + ty: &u8 // + val: Value(Scalar(alloc0+0x0)) // mir::Constant // + span: $DIR/read_immutable_static.rs:7:19: 7:22 // + literal: Const { ty: &u8, val: Value(Scalar(alloc0+0x0)) } -- _4 = (*_5); // bb0[8]: scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 -- _1 = Add(move _2, move _4); // bb0[9]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22 -+ _4 = const 2u8; // bb0[8]: scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 +- _4 = (*_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 +- _1 = Add(move _2, move _4); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22 ++ _4 = const 2u8; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 + // ty::Const + // + ty: u8 + // + val: Value(Scalar(0x02)) + // mir::Constant + // + span: $DIR/read_immutable_static.rs:7:19: 7:22 + // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } -+ _1 = const 4u8; // bb0[9]: scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22 ++ _1 = const 4u8; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22 + // ty::Const + // + ty: u8 + // + val: Value(Scalar(0x04)) + // mir::Constant + // + span: $DIR/read_immutable_static.rs:7:13: 7:22 + // + literal: Const { ty: u8, val: Value(Scalar(0x04)) } - StorageDead(_4); // bb0[10]: scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22 - StorageDead(_2); // bb0[11]: scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22 - StorageDead(_5); // bb0[12]: scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23 - StorageDead(_3); // bb0[13]: scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23 - _0 = const (); // bb0[14]: scope 0 at $DIR/read_immutable_static.rs:6:11: 8:2 + StorageDead(_4); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22 + StorageDead(_2); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22 + StorageDead(_5); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23 + StorageDead(_3); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23 + _0 = const (); // scope 0 at $DIR/read_immutable_static.rs:6:11: 8:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/read_immutable_static.rs:6:11: 8:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb0[15]: scope 0 at $DIR/read_immutable_static.rs:8:1: 8:2 - return; // bb0[16]: scope 0 at $DIR/read_immutable_static.rs:8:2: 8:2 + StorageDead(_1); // scope 0 at $DIR/read_immutable_static.rs:8:1: 8:2 + return; // scope 0 at $DIR/read_immutable_static.rs:8:2: 8:2 } } diff --git a/src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff index 591fdaddfccd5..dcd3d4019811e 100644 --- a/src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff @@ -9,34 +9,34 @@ let mut _4: &i32; // in scope 0 at $DIR/ref_deref.rs:5:6: 5:10 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/ref_deref.rs:5:5: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 - _4 = const main::promoted[0]; // bb0[2]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 + StorageLive(_1); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10 + StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 + _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 // ty::Const // + ty: &i32 // + val: Unevaluated(DefId(0:3 ~ ref_deref[317d]::main[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/ref_deref.rs:5:6: 5:10 // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:3 ~ ref_deref[317d]::main[0]), [], Some(promoted[0])) } - _2 = _4; // bb0[3]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 -- _1 = (*_2); // bb0[4]: scope 0 at $DIR/ref_deref.rs:5:5: 5:10 -+ _1 = const 4i32; // bb0[4]: scope 0 at $DIR/ref_deref.rs:5:5: 5:10 + _2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 +- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10 ++ _1 = const 4i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000004)) + // mir::Constant + // + span: $DIR/ref_deref.rs:5:5: 5:10 + // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageDead(_2); // bb0[5]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 - StorageDead(_1); // bb0[6]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 - _0 = const (); // bb0[7]: scope 0 at $DIR/ref_deref.rs:4:11: 6:2 + StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11 + StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11 + _0 = const (); // scope 0 at $DIR/ref_deref.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/ref_deref.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[8]: scope 0 at $DIR/ref_deref.rs:6:2: 6:2 + return; // scope 0 at $DIR/ref_deref.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff index 5cd9f43a5c684..ef696f1ab8052 100644 --- a/src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff +++ b/src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff @@ -9,11 +9,11 @@ + let mut _4: &i32; // in scope 0 at $DIR/ref_deref.rs:5:6: 5:10 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/ref_deref.rs:5:5: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 -- StorageLive(_3); // bb0[2]: scope 0 at $DIR/ref_deref.rs:5:8: 5:9 -- _3 = const 4i32; // bb0[3]: scope 0 at $DIR/ref_deref.rs:5:8: 5:9 -+ _4 = const main::promoted[0]; // bb0[2]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 + StorageLive(_1); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10 + StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 +- StorageLive(_3); // scope 0 at $DIR/ref_deref.rs:5:8: 5:9 +- _3 = const 4i32; // scope 0 at $DIR/ref_deref.rs:5:8: 5:9 ++ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000004)) @@ -22,27 +22,22 @@ // mir::Constant - // + span: $DIR/ref_deref.rs:5:8: 5:9 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } -- _2 = &_3; // bb0[4]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 -- _1 = (*_2); // bb0[5]: scope 0 at $DIR/ref_deref.rs:5:5: 5:10 -- StorageDead(_3); // bb0[6]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 -- StorageDead(_2); // bb0[7]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 -- StorageDead(_1); // bb0[8]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 -- _0 = const (); // bb0[9]: scope 0 at $DIR/ref_deref.rs:4:11: 6:2 +- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 + // + span: $DIR/ref_deref.rs:5:6: 5:10 + // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:3 ~ ref_deref[317d]::main[0]), [], Some(promoted[0])) } -+ _2 = &(*_4); // bb0[3]: scope 0 at $DIR/ref_deref.rs:5:6: 5:10 -+ _1 = (*_2); // bb0[4]: scope 0 at $DIR/ref_deref.rs:5:5: 5:10 -+ StorageDead(_2); // bb0[5]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 -+ StorageDead(_1); // bb0[6]: scope 0 at $DIR/ref_deref.rs:5:10: 5:11 -+ _0 = const (); // bb0[7]: scope 0 at $DIR/ref_deref.rs:4:11: 6:2 ++ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 + _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10 +- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11 + StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11 + StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11 + _0 = const (); // scope 0 at $DIR/ref_deref.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/ref_deref.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } -- return; // bb0[10]: scope 0 at $DIR/ref_deref.rs:6:2: 6:2 -+ return; // bb0[8]: scope 0 at $DIR/ref_deref.rs:6:2: 6:2 + return; // scope 0 at $DIR/ref_deref.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff index 6393bad2993d5..dd2f5bd906428 100644 --- a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff @@ -9,27 +9,27 @@ let mut _4: &(i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 - _4 = const main::promoted[0]; // bb0[2]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 + StorageLive(_1); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 + StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 + _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 // ty::Const // + ty: &(i32, i32) // + val: Unevaluated(DefId(0:3 ~ ref_deref_project[317d]::main[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/ref_deref_project.rs:5:6: 5:17 // + literal: Const { ty: &(i32, i32), val: Unevaluated(DefId(0:3 ~ ref_deref_project[317d]::main[0]), [], Some(promoted[0])) } - _2 = &((*_4).1: i32); // bb0[3]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 - _1 = (*_2); // bb0[4]: scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 - StorageDead(_2); // bb0[5]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 - StorageDead(_1); // bb0[6]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 - _0 = const (); // bb0[7]: scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2 + _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 + _1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 + StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 + StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 + _0 = const (); // scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/ref_deref_project.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[8]: scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2 + return; // scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff index 020ad7278c038..7f23f5ea7a69a 100644 --- a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff +++ b/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff @@ -9,11 +9,11 @@ + let mut _4: &(i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 -- StorageLive(_3); // bb0[2]: scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14 -- _3 = (const 4i32, const 5i32); // bb0[3]: scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14 -+ _4 = const main::promoted[0]; // bb0[2]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 + StorageLive(_1); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 + StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 +- StorageLive(_3); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14 +- _3 = (const 4i32, const 5i32); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14 ++ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000004)) @@ -22,33 +22,28 @@ // mir::Constant - // + span: $DIR/ref_deref_project.rs:5:9: 5:10 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } -+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17 -+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(DefId(0:3 ~ ref_deref_project[317d]::main[0]), [], Some(promoted[0])) } -+ _2 = &((*_4).1: i32); // bb0[3]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 -+ _1 = (*_2); // bb0[4]: scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 -+ StorageDead(_2); // bb0[5]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 -+ StorageDead(_1); // bb0[6]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 -+ _0 = const (); // bb0[7]: scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2 - // ty::Const +- // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/ref_deref_project.rs:5:12: 5:13 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } -- _2 = &(_3.1: i32); // bb0[4]: scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 -- _1 = (*_2); // bb0[5]: scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 -- StorageDead(_3); // bb0[6]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 -- StorageDead(_2); // bb0[7]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 -- StorageDead(_1); // bb0[8]: scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 -- _0 = const (); // bb0[9]: scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2 -- // ty::Const +- _2 = &(_3.1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 ++ // + span: $DIR/ref_deref_project.rs:5:6: 5:17 ++ // + literal: Const { ty: &(i32, i32), val: Unevaluated(DefId(0:3 ~ ref_deref_project[317d]::main[0]), [], Some(promoted[0])) } ++ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 + _1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17 +- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 + StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 + StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18 + _0 = const (); // scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2 + // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/ref_deref_project.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } -- return; // bb0[10]: scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2 -+ return; // bb0[8]: scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2 + return; // scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff index 388ebe08689c2..93fe856c8e81d 100644 --- a/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff @@ -10,29 +10,29 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17 - _3 = const main as fn() (Pointer(ReifyFnPointer)); // bb0[3]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17 + StorageLive(_1); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41 + StorageLive(_2); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26 + StorageLive(_3); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17 + _3 = const main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17 // ty::Const // + ty: fn() {main} // + val: Value(Scalar()) // mir::Constant // + span: $DIR/reify_fn_ptr.rs:4:13: 4:17 // + literal: Const { ty: fn() {main}, val: Value(Scalar()) } - _2 = move _3 as usize (Misc); // bb0[4]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26 - StorageDead(_3); // bb0[5]: scope 0 at $DIR/reify_fn_ptr.rs:4:25: 4:26 - _1 = move _2 as *const fn() (Misc); // bb0[6]: scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41 - StorageDead(_2); // bb0[7]: scope 0 at $DIR/reify_fn_ptr.rs:4:40: 4:41 - StorageDead(_1); // bb0[8]: scope 0 at $DIR/reify_fn_ptr.rs:4:41: 4:42 - _0 = const (); // bb0[9]: scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2 + _2 = move _3 as usize (Misc); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26 + StorageDead(_3); // scope 0 at $DIR/reify_fn_ptr.rs:4:25: 4:26 + _1 = move _2 as *const fn() (Misc); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41 + StorageDead(_2); // scope 0 at $DIR/reify_fn_ptr.rs:4:40: 4:41 + StorageDead(_1); // scope 0 at $DIR/reify_fn_ptr.rs:4:41: 4:42 + _0 = const (); // scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/reify_fn_ptr.rs:3:11: 5:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[10]: scope 0 at $DIR/reify_fn_ptr.rs:5:2: 5:2 + return; // scope 0 at $DIR/reify_fn_ptr.rs:5:2: 5:2 } } diff --git a/src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff index 921de79472253..4ccfe1838d9cc 100644 --- a/src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff @@ -14,41 +14,41 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/repeat.rs:6:9: 6:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/repeat.rs:6:18: 6:28 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/repeat.rs:6:18: 6:25 - _3 = [const 42u32; 8]; // bb0[3]: scope 0 at $DIR/repeat.rs:6:18: 6:25 + StorageLive(_1); // scope 0 at $DIR/repeat.rs:6:9: 6:10 + StorageLive(_2); // scope 0 at $DIR/repeat.rs:6:18: 6:28 + StorageLive(_3); // scope 0 at $DIR/repeat.rs:6:18: 6:25 + _3 = [const 42u32; 8]; // scope 0 at $DIR/repeat.rs:6:18: 6:25 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/repeat.rs:6:19: 6:21 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - StorageLive(_4); // bb0[4]: scope 0 at $DIR/repeat.rs:6:26: 6:27 - _4 = const 2usize; // bb0[5]: scope 0 at $DIR/repeat.rs:6:26: 6:27 + StorageLive(_4); // scope 0 at $DIR/repeat.rs:6:26: 6:27 + _4 = const 2usize; // scope 0 at $DIR/repeat.rs:6:26: 6:27 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/repeat.rs:6:26: 6:27 // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } - _5 = const 8usize; // bb0[6]: scope 0 at $DIR/repeat.rs:6:18: 6:28 + _5 = const 8usize; // scope 0 at $DIR/repeat.rs:6:18: 6:28 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000008)) // mir::Constant // + span: $DIR/repeat.rs:6:18: 6:28 // + literal: Const { ty: usize, val: Value(Scalar(0x00000008)) } -- _6 = Lt(_4, _5); // bb0[7]: scope 0 at $DIR/repeat.rs:6:18: 6:28 -- assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // bb0[8]: scope 0 at $DIR/repeat.rs:6:18: 6:28 -+ _6 = const true; // bb0[7]: scope 0 at $DIR/repeat.rs:6:18: 6:28 +- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:6:18: 6:28 +- assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28 ++ _6 = const true; // scope 0 at $DIR/repeat.rs:6:18: 6:28 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/repeat.rs:6:18: 6:28 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // bb0[8]: scope 0 at $DIR/repeat.rs:6:18: 6:28 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -58,9 +58,9 @@ } bb1: { -- _2 = _3[_4]; // bb1[0]: scope 0 at $DIR/repeat.rs:6:18: 6:28 -- _1 = Add(move _2, const 0u32); // bb1[1]: scope 0 at $DIR/repeat.rs:6:18: 6:32 -+ _2 = const 42u32; // bb1[0]: scope 0 at $DIR/repeat.rs:6:18: 6:28 +- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28 +- _1 = Add(move _2, const 0u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32 ++ _2 = const 42u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28 // ty::Const // + ty: u32 - // + val: Value(Scalar(0x00000000)) @@ -70,25 +70,25 @@ - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } + // + span: $DIR/repeat.rs:6:18: 6:28 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } -+ _1 = const 42u32; // bb1[1]: scope 0 at $DIR/repeat.rs:6:18: 6:32 ++ _1 = const 42u32; // scope 0 at $DIR/repeat.rs:6:18: 6:32 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x0000002a)) + // mir::Constant + // + span: $DIR/repeat.rs:6:18: 6:32 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - StorageDead(_2); // bb1[2]: scope 0 at $DIR/repeat.rs:6:31: 6:32 - StorageDead(_4); // bb1[3]: scope 0 at $DIR/repeat.rs:6:32: 6:33 - StorageDead(_3); // bb1[4]: scope 0 at $DIR/repeat.rs:6:32: 6:33 - _0 = const (); // bb1[5]: scope 0 at $DIR/repeat.rs:5:11: 7:2 + StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32 + StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33 + StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33 + _0 = const (); // scope 0 at $DIR/repeat.rs:5:11: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/repeat.rs:5:11: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[6]: scope 0 at $DIR/repeat.rs:7:1: 7:2 - return; // bb1[7]: scope 0 at $DIR/repeat.rs:7:2: 7:2 + StorageDead(_1); // scope 0 at $DIR/repeat.rs:7:1: 7:2 + return; // scope 0 at $DIR/repeat.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff index 361ee4933788e..fe9d16c4ffabb 100644 --- a/src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff @@ -14,41 +14,41 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/repeat.rs:6:9: 6:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/repeat.rs:6:18: 6:28 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/repeat.rs:6:18: 6:25 - _3 = [const 42u32; 8]; // bb0[3]: scope 0 at $DIR/repeat.rs:6:18: 6:25 + StorageLive(_1); // scope 0 at $DIR/repeat.rs:6:9: 6:10 + StorageLive(_2); // scope 0 at $DIR/repeat.rs:6:18: 6:28 + StorageLive(_3); // scope 0 at $DIR/repeat.rs:6:18: 6:25 + _3 = [const 42u32; 8]; // scope 0 at $DIR/repeat.rs:6:18: 6:25 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/repeat.rs:6:19: 6:21 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - StorageLive(_4); // bb0[4]: scope 0 at $DIR/repeat.rs:6:26: 6:27 - _4 = const 2usize; // bb0[5]: scope 0 at $DIR/repeat.rs:6:26: 6:27 + StorageLive(_4); // scope 0 at $DIR/repeat.rs:6:26: 6:27 + _4 = const 2usize; // scope 0 at $DIR/repeat.rs:6:26: 6:27 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000002)) // mir::Constant // + span: $DIR/repeat.rs:6:26: 6:27 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } - _5 = const 8usize; // bb0[6]: scope 0 at $DIR/repeat.rs:6:18: 6:28 + _5 = const 8usize; // scope 0 at $DIR/repeat.rs:6:18: 6:28 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000008)) // mir::Constant // + span: $DIR/repeat.rs:6:18: 6:28 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000008)) } -- _6 = Lt(_4, _5); // bb0[7]: scope 0 at $DIR/repeat.rs:6:18: 6:28 -- assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // bb0[8]: scope 0 at $DIR/repeat.rs:6:18: 6:28 -+ _6 = const true; // bb0[7]: scope 0 at $DIR/repeat.rs:6:18: 6:28 +- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:6:18: 6:28 +- assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28 ++ _6 = const true; // scope 0 at $DIR/repeat.rs:6:18: 6:28 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/repeat.rs:6:18: 6:28 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // bb0[8]: scope 0 at $DIR/repeat.rs:6:18: 6:28 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -58,9 +58,9 @@ } bb1: { -- _2 = _3[_4]; // bb1[0]: scope 0 at $DIR/repeat.rs:6:18: 6:28 -- _1 = Add(move _2, const 0u32); // bb1[1]: scope 0 at $DIR/repeat.rs:6:18: 6:32 -+ _2 = const 42u32; // bb1[0]: scope 0 at $DIR/repeat.rs:6:18: 6:28 +- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28 +- _1 = Add(move _2, const 0u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32 ++ _2 = const 42u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28 // ty::Const // + ty: u32 - // + val: Value(Scalar(0x00000000)) @@ -70,25 +70,25 @@ - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } + // + span: $DIR/repeat.rs:6:18: 6:28 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } -+ _1 = const 42u32; // bb1[1]: scope 0 at $DIR/repeat.rs:6:18: 6:32 ++ _1 = const 42u32; // scope 0 at $DIR/repeat.rs:6:18: 6:32 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x0000002a)) + // mir::Constant + // + span: $DIR/repeat.rs:6:18: 6:32 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - StorageDead(_2); // bb1[2]: scope 0 at $DIR/repeat.rs:6:31: 6:32 - StorageDead(_4); // bb1[3]: scope 0 at $DIR/repeat.rs:6:32: 6:33 - StorageDead(_3); // bb1[4]: scope 0 at $DIR/repeat.rs:6:32: 6:33 - _0 = const (); // bb1[5]: scope 0 at $DIR/repeat.rs:5:11: 7:2 + StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32 + StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33 + StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33 + _0 = const (); // scope 0 at $DIR/repeat.rs:5:11: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/repeat.rs:5:11: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb1[6]: scope 0 at $DIR/repeat.rs:7:1: 7:2 - return; // bb1[7]: scope 0 at $DIR/repeat.rs:7:2: 7:2 + StorageDead(_1); // scope 0 at $DIR/repeat.rs:7:1: 7:2 + return; // scope 0 at $DIR/repeat.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff b/src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff index 3453c424a368b..fc7d028277bd9 100644 --- a/src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff +++ b/src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff @@ -6,8 +6,8 @@ let mut _1: (u32, bool); // in scope 0 at $DIR/return_place.rs:6:5: 6:10 bb0: { -- _1 = CheckedAdd(const 2u32, const 2u32); // bb0[0]: scope 0 at $DIR/return_place.rs:6:5: 6:10 -+ _1 = (const 4u32, const false); // bb0[0]: scope 0 at $DIR/return_place.rs:6:5: 6:10 +- _1 = CheckedAdd(const 2u32, const 2u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10 ++ _1 = (const 4u32, const false); // scope 0 at $DIR/return_place.rs:6:5: 6:10 // ty::Const // + ty: u32 - // + val: Value(Scalar(0x00000002)) @@ -25,10 +25,10 @@ // mir::Constant - // + span: $DIR/return_place.rs:6:9: 6:10 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } -- assert(!move (_1.1: bool), "attempt to add with overflow") -> bb1; // bb0[1]: scope 0 at $DIR/return_place.rs:6:5: 6:10 +- assert(!move (_1.1: bool), "attempt to add with overflow") -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10 + // + span: $DIR/return_place.rs:6:5: 6:10 + // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ assert(!const false, "attempt to add with overflow") -> bb1; // bb0[1]: scope 0 at $DIR/return_place.rs:6:5: 6:10 ++ assert(!const false, "attempt to add with overflow") -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x00)) @@ -38,15 +38,15 @@ } bb1: { -- _0 = move (_1.0: u32); // bb1[0]: scope 0 at $DIR/return_place.rs:6:5: 6:10 -+ _0 = const 4u32; // bb1[0]: scope 0 at $DIR/return_place.rs:6:5: 6:10 +- _0 = move (_1.0: u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10 ++ _0 = const 4u32; // scope 0 at $DIR/return_place.rs:6:5: 6:10 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x00000004)) + // mir::Constant + // + span: $DIR/return_place.rs:6:5: 6:10 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000004)) } - return; // bb1[1]: scope 0 at $DIR/return_place.rs:7:2: 7:2 + return; // scope 0 at $DIR/return_place.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir b/src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir index 9af6be771ed2b..b741c786fb394 100644 --- a/src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir +++ b/src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir @@ -4,13 +4,13 @@ fn add() -> u32 { let mut _0: u32; // return place in scope 0 at $DIR/return_place.rs:5:13: 5:16 bb0: { - _0 = const 4u32; // bb0[0]: scope 0 at $DIR/return_place.rs:6:5: 6:10 + _0 = const 4u32; // scope 0 at $DIR/return_place.rs:6:5: 6:10 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000004)) // mir::Constant // + span: $DIR/return_place.rs:6:5: 6:10 // + literal: Const { ty: u32, val: Value(Scalar(0x00000004)) } - return; // bb0[1]: scope 0 at $DIR/return_place.rs:7:2: 7:2 + return; // scope 0 at $DIR/return_place.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff index 018180954553d..9471dbef410d1 100644 --- a/src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff @@ -14,47 +14,47 @@ let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/slice_len.rs:5:5: 5:30 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - StorageLive(_4); // bb0[3]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - _9 = const main::promoted[0]; // bb0[4]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 + StorageLive(_1); // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + StorageLive(_2); // scope 0 at $DIR/slice_len.rs:5:5: 5:30 + StorageLive(_3); // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + StorageLive(_4); // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + _9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19 // ty::Const // + ty: &[u32; 3] // + val: Unevaluated(DefId(0:3 ~ slice_len[317d]::main[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/slice_len.rs:5:6: 5:19 // + literal: Const { ty: &[u32; 3], val: Unevaluated(DefId(0:3 ~ slice_len[317d]::main[0]), [], Some(promoted[0])) } - _4 = _9; // bb0[5]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - _3 = _4; // bb0[6]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - _2 = move _3 as &[u32] (Pointer(Unsize)); // bb0[7]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - StorageDead(_3); // bb0[8]: scope 0 at $DIR/slice_len.rs:5:18: 5:19 - StorageLive(_6); // bb0[9]: scope 0 at $DIR/slice_len.rs:5:31: 5:32 - _6 = const 1usize; // bb0[10]: scope 0 at $DIR/slice_len.rs:5:31: 5:32 + _4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + _3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + _2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19 + StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32 + _6 = const 1usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/slice_len.rs:5:31: 5:32 // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } -- _7 = Len((*_2)); // bb0[11]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -- _8 = Lt(_6, _7); // bb0[12]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // bb0[13]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -+ _7 = const 3usize; // bb0[11]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- _7 = Len((*_2)); // scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ _7 = const 3usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: usize + // + val: Value(Scalar(0x00000003)) + // mir::Constant + // + span: $DIR/slice_len.rs:5:5: 5:33 + // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } -+ _8 = const true; // bb0[12]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/slice_len.rs:5:5: 5:33 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // bb0[13]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -64,26 +64,26 @@ } bb1: { -- _1 = (*_2)[_6]; // bb1[0]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -+ _1 = const 2u32; // bb1[0]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ _1 = const 2u32; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/slice_len.rs:5:5: 5:33 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageDead(_6); // bb1[1]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - StorageDead(_4); // bb1[2]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - StorageDead(_2); // bb1[3]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - StorageDead(_1); // bb1[4]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - _0 = const (); // bb1[5]: scope 0 at $DIR/slice_len.rs:4:11: 6:2 + StorageDead(_6); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + StorageDead(_1); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + _0 = const (); // scope 0 at $DIR/slice_len.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/slice_len.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb1[6]: scope 0 at $DIR/slice_len.rs:6:2: 6:2 + return; // scope 0 at $DIR/slice_len.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff index f1379446d7ad7..3ae88e0d79863 100644 --- a/src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff @@ -14,47 +14,47 @@ let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/slice_len.rs:5:5: 5:30 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - StorageLive(_4); // bb0[3]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - _9 = const main::promoted[0]; // bb0[4]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 + StorageLive(_1); // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + StorageLive(_2); // scope 0 at $DIR/slice_len.rs:5:5: 5:30 + StorageLive(_3); // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + StorageLive(_4); // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + _9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19 // ty::Const // + ty: &[u32; 3] // + val: Unevaluated(DefId(0:3 ~ slice_len[317d]::main[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/slice_len.rs:5:6: 5:19 // + literal: Const { ty: &[u32; 3], val: Unevaluated(DefId(0:3 ~ slice_len[317d]::main[0]), [], Some(promoted[0])) } - _4 = _9; // bb0[5]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - _3 = _4; // bb0[6]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - _2 = move _3 as &[u32] (Pointer(Unsize)); // bb0[7]: scope 0 at $DIR/slice_len.rs:5:6: 5:19 - StorageDead(_3); // bb0[8]: scope 0 at $DIR/slice_len.rs:5:18: 5:19 - StorageLive(_6); // bb0[9]: scope 0 at $DIR/slice_len.rs:5:31: 5:32 - _6 = const 1usize; // bb0[10]: scope 0 at $DIR/slice_len.rs:5:31: 5:32 + _4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + _3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + _2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19 + StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19 + StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32 + _6 = const 1usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $DIR/slice_len.rs:5:31: 5:32 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } -- _7 = Len((*_2)); // bb0[11]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -- _8 = Lt(_6, _7); // bb0[12]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // bb0[13]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -+ _7 = const 3usize; // bb0[11]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- _7 = Len((*_2)); // scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ _7 = const 3usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: usize + // + val: Value(Scalar(0x0000000000000003)) + // mir::Constant + // + span: $DIR/slice_len.rs:5:5: 5:33 + // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } -+ _8 = const true; // bb0[12]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) + // mir::Constant + // + span: $DIR/slice_len.rs:5:5: 5:33 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ assert(const true, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // bb0[13]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ assert(const true, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: bool + // + val: Value(Scalar(0x01)) @@ -64,26 +64,26 @@ } bb1: { -- _1 = (*_2)[_6]; // bb1[0]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 -+ _1 = const 2u32; // bb1[0]: scope 0 at $DIR/slice_len.rs:5:5: 5:33 +- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 ++ _1 = const 2u32; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + // ty::Const + // + ty: u32 + // + val: Value(Scalar(0x00000002)) + // mir::Constant + // + span: $DIR/slice_len.rs:5:5: 5:33 + // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageDead(_6); // bb1[1]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - StorageDead(_4); // bb1[2]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - StorageDead(_2); // bb1[3]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - StorageDead(_1); // bb1[4]: scope 0 at $DIR/slice_len.rs:5:33: 5:34 - _0 = const (); // bb1[5]: scope 0 at $DIR/slice_len.rs:4:11: 6:2 + StorageDead(_6); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + StorageDead(_1); // scope 0 at $DIR/slice_len.rs:5:33: 5:34 + _0 = const (); // scope 0 at $DIR/slice_len.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/slice_len.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb1[6]: scope 0 at $DIR/slice_len.rs:6:2: 6:2 + return; // scope 0 at $DIR/slice_len.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff index 92b14309bf2b7..8072424729ab0 100644 --- a/src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff @@ -6,16 +6,16 @@ let mut _1: i32; // in scope 0 at $DIR/switch_int.rs:7:11: 7:12 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/switch_int.rs:7:11: 7:12 - _1 = const 1i32; // bb0[1]: scope 0 at $DIR/switch_int.rs:7:11: 7:12 + StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12 + _1 = const 1i32; // scope 0 at $DIR/switch_int.rs:7:11: 7:12 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/switch_int.rs:7:11: 7:12 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -- switchInt(_1) -> [1i32: bb2, otherwise: bb1]; // bb0[2]: scope 0 at $DIR/switch_int.rs:8:9: 8:10 -+ switchInt(const 1i32) -> [1i32: bb2, otherwise: bb1]; // bb0[2]: scope 0 at $DIR/switch_int.rs:8:9: 8:10 +- switchInt(_1) -> [1i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10 ++ switchInt(const 1i32) -> [1i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10 + // ty::Const + // + ty: i32 + // + val: Value(Scalar(0x00000001)) @@ -25,7 +25,7 @@ } bb1: { - _0 = const foo(const -1i32) -> bb3; // bb1[0]: scope 0 at $DIR/switch_int.rs:9:14: 9:21 + _0 = const foo(const -1i32) -> bb3; // scope 0 at $DIR/switch_int.rs:9:14: 9:21 // ty::Const // + ty: fn(i32) {foo} // + val: Value(Scalar()) @@ -41,7 +41,7 @@ } bb2: { - _0 = const foo(const 0i32) -> bb3; // bb2[0]: scope 0 at $DIR/switch_int.rs:8:14: 8:20 + _0 = const foo(const 0i32) -> bb3; // scope 0 at $DIR/switch_int.rs:8:14: 8:20 // ty::Const // + ty: fn(i32) {foo} // + val: Value(Scalar()) @@ -57,8 +57,8 @@ } bb3: { - StorageDead(_1); // bb3[0]: scope 0 at $DIR/switch_int.rs:11:1: 11:2 - return; // bb3[1]: scope 0 at $DIR/switch_int.rs:11:2: 11:2 + StorageDead(_1); // scope 0 at $DIR/switch_int.rs:11:1: 11:2 + return; // scope 0 at $DIR/switch_int.rs:11:2: 11:2 } } diff --git a/src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff index e1805cc57311d..51f3bf20c1aea 100644 --- a/src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff +++ b/src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff @@ -6,26 +6,26 @@ let mut _1: i32; // in scope 0 at $DIR/switch_int.rs:7:11: 7:12 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/switch_int.rs:7:11: 7:12 - _1 = const 1i32; // bb0[1]: scope 0 at $DIR/switch_int.rs:7:11: 7:12 + StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12 + _1 = const 1i32; // scope 0 at $DIR/switch_int.rs:7:11: 7:12 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/switch_int.rs:7:11: 7:12 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -- switchInt(const 1i32) -> [1i32: bb2, otherwise: bb1]; // bb0[2]: scope 0 at $DIR/switch_int.rs:8:9: 8:10 +- switchInt(const 1i32) -> [1i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/switch_int.rs:8:9: 8:10 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ goto -> bb2; // bb0[2]: scope 0 at $DIR/switch_int.rs:8:9: 8:10 ++ goto -> bb2; // scope 0 at $DIR/switch_int.rs:8:9: 8:10 } bb1: { - _0 = const foo(const -1i32) -> bb3; // bb1[0]: scope 0 at $DIR/switch_int.rs:9:14: 9:21 + _0 = const foo(const -1i32) -> bb3; // scope 0 at $DIR/switch_int.rs:9:14: 9:21 // ty::Const // + ty: fn(i32) {foo} // + val: Value(Scalar()) @@ -41,7 +41,7 @@ } bb2: { - _0 = const foo(const 0i32) -> bb3; // bb2[0]: scope 0 at $DIR/switch_int.rs:8:14: 8:20 + _0 = const foo(const 0i32) -> bb3; // scope 0 at $DIR/switch_int.rs:8:14: 8:20 // ty::Const // + ty: fn(i32) {foo} // + val: Value(Scalar()) @@ -57,8 +57,8 @@ } bb3: { - StorageDead(_1); // bb3[0]: scope 0 at $DIR/switch_int.rs:11:1: 11:2 - return; // bb3[1]: scope 0 at $DIR/switch_int.rs:11:2: 11:2 + StorageDead(_1); // scope 0 at $DIR/switch_int.rs:11:1: 11:2 + return; // scope 0 at $DIR/switch_int.rs:11:2: 11:2 } } diff --git a/src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff b/src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff index 4e9d4c56cd6ef..f2838638aca0e 100644 --- a/src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff @@ -11,15 +11,15 @@ } bb0: { -- StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation.rs:4:9: 4:10 -- _2 = _1; // bb0[1]: scope 0 at $DIR/copy_propagation.rs:4:13: 4:14 -- _0 = _2; // bb0[2]: scope 1 at $DIR/copy_propagation.rs:5:5: 5:6 -- StorageDead(_2); // bb0[3]: scope 0 at $DIR/copy_propagation.rs:6:1: 6:2 -+ nop; // bb0[0]: scope 0 at $DIR/copy_propagation.rs:4:9: 4:10 -+ nop; // bb0[1]: scope 0 at $DIR/copy_propagation.rs:4:13: 4:14 -+ _0 = _1; // bb0[2]: scope 1 at $DIR/copy_propagation.rs:5:5: 5:6 -+ nop; // bb0[3]: scope 0 at $DIR/copy_propagation.rs:6:1: 6:2 - return; // bb0[4]: scope 0 at $DIR/copy_propagation.rs:6:2: 6:2 +- StorageLive(_2); // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10 +- _2 = _1; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14 +- _0 = _2; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6 +- StorageDead(_2); // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2 ++ nop; // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10 ++ nop; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14 ++ _0 = _1; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6 ++ nop; // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2 + return; // scope 0 at $DIR/copy_propagation.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff index db3f588d99987..b976449ca6d32 100644 --- a/src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff @@ -10,18 +10,18 @@ } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10 - _2 = _1; // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14 - _1 = const 123i32; // bb0[2]: scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12 + StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10 + _2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14 + _1 = const 123i32; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000007b)) // mir::Constant // + span: $DIR/copy_propagation_arg.rs:29:5: 29:12 // + literal: Const { ty: i32, val: Value(Scalar(0x0000007b)) } - _0 = _2; // bb0[3]: scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6 - StorageDead(_2); // bb0[4]: scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2 - return; // bb0[5]: scope 0 at $DIR/copy_propagation_arg.rs:31:2: 31:2 + _0 = _2; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6 + StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2 + return; // scope 0 at $DIR/copy_propagation_arg.rs:31:2: 31:2 } } diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff index 16bdb7d0a9921..26f8068f674ef 100644 --- a/src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff @@ -8,10 +8,10 @@ let mut _3: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 - _3 = _1; // bb0[2]: scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 - _2 = const dummy(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 + StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 + StorageLive(_3); // scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 + _3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:16:11: 16:12 + _2 = const dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:16:5: 16:13 // ty::Const // + ty: fn(u8) -> u8 {dummy} // + val: Value(Scalar()) @@ -21,23 +21,23 @@ } bb1: { - StorageDead(_3); // bb1[0]: scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13 - StorageDead(_2); // bb1[1]: scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14 - _1 = const 5u8; // bb1[2]: scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10 + StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13 + StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14 + _1 = const 5u8; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10 // ty::Const // + ty: u8 // + val: Value(Scalar(0x05)) // mir::Constant // + span: $DIR/copy_propagation_arg.rs:17:5: 17:10 // + literal: Const { ty: u8, val: Value(Scalar(0x05)) } - _0 = const (); // bb1[3]: scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2 + _0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/copy_propagation_arg.rs:15:19: 18:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb1[4]: scope 0 at $DIR/copy_propagation_arg.rs:18:2: 18:2 + return; // scope 0 at $DIR/copy_propagation_arg.rs:18:2: 18:2 } } diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff index 7df995c990a30..ee20553f7cc3f 100644 --- a/src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff @@ -7,18 +7,18 @@ let mut _2: i32; // in scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 - _2 = _1; // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 - _1 = move _2; // bb0[2]: scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10 - StorageDead(_2); // bb0[3]: scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 - _0 = const (); // bb0[4]: scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2 + StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 + _2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 + _1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10 + StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10 + _0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/copy_propagation_arg.rs:21:20: 24:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb0[5]: scope 0 at $DIR/copy_propagation_arg.rs:24:2: 24:2 + return; // scope 0 at $DIR/copy_propagation_arg.rs:24:2: 24:2 } } diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff index 67b58c30f054a..33aaa7486787d 100644 --- a/src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff @@ -8,10 +8,10 @@ let mut _3: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 - _3 = _1; // bb0[2]: scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 - _2 = const dummy(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 + StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 + StorageLive(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 + _3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 + _2 = const dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 // ty::Const // + ty: fn(u8) -> u8 {dummy} // + val: Value(Scalar()) @@ -21,17 +21,17 @@ } bb1: { - StorageDead(_3); // bb1[0]: scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17 - _1 = move _2; // bb1[1]: scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17 - StorageDead(_2); // bb1[2]: scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17 - _0 = const (); // bb1[3]: scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2 + StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17 + _1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17 + StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17 + _0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/copy_propagation_arg.rs:9:19: 12:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb1[4]: scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2 + return; // scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2 } } diff --git a/src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff index 082f05a50c10b..524156e0b929d 100644 --- a/src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff +++ b/src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff @@ -7,28 +7,26 @@ let mut _2: usize; // in scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15 - _2 = _1; // bb0[1]: scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15 -- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // bb0[2]: scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 -+ (_0.0: usize) = move _2; // bb0[2]: scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 -+ (_0.1: f32) = const 0f32; // bb0[3]: scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 + StorageLive(_2); // scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15 + _2 = _1; // scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15 +- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 ++ (_0.0: usize) = move _2; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 ++ (_0.1: f32) = const 0f32; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 // ty::Const // + ty: f32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/deaggregator_test.rs:9:20: 9:23 // + literal: Const { ty: f32, val: Value(Scalar(0x00000000)) } -+ (_0.2: bool) = const false; // bb0[4]: scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 ++ (_0.2: bool) = const false; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/deaggregator_test.rs:9:28: 9:33 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -- StorageDead(_2); // bb0[3]: scope 0 at $DIR/deaggregator_test.rs:9:34: 9:35 -- return; // bb0[4]: scope 0 at $DIR/deaggregator_test.rs:10:2: 10:2 -+ StorageDead(_2); // bb0[5]: scope 0 at $DIR/deaggregator_test.rs:9:34: 9:35 -+ return; // bb0[6]: scope 0 at $DIR/deaggregator_test.rs:10:2: 10:2 + StorageDead(_2); // scope 0 at $DIR/deaggregator_test.rs:9:34: 9:35 + return; // scope 0 at $DIR/deaggregator_test.rs:10:2: 10:2 } } diff --git a/src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff index b1839ef7e0e16..5af9a53669379 100644 --- a/src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff +++ b/src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff @@ -7,15 +7,13 @@ let mut _2: usize; // in scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20 - _2 = _1; // bb0[1]: scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20 -- _0 = Baz::Foo { x: move _2 }; // bb0[2]: scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22 -- StorageDead(_2); // bb0[3]: scope 0 at $DIR/deaggregator_test_enum.rs:8:21: 8:22 -- return; // bb0[4]: scope 0 at $DIR/deaggregator_test_enum.rs:9:2: 9:2 -+ ((_0 as Foo).0: usize) = move _2; // bb0[2]: scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22 -+ discriminant(_0) = 1; // bb0[3]: scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22 -+ StorageDead(_2); // bb0[4]: scope 0 at $DIR/deaggregator_test_enum.rs:8:21: 8:22 -+ return; // bb0[5]: scope 0 at $DIR/deaggregator_test_enum.rs:9:2: 9:2 + StorageLive(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20 + _2 = _1; // scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20 +- _0 = Baz::Foo { x: move _2 }; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22 ++ ((_0 as Foo).0: usize) = move _2; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22 ++ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22 + StorageDead(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:8:21: 8:22 + return; // scope 0 at $DIR/deaggregator_test_enum.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff index 3256e59e3eba9..bf99f7efb4dd6 100644 --- a/src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff +++ b/src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff @@ -10,38 +10,34 @@ let mut _5: i32; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17 bb0: { - StorageLive(_3); // bb0[0]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9 - _3 = _1; // bb0[1]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9 - switchInt(_3) -> [false: bb1, otherwise: bb2]; // bb0[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 + StorageLive(_3); // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9 + _3 = _1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9 + switchInt(_3) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 } bb1: { - StorageLive(_5); // bb1[0]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17 - _5 = _2; // bb1[1]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17 -- _0 = Foo::B(move _5); // bb1[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18 -- StorageDead(_5); // bb1[3]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18 -- goto -> bb3; // bb1[4]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 -+ ((_0 as B).0: i32) = move _5; // bb1[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18 -+ discriminant(_0) = 1; // bb1[3]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18 -+ StorageDead(_5); // bb1[4]: scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18 -+ goto -> bb3; // bb1[5]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 + StorageLive(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17 + _5 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17 +- _0 = Foo::B(move _5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18 ++ ((_0 as B).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18 ++ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18 + StorageDead(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18 + goto -> bb3; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 } bb2: { - StorageLive(_4); // bb2[0]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17 - _4 = _2; // bb2[1]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17 -- _0 = Foo::A(move _4); // bb2[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18 -- StorageDead(_4); // bb2[3]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18 -- goto -> bb3; // bb2[4]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 -+ ((_0 as A).0: i32) = move _4; // bb2[2]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18 -+ discriminant(_0) = 0; // bb2[3]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18 -+ StorageDead(_4); // bb2[4]: scope 0 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18 -+ goto -> bb3; // bb2[5]: scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 + StorageLive(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17 + _4 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17 +- _0 = Foo::A(move _4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18 ++ ((_0 as A).0: i32) = move _4; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18 ++ discriminant(_0) = 0; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18 + StorageDead(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18 + goto -> bb3; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6 } bb3: { - StorageDead(_3); // bb3[0]: scope 0 at $DIR/deaggregator_test_enum_2.rs:15:1: 15:2 - return; // bb3[1]: scope 0 at $DIR/deaggregator_test_enum_2.rs:15:2: 15:2 + StorageDead(_3); // scope 0 at $DIR/deaggregator_test_enum_2.rs:15:1: 15:2 + return; // scope 0 at $DIR/deaggregator_test_enum_2.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff index 7d3ae6a16b2a8..f5d8d0607c60b 100644 --- a/src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff +++ b/src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff @@ -10,33 +10,24 @@ let mut _5: i32; // in scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14 - _3 = _1; // bb0[2]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14 -- _2 = Foo::A(move _3); // bb0[3]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 -- StorageDead(_3); // bb0[4]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:14: 10:15 -- StorageLive(_4); // bb0[5]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 -- StorageLive(_5); // bb0[6]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 -- _5 = _1; // bb0[7]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 -- _4 = Foo::A(move _5); // bb0[8]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 -- StorageDead(_5); // bb0[9]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:25: 10:26 -- _0 = [move _2, move _4]; // bb0[10]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:5: 10:27 -- StorageDead(_4); // bb0[11]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27 -- StorageDead(_2); // bb0[12]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27 -- return; // bb0[13]: scope 0 at $DIR/deaggregator_test_multiple.rs:11:2: 11:2 -+ ((_2 as A).0: i32) = move _3; // bb0[3]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 -+ discriminant(_2) = 0; // bb0[4]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 -+ StorageDead(_3); // bb0[5]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:14: 10:15 -+ StorageLive(_4); // bb0[6]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 -+ StorageLive(_5); // bb0[7]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 -+ _5 = _1; // bb0[8]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 -+ ((_4 as A).0: i32) = move _5; // bb0[9]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 -+ discriminant(_4) = 0; // bb0[10]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 -+ StorageDead(_5); // bb0[11]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:25: 10:26 -+ _0 = [move _2, move _4]; // bb0[12]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:5: 10:27 -+ StorageDead(_4); // bb0[13]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27 -+ StorageDead(_2); // bb0[14]: scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27 -+ return; // bb0[15]: scope 0 at $DIR/deaggregator_test_multiple.rs:11:2: 11:2 + StorageLive(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 + StorageLive(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14 + _3 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14 +- _2 = Foo::A(move _3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 ++ ((_2 as A).0: i32) = move _3; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 ++ discriminant(_2) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15 + StorageDead(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:14: 10:15 + StorageLive(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 + StorageLive(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 + _5 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25 +- _4 = Foo::A(move _5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 ++ ((_4 as A).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 ++ discriminant(_4) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26 + StorageDead(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:25: 10:26 + _0 = [move _2, move _4]; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:5: 10:27 + StorageDead(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27 + StorageDead(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27 + return; // scope 0 at $DIR/deaggregator_test_multiple.rs:11:2: 11:2 } } diff --git a/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir index 192ec1bbe2187..03d258d8f7289 100644 --- a/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir @@ -18,96 +18,96 @@ fn match_tuple(_1: (u32, bool, std::option::Option, u32)) -> u32 { } bb0: { - FakeRead(ForMatchedPlace, _1); // bb0[0]: scope 0 at $DIR/exponential-or.rs:7:11: 7:12 - switchInt((_1.0: u32)) -> [1u32: bb2, 4u32: bb2, otherwise: bb1]; // bb0[1]: scope 0 at $DIR/exponential-or.rs:8:15: 8:16 + FakeRead(ForMatchedPlace, _1); // scope 0 at $DIR/exponential-or.rs:7:11: 7:12 + switchInt((_1.0: u32)) -> [1u32: bb2, 4u32: bb2, otherwise: bb1]; // scope 0 at $DIR/exponential-or.rs:8:15: 8:16 } bb1: { - _0 = const 0u32; // bb1[0]: scope 0 at $DIR/exponential-or.rs:9:14: 9:15 + _0 = const 0u32; // scope 0 at $DIR/exponential-or.rs:9:14: 9:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/exponential-or.rs:9:14: 9:15 // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - goto -> bb10; // bb1[1]: scope 0 at $DIR/exponential-or.rs:7:5: 10:6 + goto -> bb10; // scope 0 at $DIR/exponential-or.rs:7:5: 10:6 } bb2: { - _2 = discriminant((_1.2: std::option::Option)); // bb2[0]: scope 0 at $DIR/exponential-or.rs:8:37: 8:48 - switchInt(move _2) -> [0isize: bb4, 1isize: bb3, otherwise: bb1]; // bb2[1]: scope 0 at $DIR/exponential-or.rs:8:37: 8:48 + _2 = discriminant((_1.2: std::option::Option)); // scope 0 at $DIR/exponential-or.rs:8:37: 8:48 + switchInt(move _2) -> [0isize: bb4, 1isize: bb3, otherwise: bb1]; // scope 0 at $DIR/exponential-or.rs:8:37: 8:48 } bb3: { - switchInt((((_1.2: std::option::Option) as Some).0: i32)) -> [1i32: bb4, 8i32: bb4, otherwise: bb1]; // bb3[0]: scope 0 at $DIR/exponential-or.rs:8:42: 8:43 + switchInt((((_1.2: std::option::Option) as Some).0: i32)) -> [1i32: bb4, 8i32: bb4, otherwise: bb1]; // scope 0 at $DIR/exponential-or.rs:8:42: 8:43 } bb4: { - _5 = Le(const 6u32, (_1.3: u32)); // bb4[0]: scope 0 at $DIR/exponential-or.rs:8:62: 8:67 + _5 = Le(const 6u32, (_1.3: u32)); // scope 0 at $DIR/exponential-or.rs:8:62: 8:67 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000006)) // mir::Constant // + span: $DIR/exponential-or.rs:8:62: 8:67 // + literal: Const { ty: u32, val: Value(Scalar(0x00000006)) } - switchInt(move _5) -> [false: bb6, otherwise: bb5]; // bb4[1]: scope 0 at $DIR/exponential-or.rs:8:62: 8:67 + switchInt(move _5) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/exponential-or.rs:8:62: 8:67 } bb5: { - _6 = Le((_1.3: u32), const 9u32); // bb5[0]: scope 0 at $DIR/exponential-or.rs:8:62: 8:67 + _6 = Le((_1.3: u32), const 9u32); // scope 0 at $DIR/exponential-or.rs:8:62: 8:67 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000009)) // mir::Constant // + span: $DIR/exponential-or.rs:8:62: 8:67 // + literal: Const { ty: u32, val: Value(Scalar(0x00000009)) } - switchInt(move _6) -> [false: bb6, otherwise: bb8]; // bb5[1]: scope 0 at $DIR/exponential-or.rs:8:62: 8:67 + switchInt(move _6) -> [false: bb6, otherwise: bb8]; // scope 0 at $DIR/exponential-or.rs:8:62: 8:67 } bb6: { - _3 = Le(const 13u32, (_1.3: u32)); // bb6[0]: scope 0 at $DIR/exponential-or.rs:8:70: 8:77 + _3 = Le(const 13u32, (_1.3: u32)); // scope 0 at $DIR/exponential-or.rs:8:70: 8:77 // ty::Const // + ty: u32 // + val: Value(Scalar(0x0000000d)) // mir::Constant // + span: $DIR/exponential-or.rs:8:70: 8:77 // + literal: Const { ty: u32, val: Value(Scalar(0x0000000d)) } - switchInt(move _3) -> [false: bb1, otherwise: bb7]; // bb6[1]: scope 0 at $DIR/exponential-or.rs:8:70: 8:77 + switchInt(move _3) -> [false: bb1, otherwise: bb7]; // scope 0 at $DIR/exponential-or.rs:8:70: 8:77 } bb7: { - _4 = Le((_1.3: u32), const 16u32); // bb7[0]: scope 0 at $DIR/exponential-or.rs:8:70: 8:77 + _4 = Le((_1.3: u32), const 16u32); // scope 0 at $DIR/exponential-or.rs:8:70: 8:77 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000010)) // mir::Constant // + span: $DIR/exponential-or.rs:8:70: 8:77 // + literal: Const { ty: u32, val: Value(Scalar(0x00000010)) } - switchInt(move _4) -> [false: bb1, otherwise: bb8]; // bb7[1]: scope 0 at $DIR/exponential-or.rs:8:70: 8:77 + switchInt(move _4) -> [false: bb1, otherwise: bb8]; // scope 0 at $DIR/exponential-or.rs:8:70: 8:77 } bb8: { - falseEdges -> [real: bb9, imaginary: bb1]; // bb8[0]: scope 0 at $DIR/exponential-or.rs:8:9: 8:79 + falseEdges -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/exponential-or.rs:8:9: 8:79 } bb9: { - StorageLive(_7); // bb9[0]: scope 0 at $DIR/exponential-or.rs:8:10: 8:21 - _7 = (_1.0: u32); // bb9[1]: scope 0 at $DIR/exponential-or.rs:8:10: 8:21 - StorageLive(_8); // bb9[2]: scope 0 at $DIR/exponential-or.rs:8:57: 8:78 - _8 = (_1.3: u32); // bb9[3]: scope 0 at $DIR/exponential-or.rs:8:57: 8:78 - StorageLive(_9); // bb9[4]: scope 1 at $DIR/exponential-or.rs:8:83: 8:84 - _9 = _7; // bb9[5]: scope 1 at $DIR/exponential-or.rs:8:83: 8:84 - StorageLive(_10); // bb9[6]: scope 1 at $DIR/exponential-or.rs:8:87: 8:88 - _10 = _8; // bb9[7]: scope 1 at $DIR/exponential-or.rs:8:87: 8:88 - _0 = BitXor(move _9, move _10); // bb9[8]: scope 1 at $DIR/exponential-or.rs:8:83: 8:88 - StorageDead(_10); // bb9[9]: scope 1 at $DIR/exponential-or.rs:8:87: 8:88 - StorageDead(_9); // bb9[10]: scope 1 at $DIR/exponential-or.rs:8:87: 8:88 - StorageDead(_8); // bb9[11]: scope 0 at $DIR/exponential-or.rs:8:88: 8:89 - StorageDead(_7); // bb9[12]: scope 0 at $DIR/exponential-or.rs:8:88: 8:89 - goto -> bb10; // bb9[13]: scope 0 at $DIR/exponential-or.rs:7:5: 10:6 + StorageLive(_7); // scope 0 at $DIR/exponential-or.rs:8:10: 8:21 + _7 = (_1.0: u32); // scope 0 at $DIR/exponential-or.rs:8:10: 8:21 + StorageLive(_8); // scope 0 at $DIR/exponential-or.rs:8:57: 8:78 + _8 = (_1.3: u32); // scope 0 at $DIR/exponential-or.rs:8:57: 8:78 + StorageLive(_9); // scope 1 at $DIR/exponential-or.rs:8:83: 8:84 + _9 = _7; // scope 1 at $DIR/exponential-or.rs:8:83: 8:84 + StorageLive(_10); // scope 1 at $DIR/exponential-or.rs:8:87: 8:88 + _10 = _8; // scope 1 at $DIR/exponential-or.rs:8:87: 8:88 + _0 = BitXor(move _9, move _10); // scope 1 at $DIR/exponential-or.rs:8:83: 8:88 + StorageDead(_10); // scope 1 at $DIR/exponential-or.rs:8:87: 8:88 + StorageDead(_9); // scope 1 at $DIR/exponential-or.rs:8:87: 8:88 + StorageDead(_8); // scope 0 at $DIR/exponential-or.rs:8:88: 8:89 + StorageDead(_7); // scope 0 at $DIR/exponential-or.rs:8:88: 8:89 + goto -> bb10; // scope 0 at $DIR/exponential-or.rs:7:5: 10:6 } bb10: { - return; // bb10[0]: scope 0 at $DIR/exponential-or.rs:11:2: 11:2 + return; // scope 0 at $DIR/exponential-or.rs:11:2: 11:2 } } diff --git a/src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir b/src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir index 887a4dd2cd383..c88b142428a3f 100644 --- a/src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir +++ b/src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir @@ -20,61 +20,61 @@ fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: } bb0: { - _9 = discriminant((*_1)); // bb0[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 - switchInt(move _9) -> [0u32: bb7, 3u32: bb11, otherwise: bb12]; // bb0[1]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + _9 = discriminant((*_1)); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + switchInt(move _9) -> [0u32: bb7, 3u32: bb11, otherwise: bb12]; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + resume; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb2 (cleanup): { - nop; // bb2[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 - goto -> bb8; // bb2[1]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + nop; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + goto -> bb8; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 } bb3: { - StorageDead(_5); // bb3[0]: scope 1 at $DIR/generator-drop-cleanup.rs:12:13: 12:14 - StorageDead(_4); // bb3[1]: scope 1 at $DIR/generator-drop-cleanup.rs:12:14: 12:15 - drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb4, unwind: bb2]; // bb3[2]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + StorageDead(_5); // scope 1 at $DIR/generator-drop-cleanup.rs:12:13: 12:14 + StorageDead(_4); // scope 1 at $DIR/generator-drop-cleanup.rs:12:14: 12:15 + drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb4, unwind: bb2]; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 } bb4: { - nop; // bb4[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 - goto -> bb9; // bb4[1]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + nop; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + goto -> bb9; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 } bb5: { - return; // bb5[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb6: { - return; // bb6[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb7: { - goto -> bb10; // bb7[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + goto -> bb10; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb8 (cleanup): { - goto -> bb1; // bb8[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + goto -> bb1; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 } bb9: { - goto -> bb5; // bb9[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 + goto -> bb5; // scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6 } bb10: { - goto -> bb6; // bb10[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + goto -> bb6; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb11: { - StorageLive(_4); // bb11[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 - StorageLive(_5); // bb11[1]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 - goto -> bb3; // bb11[2]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + StorageLive(_4); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + StorageLive(_5); // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + goto -> bb3; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } bb12: { - return; // bb12[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 + return; // scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 } } diff --git a/src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir b/src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir index 5d5f9dcc61d79..06645860d842d 100644 --- a/src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir +++ b/src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir @@ -20,39 +20,39 @@ yields () } bb0: { - StorageLive(_3); // bb0[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14 - _3 = Foo(const 5i32); // bb0[1]: scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23 + StorageLive(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14 + _3 = Foo(const 5i32); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000005)) // mir::Constant // + span: $DIR/generator-storage-dead-unwind.rs:23:21: 23:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } - StorageLive(_4); // bb0[2]: scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14 - _4 = Bar(const 6i32); // bb0[3]: scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23 + StorageLive(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14 + _4 = Bar(const 6i32); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000006)) // mir::Constant // + span: $DIR/generator-storage-dead-unwind.rs:24:21: 24:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000006)) } - StorageLive(_5); // bb0[4]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 - StorageLive(_6); // bb0[5]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 - _6 = (); // bb0[6]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 - _5 = yield(move _6) -> [resume: bb2, drop: bb4]; // bb0[7]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 + StorageLive(_5); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 + StorageLive(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 + _6 = (); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 + _5 = yield(move _6) -> [resume: bb2, drop: bb4]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:22:16: 28:6 + resume; // scope 0 at $DIR/generator-storage-dead-unwind.rs:22:16: 28:6 } bb2: { - StorageDead(_6); // bb2[0]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:13: 25:14 - StorageDead(_5); // bb2[1]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:14: 25:15 - StorageLive(_7); // bb2[2]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:9: 26:16 - StorageLive(_8); // bb2[3]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:14: 26:15 - _8 = move _3; // bb2[4]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:14: 26:15 - _7 = const take::(move _8) -> [return: bb7, unwind: bb9]; // bb2[5]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:9: 26:16 + StorageDead(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:13: 25:14 + StorageDead(_5); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:14: 25:15 + StorageLive(_7); // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:9: 26:16 + StorageLive(_8); // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:14: 26:15 + _8 = move _3; // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:14: 26:15 + _7 = const take::(move _8) -> [return: bb7, unwind: bb9]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:9: 26:16 // ty::Const // + ty: fn(Foo) {take::} // + val: Value(Scalar()) @@ -62,33 +62,33 @@ yields () } bb3 (cleanup): { - StorageDead(_3); // bb3[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - drop(_1) -> bb1; // bb3[1]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + drop(_1) -> bb1; // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 } bb4: { - StorageDead(_6); // bb4[0]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:13: 25:14 - StorageDead(_5); // bb4[1]: scope 2 at $DIR/generator-storage-dead-unwind.rs:25:14: 25:15 - StorageDead(_4); // bb4[2]: scope 1 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - drop(_3) -> [return: bb5, unwind: bb3]; // bb4[3]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:13: 25:14 + StorageDead(_5); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:14: 25:15 + StorageDead(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + drop(_3) -> [return: bb5, unwind: bb3]; // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 } bb5: { - StorageDead(_3); // bb5[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - drop(_1) -> [return: bb6, unwind: bb1]; // bb5[1]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + drop(_1) -> [return: bb6, unwind: bb1]; // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 } bb6: { - generator_drop; // bb6[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:22:16: 28:6 + generator_drop; // scope 0 at $DIR/generator-storage-dead-unwind.rs:22:16: 28:6 } bb7: { - StorageDead(_8); // bb7[0]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:15: 26:16 - StorageDead(_7); // bb7[1]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:16: 26:17 - StorageLive(_9); // bb7[2]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:9: 27:16 - StorageLive(_10); // bb7[3]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:14: 27:15 - _10 = move _4; // bb7[4]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:14: 27:15 - _9 = const take::(move _10) -> [return: bb10, unwind: bb11]; // bb7[5]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:9: 27:16 + StorageDead(_8); // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:15: 26:16 + StorageDead(_7); // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:16: 26:17 + StorageLive(_9); // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:9: 27:16 + StorageLive(_10); // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:14: 27:15 + _10 = move _4; // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:14: 27:15 + _9 = const take::(move _10) -> [return: bb10, unwind: bb11]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:9: 27:16 // ty::Const // + ty: fn(Bar) {take::} // + val: Value(Scalar()) @@ -98,39 +98,39 @@ yields () } bb8 (cleanup): { - StorageDead(_4); // bb8[0]: scope 1 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - StorageDead(_3); // bb8[1]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - drop(_1) -> bb1; // bb8[2]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + drop(_1) -> bb1; // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 } bb9 (cleanup): { - StorageDead(_8); // bb9[0]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:15: 26:16 - StorageDead(_7); // bb9[1]: scope 2 at $DIR/generator-storage-dead-unwind.rs:26:16: 26:17 - goto -> bb8; // bb9[2]: scope 2 at $DIR/generator-storage-dead-unwind.rs:1:1: 1:1 + StorageDead(_8); // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:15: 26:16 + StorageDead(_7); // scope 2 at $DIR/generator-storage-dead-unwind.rs:26:16: 26:17 + goto -> bb8; // scope 2 at $DIR/generator-storage-dead-unwind.rs:1:1: 1:1 } bb10: { - StorageDead(_10); // bb10[0]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:15: 27:16 - StorageDead(_9); // bb10[1]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:16: 27:17 - _0 = const (); // bb10[2]: scope 0 at $DIR/generator-storage-dead-unwind.rs:22:19: 28:6 + StorageDead(_10); // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:15: 27:16 + StorageDead(_9); // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:16: 27:17 + _0 = const (); // scope 0 at $DIR/generator-storage-dead-unwind.rs:22:19: 28:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/generator-storage-dead-unwind.rs:22:19: 28:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_4); // bb10[3]: scope 1 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - StorageDead(_3); // bb10[4]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 - drop(_1) -> [return: bb12, unwind: bb1]; // bb10[5]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + StorageDead(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 + drop(_1) -> [return: bb12, unwind: bb1]; // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:5: 28:6 } bb11 (cleanup): { - StorageDead(_10); // bb11[0]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:15: 27:16 - StorageDead(_9); // bb11[1]: scope 2 at $DIR/generator-storage-dead-unwind.rs:27:16: 27:17 - goto -> bb8; // bb11[2]: scope 2 at $DIR/generator-storage-dead-unwind.rs:1:1: 1:1 + StorageDead(_10); // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:15: 27:16 + StorageDead(_9); // scope 2 at $DIR/generator-storage-dead-unwind.rs:27:16: 27:17 + goto -> bb8; // scope 2 at $DIR/generator-storage-dead-unwind.rs:1:1: 1:1 } bb12: { - return; // bb12[0]: scope 0 at $DIR/generator-storage-dead-unwind.rs:28:6: 28:6 + return; // scope 0 at $DIR/generator-storage-dead-unwind.rs:28:6: 28:6 } } diff --git a/src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir b/src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir index dbab6ceffdcff..84b8af5d6b7bc 100644 --- a/src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir +++ b/src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir @@ -18,32 +18,32 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs: } bb0: { - _11 = discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}]))); // bb0[0]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 - switchInt(move _11) -> [0u32: bb1, 3u32: bb5, otherwise: bb6]; // bb0[1]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + _11 = discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}]))); // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + switchInt(move _11) -> [0u32: bb1, 3u32: bb5, otherwise: bb6]; // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 } bb1: { - _10 = move _2; // bb1[0]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 - nop; // bb1[1]: scope 0 at $DIR/generator-tiny.rs:19:13: 19:15 - (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}])) as variant#3).0: HasDrop) = HasDrop; // bb1[2]: scope 0 at $DIR/generator-tiny.rs:19:18: 19:25 - StorageLive(_4); // bb1[3]: scope 1 at $DIR/generator-tiny.rs:20:9: 23:10 - goto -> bb2; // bb1[4]: scope 1 at $DIR/generator-tiny.rs:20:9: 23:10 + _10 = move _2; // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + nop; // scope 0 at $DIR/generator-tiny.rs:19:13: 19:15 + (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}])) as variant#3).0: HasDrop) = HasDrop; // scope 0 at $DIR/generator-tiny.rs:19:18: 19:25 + StorageLive(_4); // scope 1 at $DIR/generator-tiny.rs:20:9: 23:10 + goto -> bb2; // scope 1 at $DIR/generator-tiny.rs:20:9: 23:10 } bb2: { - StorageLive(_6); // bb2[0]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 - StorageLive(_7); // bb2[1]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 - _7 = (); // bb2[2]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 - _0 = std::ops::GeneratorState::<(), ()>::Yielded(move _7); // bb2[3]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 - discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}]))) = 3; // bb2[4]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 - return; // bb2[5]: scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 + StorageLive(_6); // scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 + StorageLive(_7); // scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 + _7 = (); // scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 + _0 = std::ops::GeneratorState::<(), ()>::Yielded(move _7); // scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 + discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:18:16: 24:6 {u8, HasDrop, ()}]))) = 3; // scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 + return; // scope 1 at $DIR/generator-tiny.rs:21:13: 21:18 } bb3: { - StorageDead(_7); // bb3[0]: scope 1 at $DIR/generator-tiny.rs:21:17: 21:18 - StorageDead(_6); // bb3[1]: scope 1 at $DIR/generator-tiny.rs:21:18: 21:19 - StorageLive(_8); // bb3[2]: scope 1 at $DIR/generator-tiny.rs:22:13: 22:21 - _8 = const callee() -> bb4; // bb3[3]: scope 1 at $DIR/generator-tiny.rs:22:13: 22:21 + StorageDead(_7); // scope 1 at $DIR/generator-tiny.rs:21:17: 21:18 + StorageDead(_6); // scope 1 at $DIR/generator-tiny.rs:21:18: 21:19 + StorageLive(_8); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:21 + _8 = const callee() -> bb4; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:21 // ty::Const // + ty: fn() {callee} // + val: Value(Scalar()) @@ -53,26 +53,26 @@ fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs: } bb4: { - StorageDead(_8); // bb4[0]: scope 1 at $DIR/generator-tiny.rs:22:21: 22:22 - _5 = const (); // bb4[1]: scope 1 at $DIR/generator-tiny.rs:20:14: 23:10 + StorageDead(_8); // scope 1 at $DIR/generator-tiny.rs:22:21: 22:22 + _5 = const (); // scope 1 at $DIR/generator-tiny.rs:20:14: 23:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/generator-tiny.rs:20:14: 23:10 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb2; // bb4[2]: scope 1 at $DIR/generator-tiny.rs:20:9: 23:10 + goto -> bb2; // scope 1 at $DIR/generator-tiny.rs:20:9: 23:10 } bb5: { - StorageLive(_4); // bb5[0]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 - StorageLive(_6); // bb5[1]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 - StorageLive(_7); // bb5[2]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 - _6 = move _2; // bb5[3]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 - goto -> bb3; // bb5[4]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + StorageLive(_4); // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + StorageLive(_6); // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + StorageLive(_7); // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + _6 = move _2; // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + goto -> bb3; // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 } bb6: { - unreachable; // bb6[0]: scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 + unreachable; // scope 0 at $DIR/generator-tiny.rs:18:16: 24:6 } } diff --git a/src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir b/src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir index 058d9e70d2606..19748d52ec7e2 100644 --- a/src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir @@ -15,33 +15,33 @@ fn bar() -> bool { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/inline-any-operand.rs:11:9: 11:10 - _1 = const foo; // bb0[1]: scope 0 at $DIR/inline-any-operand.rs:11:13: 11:16 + StorageLive(_1); // scope 0 at $DIR/inline-any-operand.rs:11:9: 11:10 + _1 = const foo; // scope 0 at $DIR/inline-any-operand.rs:11:13: 11:16 // ty::Const // + ty: fn(i32, i32) -> bool {foo} // + val: Value(Scalar()) // mir::Constant // + span: $DIR/inline-any-operand.rs:11:13: 11:16 // + literal: Const { ty: fn(i32, i32) -> bool {foo}, val: Value(Scalar()) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6 - _2 = _1; // bb0[3]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6 - _3 = const 1i32; // bb0[4]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 + StorageLive(_2); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6 + _2 = _1; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6 + _3 = const 1i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/inline-any-operand.rs:12:7: 12:8 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - _4 = const -1i32; // bb0[5]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 + _4 = const -1i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13 // ty::Const // + ty: i32 // + val: Value(Scalar(0xffffffff)) // mir::Constant // + span: $DIR/inline-any-operand.rs:12:10: 12:12 // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) } - _0 = Eq(move _3, move _4); // bb0[6]: scope 2 at $DIR/inline-any-operand.rs:17:5: 17:11 - StorageDead(_2); // bb0[7]: scope 1 at $DIR/inline-any-operand.rs:12:12: 12:13 - StorageDead(_1); // bb0[8]: scope 0 at $DIR/inline-any-operand.rs:13:1: 13:2 - return; // bb0[9]: scope 0 at $DIR/inline-any-operand.rs:13:2: 13:2 + _0 = Eq(move _3, move _4); // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:11 + StorageDead(_2); // scope 1 at $DIR/inline-any-operand.rs:12:12: 12:13 + StorageDead(_1); // scope 0 at $DIR/inline-any-operand.rs:13:1: 13:2 + return; // scope 0 at $DIR/inline-any-operand.rs:13:2: 13:2 } } diff --git a/src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir b/src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir index a8e846d11817e..cea3c59a3e479 100644 --- a/src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir @@ -23,8 +23,8 @@ fn foo(_1: T, _2: &i32) -> i32 { } bb0: { - StorageLive(_3); // bb0[0]: scope 0 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10 - _3 = [closure@foo::::{{closure}}#0]; // bb0[1]: scope 0 at $DIR/inline-closure-borrows-arg.rs:12:13: 15:6 + StorageLive(_3); // scope 0 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10 + _3 = [closure@foo::::{{closure}}#0]; // scope 0 at $DIR/inline-closure-borrows-arg.rs:12:13: 15:6 // closure // + def_id: DefId(0:6 ~ inline_closure_borrows_arg[317d]::foo[0]::{{closure}}[0]) // + substs: [ @@ -33,22 +33,22 @@ fn foo(_1: T, _2: &i32) -> i32 { // for<'r, 's> extern "rust-call" fn((&'r i32, &'s i32)) -> i32, // (), // ] - StorageLive(_4); // bb0[2]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6 - _4 = &_3; // bb0[3]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6 - StorageLive(_5); // bb0[4]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - StorageLive(_6); // bb0[5]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8 - _6 = &(*_2); // bb0[6]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8 - StorageLive(_7); // bb0[7]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11 - _7 = &(*_2); // bb0[8]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11 - _5 = (move _6, move _7); // bb0[9]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - _8 = move (_5.0: &i32); // bb0[10]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - _9 = move (_5.1: &i32); // bb0[11]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 - _0 = (*_8); // bb0[12]: scope 3 at $DIR/inline-closure-borrows-arg.rs:14:9: 14:18 - StorageDead(_7); // bb0[13]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 - StorageDead(_6); // bb0[14]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 - StorageDead(_5); // bb0[15]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 - StorageDead(_4); // bb0[16]: scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 - StorageDead(_3); // bb0[17]: scope 0 at $DIR/inline-closure-borrows-arg.rs:17:1: 17:2 - return; // bb0[18]: scope 0 at $DIR/inline-closure-borrows-arg.rs:17:2: 17:2 + StorageLive(_4); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6 + _4 = &_3; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6 + StorageLive(_5); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + StorageLive(_6); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8 + _6 = &(*_2); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8 + StorageLive(_7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11 + _7 = &(*_2); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11 + _5 = (move _6, move _7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + _8 = move (_5.0: &i32); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + _9 = move (_5.1: &i32); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12 + _0 = (*_8); // scope 3 at $DIR/inline-closure-borrows-arg.rs:14:9: 14:18 + StorageDead(_7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 + StorageDead(_6); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 + StorageDead(_5); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 + StorageDead(_4); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:11: 16:12 + StorageDead(_3); // scope 0 at $DIR/inline-closure-borrows-arg.rs:17:1: 17:2 + return; // scope 0 at $DIR/inline-closure-borrows-arg.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir b/src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir index 8f7c5615662b3..eeff914ccffb9 100644 --- a/src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir @@ -23,12 +23,12 @@ fn foo(_1: T, _2: i32) -> (i32, T) { } bb0: { - StorageLive(_3); // bb0[0]: scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10 - StorageLive(_4); // bb0[1]: scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 - _4 = &_2; // bb0[2]: scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 - StorageLive(_5); // bb0[3]: scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 - _5 = &_1; // bb0[4]: scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 - _3 = [closure@foo::::{{closure}}#0] { q: move _4, t: move _5 }; // bb0[5]: scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 + StorageLive(_3); // scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10 + StorageLive(_4); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 + _4 = &_2; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 + StorageLive(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 + _5 = &_1; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 + _3 = [closure@foo::::{{closure}}#0] { q: move _4, t: move _5 }; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24 // closure // + def_id: DefId(0:6 ~ inline_closure_captures[317d]::foo[0]::{{closure}}[0]) // + substs: [ @@ -37,27 +37,27 @@ fn foo(_1: T, _2: i32) -> (i32, T) { // extern "rust-call" fn((i32,)) -> (i32, T), // (&i32, &T), // ] - StorageDead(_5); // bb0[6]: scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24 - StorageDead(_4); // bb0[7]: scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24 - StorageLive(_6); // bb0[8]: scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6 - _6 = &_3; // bb0[9]: scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6 - StorageLive(_7); // bb0[10]: scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 - StorageLive(_8); // bb0[11]: scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8 - _8 = _2; // bb0[12]: scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8 - _7 = (move _8,); // bb0[13]: scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 - _11 = move (_7.0: i32); // bb0[14]: scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 - StorageLive(_9); // bb0[15]: scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 - _9 = (*((*_6).0: &i32)); // bb0[16]: scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 - StorageLive(_10); // bb0[17]: scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 - _10 = (*((*_6).1: &T)); // bb0[18]: scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 - (_0.0: i32) = move _9; // bb0[19]: scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24 - (_0.1: T) = move _10; // bb0[20]: scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24 - StorageDead(_10); // bb0[21]: scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24 - StorageDead(_9); // bb0[22]: scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24 - StorageDead(_8); // bb0[23]: scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 - StorageDead(_7); // bb0[24]: scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 - StorageDead(_6); // bb0[25]: scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 - StorageDead(_3); // bb0[26]: scope 0 at $DIR/inline-closure-captures.rs:13:1: 13:2 - return; // bb0[27]: scope 0 at $DIR/inline-closure-captures.rs:13:2: 13:2 + StorageDead(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24 + StorageDead(_4); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24 + StorageLive(_6); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6 + _6 = &_3; // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6 + StorageLive(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 + StorageLive(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8 + _8 = _2; // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8 + _7 = (move _8,); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 + _11 = move (_7.0: i32); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9 + StorageLive(_9); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 + _9 = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20 + StorageLive(_10); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 + _10 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23 + (_0.0: i32) = move _9; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24 + (_0.1: T) = move _10; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24 + StorageDead(_10); // scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24 + StorageDead(_9); // scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24 + StorageDead(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 + StorageDead(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 + StorageDead(_6); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9 + StorageDead(_3); // scope 0 at $DIR/inline-closure-captures.rs:13:1: 13:2 + return; // scope 0 at $DIR/inline-closure-captures.rs:13:2: 13:2 } } diff --git a/src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir b/src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir index e31032e8c6999..bd0ec8c7ddbd5 100644 --- a/src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir @@ -20,8 +20,8 @@ fn foo(_1: T, _2: i32) -> i32 { } bb0: { - StorageLive(_3); // bb0[0]: scope 0 at $DIR/inline-closure.rs:11:9: 11:10 - _3 = [closure@foo::::{{closure}}#0]; // bb0[1]: scope 0 at $DIR/inline-closure.rs:11:13: 11:24 + StorageLive(_3); // scope 0 at $DIR/inline-closure.rs:11:9: 11:10 + _3 = [closure@foo::::{{closure}}#0]; // scope 0 at $DIR/inline-closure.rs:11:13: 11:24 // closure // + def_id: DefId(0:6 ~ inline_closure[317d]::foo[0]::{{closure}}[0]) // + substs: [ @@ -30,22 +30,22 @@ fn foo(_1: T, _2: i32) -> i32 { // extern "rust-call" fn((i32, i32)) -> i32, // (), // ] - StorageLive(_4); // bb0[2]: scope 1 at $DIR/inline-closure.rs:12:5: 12:6 - _4 = &_3; // bb0[3]: scope 1 at $DIR/inline-closure.rs:12:5: 12:6 - StorageLive(_5); // bb0[4]: scope 1 at $DIR/inline-closure.rs:12:5: 12:12 - StorageLive(_6); // bb0[5]: scope 1 at $DIR/inline-closure.rs:12:7: 12:8 - _6 = _2; // bb0[6]: scope 1 at $DIR/inline-closure.rs:12:7: 12:8 - StorageLive(_7); // bb0[7]: scope 1 at $DIR/inline-closure.rs:12:10: 12:11 - _7 = _2; // bb0[8]: scope 1 at $DIR/inline-closure.rs:12:10: 12:11 - _5 = (move _6, move _7); // bb0[9]: scope 1 at $DIR/inline-closure.rs:12:5: 12:12 - _8 = move (_5.0: i32); // bb0[10]: scope 1 at $DIR/inline-closure.rs:12:5: 12:12 - _9 = move (_5.1: i32); // bb0[11]: scope 1 at $DIR/inline-closure.rs:12:5: 12:12 - _0 = _8; // bb0[12]: scope 2 at $DIR/inline-closure.rs:11:22: 11:24 - StorageDead(_7); // bb0[13]: scope 1 at $DIR/inline-closure.rs:12:11: 12:12 - StorageDead(_6); // bb0[14]: scope 1 at $DIR/inline-closure.rs:12:11: 12:12 - StorageDead(_5); // bb0[15]: scope 1 at $DIR/inline-closure.rs:12:11: 12:12 - StorageDead(_4); // bb0[16]: scope 1 at $DIR/inline-closure.rs:12:11: 12:12 - StorageDead(_3); // bb0[17]: scope 0 at $DIR/inline-closure.rs:13:1: 13:2 - return; // bb0[18]: scope 0 at $DIR/inline-closure.rs:13:2: 13:2 + StorageLive(_4); // scope 1 at $DIR/inline-closure.rs:12:5: 12:6 + _4 = &_3; // scope 1 at $DIR/inline-closure.rs:12:5: 12:6 + StorageLive(_5); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 + StorageLive(_6); // scope 1 at $DIR/inline-closure.rs:12:7: 12:8 + _6 = _2; // scope 1 at $DIR/inline-closure.rs:12:7: 12:8 + StorageLive(_7); // scope 1 at $DIR/inline-closure.rs:12:10: 12:11 + _7 = _2; // scope 1 at $DIR/inline-closure.rs:12:10: 12:11 + _5 = (move _6, move _7); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 + _8 = move (_5.0: i32); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 + _9 = move (_5.1: i32); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12 + _0 = _8; // scope 2 at $DIR/inline-closure.rs:11:22: 11:24 + StorageDead(_7); // scope 1 at $DIR/inline-closure.rs:12:11: 12:12 + StorageDead(_6); // scope 1 at $DIR/inline-closure.rs:12:11: 12:12 + StorageDead(_5); // scope 1 at $DIR/inline-closure.rs:12:11: 12:12 + StorageDead(_4); // scope 1 at $DIR/inline-closure.rs:12:11: 12:12 + StorageDead(_3); // scope 0 at $DIR/inline-closure.rs:13:1: 13:2 + return; // scope 0 at $DIR/inline-closure.rs:13:2: 13:2 } } diff --git a/src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff b/src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff index 7f2f7cdb17668..eca7ae0f549ab 100644 --- a/src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff +++ b/src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff @@ -14,12 +14,12 @@ + } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/inline-into-box-place.rs:8:9: 8:11 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 - _2 = Box(std::vec::Vec); // bb0[2]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -- (*_2) = const std::vec::Vec::::new() -> [return: bb2, unwind: bb4]; // bb0[3]: scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ _4 = &mut (*_2); // bb0[3]: scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: std::ptr::Unique:: { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData:: }, cap: 0usize, alloc: std::alloc::Global }; // bb0[4]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL + StorageLive(_1); // scope 0 at $DIR/inline-into-box-place.rs:8:9: 8:11 + StorageLive(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 + _2 = Box(std::vec::Vec); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 +- (*_2) = const std::vec::Vec::::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ _4 = &mut (*_2); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: std::ptr::Unique:: { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData:: }, cap: 0usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL // ty::Const - // + ty: fn() -> std::vec::Vec {std::vec::Vec::::new} - // + val: Value(Scalar()) @@ -32,45 +32,42 @@ - } - - bb1 (cleanup): { -- resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 +- resume; // scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 - } - - bb2: { -- _1 = move _2; // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -- StorageDead(_2); // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 -- _0 = const (); // bb2[2]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2 + // + span: $SRC_DIR/liballoc/vec.rs:LL:COL + // + user_ty: UserType(0) + // + literal: Const { ty: alloc::raw_vec::RawVec, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) } -+ ((*_4).1: usize) = const 0usize; // bb0[5]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL - // ty::Const ++ ((*_4).1: usize) = const 0usize; // scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL ++ // ty::Const + // + ty: usize + // + val: Value(Scalar(0x00000000)) + // mir::Constant + // + span: $SRC_DIR/liballoc/vec.rs:LL:COL + // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } -+ _1 = move _2; // bb0[6]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -+ StorageDead(_2); // bb0[7]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 -+ _0 = const (); // bb0[8]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2 -+ // ty::Const + _1 = move _2; // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 + StorageDead(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 + _0 = const (); // scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2 + // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/inline-into-box-place.rs:7:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } -- drop(_1) -> [return: bb3, unwind: bb1]; // bb2[3]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 -+ drop(_1) -> [return: bb2, unwind: bb1]; // bb0[9]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 +- drop(_1) -> [return: bb3, unwind: bb1]; // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 ++ drop(_1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 } - bb3: { -- StorageDead(_1); // bb3[0]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 -- return; // bb3[1]: scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 +- StorageDead(_1); // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 +- return; // scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 + bb1 (cleanup): { -+ resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 ++ resume; // scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 } - bb4 (cleanup): { -- _3 = const alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // bb4[0]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 +- _3 = const alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 - // ty::Const - // + ty: unsafe fn(std::ptr::Unique>) {alloc::alloc::box_free::>} - // + val: Value(Scalar()) @@ -78,8 +75,8 @@ - // + span: $DIR/inline-into-box-place.rs:8:42: 8:43 - // + literal: Const { ty: unsafe fn(std::ptr::Unique>) {alloc::alloc::box_free::>}, val: Value(Scalar()) } + bb2: { -+ StorageDead(_1); // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 -+ return; // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 ++ StorageDead(_1); // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 ++ return; // scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff b/src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff index b968b33ac5274..a371fa214f2c3 100644 --- a/src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff +++ b/src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff @@ -14,12 +14,12 @@ + } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/inline-into-box-place.rs:8:9: 8:11 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 - _2 = Box(std::vec::Vec); // bb0[2]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -- (*_2) = const std::vec::Vec::::new() -> [return: bb2, unwind: bb4]; // bb0[3]: scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ _4 = &mut (*_2); // bb0[3]: scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: std::ptr::Unique:: { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData:: }, cap: 0usize, alloc: std::alloc::Global }; // bb0[4]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL + StorageLive(_1); // scope 0 at $DIR/inline-into-box-place.rs:8:9: 8:11 + StorageLive(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 + _2 = Box(std::vec::Vec); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 +- (*_2) = const std::vec::Vec::::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ _4 = &mut (*_2); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 ++ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: std::ptr::Unique:: { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData:: }, cap: 0usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL // ty::Const - // + ty: fn() -> std::vec::Vec {std::vec::Vec::::new} - // + val: Value(Scalar()) @@ -32,45 +32,42 @@ - } - - bb1 (cleanup): { -- resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 +- resume; // scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 - } - - bb2: { -- _1 = move _2; // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -- StorageDead(_2); // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 -- _0 = const (); // bb2[2]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2 + // + span: $SRC_DIR/liballoc/vec.rs:LL:COL + // + user_ty: UserType(0) + // + literal: Const { ty: alloc::raw_vec::RawVec, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [65535], len: Size { raw: 16 } }, size: Size { raw: 16 }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) } -+ ((*_4).1: usize) = const 0usize; // bb0[5]: scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL - // ty::Const ++ ((*_4).1: usize) = const 0usize; // scope 2 at $SRC_DIR/liballoc/vec.rs:LL:COL ++ // ty::Const + // + ty: usize + // + val: Value(Scalar(0x0000000000000000)) + // mir::Constant + // + span: $SRC_DIR/liballoc/vec.rs:LL:COL + // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } -+ _1 = move _2; // bb0[6]: scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -+ StorageDead(_2); // bb0[7]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 -+ _0 = const (); // bb0[8]: scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2 -+ // ty::Const + _1 = move _2; // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 + StorageDead(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 + _0 = const (); // scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2 + // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/inline-into-box-place.rs:7:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } -- drop(_1) -> [return: bb3, unwind: bb1]; // bb2[3]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 -+ drop(_1) -> [return: bb2, unwind: bb1]; // bb0[9]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 +- drop(_1) -> [return: bb3, unwind: bb1]; // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 ++ drop(_1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 } - bb3: { -- StorageDead(_1); // bb3[0]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 -- return; // bb3[1]: scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 +- StorageDead(_1); // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 +- return; // scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 + bb1 (cleanup): { -+ resume; // bb1[0]: scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 ++ resume; // scope 0 at $DIR/inline-into-box-place.rs:7:1: 9:2 } - bb4 (cleanup): { -- _3 = const alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // bb4[0]: scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 +- _3 = const alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 - // ty::Const - // + ty: unsafe fn(std::ptr::Unique>) {alloc::alloc::box_free::>} - // + val: Value(Scalar()) @@ -78,8 +75,8 @@ - // + span: $DIR/inline-into-box-place.rs:8:42: 8:43 - // + literal: Const { ty: unsafe fn(std::ptr::Unique>) {alloc::alloc::box_free::>}, val: Value(Scalar()) } + bb2: { -+ StorageDead(_1); // bb2[0]: scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 -+ return; // bb2[1]: scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 ++ StorageDead(_1); // scope 0 at $DIR/inline-into-box-place.rs:9:1: 9:2 ++ return; // scope 0 at $DIR/inline-into-box-place.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir b/src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir index ae2226bd183d0..e83cc92eb43ef 100644 --- a/src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir @@ -23,59 +23,59 @@ fn bar() -> bool { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/inline-retag.rs:11:9: 11:10 - _1 = const foo; // bb0[1]: scope 0 at $DIR/inline-retag.rs:11:13: 11:16 + StorageLive(_1); // scope 0 at $DIR/inline-retag.rs:11:9: 11:10 + _1 = const foo; // scope 0 at $DIR/inline-retag.rs:11:13: 11:16 // ty::Const // + ty: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo} // + val: Value(Scalar()) // mir::Constant // + span: $DIR/inline-retag.rs:11:13: 11:16 // + literal: Const { ty: for<'r, 's> fn(&'r i32, &'s i32) -> bool {foo}, val: Value(Scalar()) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/inline-retag.rs:12:5: 12:6 - _2 = _1; // bb0[3]: scope 1 at $DIR/inline-retag.rs:12:5: 12:6 - StorageLive(_3); // bb0[4]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - StorageLive(_4); // bb0[5]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - _10 = const bar::promoted[1]; // bb0[6]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + StorageLive(_2); // scope 1 at $DIR/inline-retag.rs:12:5: 12:6 + _2 = _1; // scope 1 at $DIR/inline-retag.rs:12:5: 12:6 + StorageLive(_3); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + StorageLive(_4); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + _10 = const bar::promoted[1]; // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 // ty::Const // + ty: &i32 // + val: Unevaluated(DefId(0:4 ~ inline_retag[317d]::bar[0]), [], Some(promoted[1])) // mir::Constant // + span: $DIR/inline-retag.rs:12:7: 12:9 // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:4 ~ inline_retag[317d]::bar[0]), [], Some(promoted[1])) } - Retag(_10); // bb0[7]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - _4 = &(*_10); // bb0[8]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - Retag(_4); // bb0[9]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - _3 = &(*_4); // bb0[10]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - Retag(_3); // bb0[11]: scope 1 at $DIR/inline-retag.rs:12:7: 12:9 - StorageLive(_6); // bb0[12]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - StorageLive(_7); // bb0[13]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - _9 = const bar::promoted[0]; // bb0[14]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + Retag(_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + _4 = &(*_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + Retag(_4); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + _3 = &(*_4); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + Retag(_3); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9 + StorageLive(_6); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + StorageLive(_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + _9 = const bar::promoted[0]; // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 // ty::Const // + ty: &i32 // + val: Unevaluated(DefId(0:4 ~ inline_retag[317d]::bar[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/inline-retag.rs:12:11: 12:14 // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:4 ~ inline_retag[317d]::bar[0]), [], Some(promoted[0])) } - Retag(_9); // bb0[15]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - _7 = &(*_9); // bb0[16]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - Retag(_7); // bb0[17]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - _6 = &(*_7); // bb0[18]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - Retag(_6); // bb0[19]: scope 1 at $DIR/inline-retag.rs:12:11: 12:14 - Retag(_3); // bb0[20]: scope 2 at $DIR/inline-retag.rs:16:1: 18:2 - Retag(_6); // bb0[21]: scope 2 at $DIR/inline-retag.rs:16:1: 18:2 - StorageLive(_11); // bb0[22]: scope 2 at $DIR/inline-retag.rs:17:5: 17:7 - _11 = (*_3); // bb0[23]: scope 2 at $DIR/inline-retag.rs:17:5: 17:7 - StorageLive(_12); // bb0[24]: scope 2 at $DIR/inline-retag.rs:17:11: 17:13 - _12 = (*_6); // bb0[25]: scope 2 at $DIR/inline-retag.rs:17:11: 17:13 - _0 = Eq(move _11, move _12); // bb0[26]: scope 2 at $DIR/inline-retag.rs:17:5: 17:13 - StorageDead(_12); // bb0[27]: scope 2 at $DIR/inline-retag.rs:17:12: 17:13 - StorageDead(_11); // bb0[28]: scope 2 at $DIR/inline-retag.rs:17:12: 17:13 - StorageDead(_6); // bb0[29]: scope 1 at $DIR/inline-retag.rs:12:14: 12:15 - StorageDead(_3); // bb0[30]: scope 1 at $DIR/inline-retag.rs:12:14: 12:15 - StorageDead(_2); // bb0[31]: scope 1 at $DIR/inline-retag.rs:12:14: 12:15 - StorageDead(_1); // bb0[32]: scope 0 at $DIR/inline-retag.rs:13:1: 13:2 - StorageDead(_7); // bb0[33]: scope 0 at $DIR/inline-retag.rs:13:1: 13:2 - StorageDead(_4); // bb0[34]: scope 0 at $DIR/inline-retag.rs:13:1: 13:2 - return; // bb0[35]: scope 0 at $DIR/inline-retag.rs:13:2: 13:2 + Retag(_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + _7 = &(*_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + Retag(_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + _6 = &(*_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + Retag(_6); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14 + Retag(_3); // scope 2 at $DIR/inline-retag.rs:16:1: 18:2 + Retag(_6); // scope 2 at $DIR/inline-retag.rs:16:1: 18:2 + StorageLive(_11); // scope 2 at $DIR/inline-retag.rs:17:5: 17:7 + _11 = (*_3); // scope 2 at $DIR/inline-retag.rs:17:5: 17:7 + StorageLive(_12); // scope 2 at $DIR/inline-retag.rs:17:11: 17:13 + _12 = (*_6); // scope 2 at $DIR/inline-retag.rs:17:11: 17:13 + _0 = Eq(move _11, move _12); // scope 2 at $DIR/inline-retag.rs:17:5: 17:13 + StorageDead(_12); // scope 2 at $DIR/inline-retag.rs:17:12: 17:13 + StorageDead(_11); // scope 2 at $DIR/inline-retag.rs:17:12: 17:13 + StorageDead(_6); // scope 1 at $DIR/inline-retag.rs:12:14: 12:15 + StorageDead(_3); // scope 1 at $DIR/inline-retag.rs:12:14: 12:15 + StorageDead(_2); // scope 1 at $DIR/inline-retag.rs:12:14: 12:15 + StorageDead(_1); // scope 0 at $DIR/inline-retag.rs:13:1: 13:2 + StorageDead(_7); // scope 0 at $DIR/inline-retag.rs:13:1: 13:2 + StorageDead(_4); // scope 0 at $DIR/inline-retag.rs:13:1: 13:2 + return; // scope 0 at $DIR/inline-retag.rs:13:2: 13:2 } } diff --git a/src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff b/src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff index 35c400035a6ab..a3e0d0a57a7c3 100644 --- a/src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff +++ b/src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff @@ -11,9 +11,9 @@ + } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/inline-specialization.rs:5:9: 5:10 -- _1 = const as Foo>::bar() -> bb1; // bb0[1]: scope 0 at $DIR/inline-specialization.rs:5:13: 5:38 -+ _1 = const 123u32; // bb0[1]: scope 2 at $DIR/inline-specialization.rs:14:31: 14:34 + StorageLive(_1); // scope 0 at $DIR/inline-specialization.rs:5:9: 5:10 +- _1 = const as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:5:13: 5:38 ++ _1 = const 123u32; // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34 // ty::Const - // + ty: fn() -> u32 { as Foo>::bar} - // + val: Value(Scalar()) @@ -25,20 +25,17 @@ - } - - bb1: { -- _0 = const (); // bb1[0]: scope 0 at $DIR/inline-specialization.rs:4:11: 6:2 + // + span: $DIR/inline-specialization.rs:14:31: 14:34 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000007b)) } -+ _0 = const (); // bb0[2]: scope 0 at $DIR/inline-specialization.rs:4:11: 6:2 + _0 = const (); // scope 0 at $DIR/inline-specialization.rs:4:11: 6:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/inline-specialization.rs:4:11: 6:2 // + literal: Const { ty: (), val: Value(Scalar()) } -- StorageDead(_1); // bb1[1]: scope 0 at $DIR/inline-specialization.rs:6:1: 6:2 -- return; // bb1[2]: scope 0 at $DIR/inline-specialization.rs:6:2: 6:2 -+ StorageDead(_1); // bb0[3]: scope 0 at $DIR/inline-specialization.rs:6:1: 6:2 -+ return; // bb0[4]: scope 0 at $DIR/inline-specialization.rs:6:2: 6:2 + StorageDead(_1); // scope 0 at $DIR/inline-specialization.rs:6:1: 6:2 + return; // scope 0 at $DIR/inline-specialization.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir b/src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir index 488303e09ef64..8acc5ad5c0935 100644 --- a/src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir @@ -6,9 +6,9 @@ fn test(_1: &dyn X) -> u32 { let mut _2: &dyn X; // in scope 0 at $DIR/inline-trait-method.rs:9:5: 9:6 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/inline-trait-method.rs:9:5: 9:6 - _2 = &(*_1); // bb0[1]: scope 0 at $DIR/inline-trait-method.rs:9:5: 9:6 - _0 = const ::y(move _2) -> bb1; // bb0[2]: scope 0 at $DIR/inline-trait-method.rs:9:5: 9:10 + StorageLive(_2); // scope 0 at $DIR/inline-trait-method.rs:9:5: 9:6 + _2 = &(*_1); // scope 0 at $DIR/inline-trait-method.rs:9:5: 9:6 + _0 = const ::y(move _2) -> bb1; // scope 0 at $DIR/inline-trait-method.rs:9:5: 9:10 // ty::Const // + ty: for<'r> fn(&'r dyn X) -> u32 {::y} // + val: Value(Scalar()) @@ -18,7 +18,7 @@ fn test(_1: &dyn X) -> u32 { } bb1: { - StorageDead(_2); // bb1[0]: scope 0 at $DIR/inline-trait-method.rs:9:9: 9:10 - return; // bb1[1]: scope 0 at $DIR/inline-trait-method.rs:10:2: 10:2 + StorageDead(_2); // scope 0 at $DIR/inline-trait-method.rs:9:9: 9:10 + return; // scope 0 at $DIR/inline-trait-method.rs:10:2: 10:2 } } diff --git a/src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir b/src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir index aca47198aa953..afea1d5ebffa2 100644 --- a/src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir +++ b/src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir @@ -10,12 +10,12 @@ fn test2(_1: &dyn X) -> bool { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 - _3 = &(*_1); // bb0[2]: scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 - _2 = move _3 as &dyn X (Pointer(Unsize)); // bb0[3]: scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 - StorageDead(_3); // bb0[4]: scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 - _0 = const ::y(move _2) -> bb1; // bb0[5]: scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 + StorageLive(_2); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 + StorageLive(_3); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 + _3 = &(*_1); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 + _2 = move _3 as &dyn X (Pointer(Unsize)); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 + StorageDead(_3); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11 + _0 = const ::y(move _2) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10 // ty::Const // + ty: for<'r> fn(&'r dyn X) -> bool {::y} // + val: Value(Scalar()) @@ -25,7 +25,7 @@ fn test2(_1: &dyn X) -> bool { } bb1: { - StorageDead(_2); // bb1[0]: scope 0 at $DIR/inline-trait-method_2.rs:5:11: 5:12 - return; // bb1[1]: scope 0 at $DIR/inline-trait-method_2.rs:6:2: 6:2 + StorageDead(_2); // scope 0 at $DIR/inline-trait-method_2.rs:5:11: 5:12 + return; // scope 0 at $DIR/inline-trait-method_2.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir index c5d44cbafac41..d6c5220e28f5f 100644 --- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir +++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir @@ -12,19 +12,19 @@ fn a(_1: &mut [T]) -> &mut [T] { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - StorageLive(_4); // bb0[2]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6 - _4 = &mut (*_1); // bb0[3]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6 - StorageLive(_5); // bb0[4]: scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL - _5 = _4; // bb0[5]: scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL - _3 = _5; // bb0[6]: scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL - StorageDead(_5); // bb0[7]: scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL - _2 = &mut (*_3); // bb0[8]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - StorageDead(_4); // bb0[9]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:14: 3:15 - _0 = &mut (*_2); // bb0[10]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 - StorageDead(_3); // bb0[11]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:4:1: 4:2 - StorageDead(_2); // bb0[12]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:4:1: 4:2 - return; // bb0[13]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:4:2: 4:2 + StorageLive(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 + StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 + StorageLive(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6 + _4 = &mut (*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6 + StorageLive(_5); // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL + _5 = _4; // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL + _3 = _5; // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL + StorageDead(_5); // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL + _2 = &mut (*_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 + StorageDead(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:14: 3:15 + _0 = &mut (*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15 + StorageDead(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:4:1: 4:2 + StorageDead(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:4:1: 4:2 + return; // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:4:2: 4:2 } } diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir index 8384b949b954b..2270abc288d86 100644 --- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir +++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir @@ -13,22 +13,22 @@ fn b(_1: &mut std::boxed::Box) -> &mut T { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageLive(_4); // bb0[2]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6 - _4 = &mut (*_1); // bb0[3]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6 - StorageLive(_5); // bb0[4]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - StorageLive(_6); // bb0[5]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _6 = &mut (*(*_4)); // bb0[6]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _5 = _6; // bb0[7]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _3 = _5; // bb0[8]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - StorageDead(_6); // bb0[9]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - StorageDead(_5); // bb0[10]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _2 = &mut (*_3); // bb0[11]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageDead(_4); // bb0[12]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:14: 8:15 - _0 = &mut (*_2); // bb0[13]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 - StorageDead(_3); // bb0[14]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:9:1: 9:2 - StorageDead(_2); // bb0[15]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:9:1: 9:2 - return; // bb0[16]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:9:2: 9:2 + StorageLive(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 + StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 + StorageLive(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6 + _4 = &mut (*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6 + StorageLive(_5); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + StorageLive(_6); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _6 = &mut (*(*_4)); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _5 = _6; // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _3 = _5; // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + StorageDead(_6); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + StorageDead(_5); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _2 = &mut (*_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 + StorageDead(_4); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:14: 8:15 + _0 = &mut (*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 + StorageDead(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:9:1: 9:2 + StorageDead(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:9:1: 9:2 + return; // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.c.Inline.after.mir b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.c.Inline.after.mir index 5adb4a6831257..67aea63bd9558 100644 --- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.c.Inline.after.mir +++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.c.Inline.after.mir @@ -10,13 +10,13 @@ fn c(_1: &[T]) -> &[T] { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:6 - _3 = &(*_1); // bb0[2]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:6 - _2 = _3; // bb0[3]: scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL - _0 = &(*_2); // bb0[4]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 - StorageDead(_3); // bb0[5]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:14: 13:15 - StorageDead(_2); // bb0[6]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:14:1: 14:2 - return; // bb0[7]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:14:2: 14:2 + StorageLive(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 + StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:6 + _3 = &(*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:6 + _2 = _3; // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL + _0 = &(*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15 + StorageDead(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:14: 13:15 + StorageDead(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:14:1: 14:2 + return; // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:14:2: 14:2 } } diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir index d4d62dd788e00..a929cb1c2fb34 100644 --- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir +++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir @@ -11,16 +11,16 @@ fn d(_1: &std::boxed::Box) -> &T { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6 - _3 = &(*_1); // bb0[2]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6 - StorageLive(_4); // bb0[3]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _4 = &(*(*_3)); // bb0[4]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _2 = _4; // bb0[5]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - StorageDead(_4); // bb0[6]: scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL - _0 = &(*_2); // bb0[7]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 - StorageDead(_3); // bb0[8]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:14: 18:15 - StorageDead(_2); // bb0[9]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:19:1: 19:2 - return; // bb0[10]: scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:19:2: 19:2 + StorageLive(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 + StorageLive(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6 + _3 = &(*_1); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6 + StorageLive(_4); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _4 = &(*(*_3)); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _2 = _4; // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + StorageDead(_4); // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL + _0 = &(*_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 + StorageDead(_3); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:14: 18:15 + StorageDead(_2); // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:19:1: 19:2 + return; // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:19:2: 19:2 } } diff --git a/src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir index 62d2f8db7a43f..fa7bd2563ae44 100644 --- a/src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir @@ -12,76 +12,76 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/issue-38669.rs:5:9: 5:25 - _1 = const false; // bb0[1]: scope 0 at $DIR/issue-38669.rs:5:28: 5:33 + StorageLive(_1); // scope 0 at $DIR/issue-38669.rs:5:9: 5:25 + _1 = const false; // scope 0 at $DIR/issue-38669.rs:5:28: 5:33 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-38669.rs:5:28: 5:33 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/issue-38669.rs:5:9: 5:25 - goto -> bb2; // bb0[3]: scope 1 at $DIR/issue-38669.rs:6:5: 11:6 + FakeRead(ForLet, _1); // scope 0 at $DIR/issue-38669.rs:5:9: 5:25 + goto -> bb2; // scope 1 at $DIR/issue-38669.rs:6:5: 11:6 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-38669.rs:4:1: 12:2 + resume; // scope 0 at $DIR/issue-38669.rs:4:1: 12:2 } bb2: { - falseUnwind -> [real: bb3, cleanup: bb1]; // bb2[0]: scope 1 at $DIR/issue-38669.rs:6:5: 11:6 + falseUnwind -> [real: bb3, cleanup: bb1]; // scope 1 at $DIR/issue-38669.rs:6:5: 11:6 } bb3: { - StorageLive(_3); // bb3[0]: scope 1 at $DIR/issue-38669.rs:7:9: 9:10 - StorageLive(_4); // bb3[1]: scope 1 at $DIR/issue-38669.rs:7:12: 7:24 - _4 = _1; // bb3[2]: scope 1 at $DIR/issue-38669.rs:7:12: 7:24 - FakeRead(ForMatchedPlace, _4); // bb3[3]: scope 1 at $DIR/issue-38669.rs:7:12: 7:24 - switchInt(_4) -> [false: bb5, otherwise: bb4]; // bb3[4]: scope 1 at $DIR/issue-38669.rs:7:9: 9:10 + StorageLive(_3); // scope 1 at $DIR/issue-38669.rs:7:9: 9:10 + StorageLive(_4); // scope 1 at $DIR/issue-38669.rs:7:12: 7:24 + _4 = _1; // scope 1 at $DIR/issue-38669.rs:7:12: 7:24 + FakeRead(ForMatchedPlace, _4); // scope 1 at $DIR/issue-38669.rs:7:12: 7:24 + switchInt(_4) -> [false: bb5, otherwise: bb4]; // scope 1 at $DIR/issue-38669.rs:7:9: 9:10 } bb4: { - falseEdges -> [real: bb6, imaginary: bb5]; // bb4[0]: scope 1 at $DIR/issue-38669.rs:7:9: 9:10 + falseEdges -> [real: bb6, imaginary: bb5]; // scope 1 at $DIR/issue-38669.rs:7:9: 9:10 } bb5: { - _3 = const (); // bb5[0]: scope 1 at $DIR/issue-38669.rs:7:9: 9:10 + _3 = const (); // scope 1 at $DIR/issue-38669.rs:7:9: 9:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-38669.rs:7:9: 9:10 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_4); // bb5[1]: scope 1 at $DIR/issue-38669.rs:9:9: 9:10 - StorageDead(_3); // bb5[2]: scope 1 at $DIR/issue-38669.rs:9:9: 9:10 - _1 = const true; // bb5[3]: scope 1 at $DIR/issue-38669.rs:10:9: 10:28 + StorageDead(_4); // scope 1 at $DIR/issue-38669.rs:9:9: 9:10 + StorageDead(_3); // scope 1 at $DIR/issue-38669.rs:9:9: 9:10 + _1 = const true; // scope 1 at $DIR/issue-38669.rs:10:9: 10:28 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-38669.rs:10:24: 10:28 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _2 = const (); // bb5[4]: scope 1 at $DIR/issue-38669.rs:6:10: 11:6 + _2 = const (); // scope 1 at $DIR/issue-38669.rs:6:10: 11:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-38669.rs:6:10: 11:6 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb2; // bb5[5]: scope 1 at $DIR/issue-38669.rs:6:5: 11:6 + goto -> bb2; // scope 1 at $DIR/issue-38669.rs:6:5: 11:6 } bb6: { - _0 = const (); // bb6[0]: scope 1 at $DIR/issue-38669.rs:8:13: 8:18 + _0 = const (); // scope 1 at $DIR/issue-38669.rs:8:13: 8:18 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-38669.rs:8:13: 8:18 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_4); // bb6[1]: scope 1 at $DIR/issue-38669.rs:9:9: 9:10 - StorageDead(_3); // bb6[2]: scope 1 at $DIR/issue-38669.rs:9:9: 9:10 - StorageDead(_1); // bb6[3]: scope 0 at $DIR/issue-38669.rs:12:1: 12:2 - return; // bb6[4]: scope 0 at $DIR/issue-38669.rs:12:2: 12:2 + StorageDead(_4); // scope 1 at $DIR/issue-38669.rs:9:9: 9:10 + StorageDead(_3); // scope 1 at $DIR/issue-38669.rs:9:9: 9:10 + StorageDead(_1); // scope 0 at $DIR/issue-38669.rs:12:1: 12:2 + return; // scope 0 at $DIR/issue-38669.rs:12:2: 12:2 } } diff --git a/src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir index 55849b2773290..77763f2d3a0d1 100644 --- a/src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir @@ -12,27 +12,27 @@ fn main() -> () { } bb0: { - _5 = const false; // bb0[0]: scope 0 at $DIR/issue-41110.rs:8:9: 8:10 + _5 = const false; // scope 0 at $DIR/issue-41110.rs:8:9: 8:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:8:9: 8:10 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - StorageLive(_1); // bb0[1]: scope 0 at $DIR/issue-41110.rs:8:9: 8:10 - StorageLive(_2); // bb0[2]: scope 0 at $DIR/issue-41110.rs:8:13: 8:14 - _5 = const true; // bb0[3]: scope 0 at $DIR/issue-41110.rs:8:13: 8:14 + StorageLive(_1); // scope 0 at $DIR/issue-41110.rs:8:9: 8:10 + StorageLive(_2); // scope 0 at $DIR/issue-41110.rs:8:13: 8:14 + _5 = const true; // scope 0 at $DIR/issue-41110.rs:8:13: 8:14 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41110.rs:8:13: 8:14 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _2 = S; // bb0[4]: scope 0 at $DIR/issue-41110.rs:8:13: 8:14 - StorageLive(_3); // bb0[5]: scope 0 at $DIR/issue-41110.rs:8:21: 8:27 - StorageLive(_4); // bb0[6]: scope 0 at $DIR/issue-41110.rs:8:21: 8:22 - _4 = S; // bb0[7]: scope 0 at $DIR/issue-41110.rs:8:21: 8:22 - _3 = const S::id(move _4) -> [return: bb2, unwind: bb4]; // bb0[8]: scope 0 at $DIR/issue-41110.rs:8:21: 8:27 + _2 = S; // scope 0 at $DIR/issue-41110.rs:8:13: 8:14 + StorageLive(_3); // scope 0 at $DIR/issue-41110.rs:8:21: 8:27 + StorageLive(_4); // scope 0 at $DIR/issue-41110.rs:8:21: 8:22 + _4 = S; // scope 0 at $DIR/issue-41110.rs:8:21: 8:22 + _3 = const S::id(move _4) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-41110.rs:8:21: 8:27 // ty::Const // + ty: fn(S) -> S {S::id} // + val: Value(Scalar()) @@ -42,19 +42,19 @@ fn main() -> () { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-41110.rs:7:1: 9:2 + resume; // scope 0 at $DIR/issue-41110.rs:7:1: 9:2 } bb2: { - StorageDead(_4); // bb2[0]: scope 0 at $DIR/issue-41110.rs:8:26: 8:27 - _5 = const false; // bb2[1]: scope 0 at $DIR/issue-41110.rs:8:13: 8:28 + StorageDead(_4); // scope 0 at $DIR/issue-41110.rs:8:26: 8:27 + _5 = const false; // scope 0 at $DIR/issue-41110.rs:8:13: 8:28 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:8:13: 8:28 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _1 = const S::other(move _2, move _3) -> [return: bb6, unwind: bb5]; // bb2[2]: scope 0 at $DIR/issue-41110.rs:8:13: 8:28 + _1 = const S::other(move _2, move _3) -> [return: bb6, unwind: bb5]; // scope 0 at $DIR/issue-41110.rs:8:13: 8:28 // ty::Const // + ty: fn(S, S) {S::other} // + val: Value(Scalar()) @@ -64,54 +64,54 @@ fn main() -> () { } bb3 (cleanup): { - goto -> bb9; // bb3[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + goto -> bb9; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 } bb4 (cleanup): { - goto -> bb3; // bb4[0]: scope 0 at $DIR/issue-41110.rs:8:26: 8:27 + goto -> bb3; // scope 0 at $DIR/issue-41110.rs:8:26: 8:27 } bb5 (cleanup): { - goto -> bb3; // bb5[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + goto -> bb3; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 } bb6: { - StorageDead(_3); // bb6[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 - _5 = const false; // bb6[1]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + StorageDead(_3); // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + _5 = const false; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:8:27: 8:28 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - StorageDead(_2); // bb6[2]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 - _0 = const (); // bb6[3]: scope 0 at $DIR/issue-41110.rs:7:11: 9:2 + StorageDead(_2); // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + _0 = const (); // scope 0 at $DIR/issue-41110.rs:7:11: 9:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-41110.rs:7:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb6[4]: scope 0 at $DIR/issue-41110.rs:9:1: 9:2 - return; // bb6[5]: scope 0 at $DIR/issue-41110.rs:9:2: 9:2 + StorageDead(_1); // scope 0 at $DIR/issue-41110.rs:9:1: 9:2 + return; // scope 0 at $DIR/issue-41110.rs:9:2: 9:2 } bb7 (cleanup): { - drop(_2) -> bb1; // bb7[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + drop(_2) -> bb1; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 } bb8 (cleanup): { - _5 = const false; // bb8[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + _5 = const false; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:8:27: 8:28 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - goto -> bb7; // bb8[1]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + goto -> bb7; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 } bb9 (cleanup): { - switchInt(_5) -> [false: bb1, otherwise: bb8]; // bb9[0]: scope 0 at $DIR/issue-41110.rs:8:27: 8:28 + switchInt(_5) -> [false: bb1, otherwise: bb8]; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 } } diff --git a/src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir b/src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir index cc1a49dd24524..a99846bd15daf 100644 --- a/src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir @@ -16,28 +16,28 @@ fn test() -> () { } bb0: { - _6 = const false; // bb0[0]: scope 0 at $DIR/issue-41110.rs:15:9: 15:10 + _6 = const false; // scope 0 at $DIR/issue-41110.rs:15:9: 15:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:15:9: 15:10 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - StorageLive(_1); // bb0[1]: scope 0 at $DIR/issue-41110.rs:15:9: 15:10 - _6 = const true; // bb0[2]: scope 0 at $DIR/issue-41110.rs:15:13: 15:14 + StorageLive(_1); // scope 0 at $DIR/issue-41110.rs:15:9: 15:10 + _6 = const true; // scope 0 at $DIR/issue-41110.rs:15:13: 15:14 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41110.rs:15:13: 15:14 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _1 = S; // bb0[3]: scope 0 at $DIR/issue-41110.rs:15:13: 15:14 - StorageLive(_2); // bb0[4]: scope 1 at $DIR/issue-41110.rs:16:9: 16:14 - _2 = S; // bb0[5]: scope 1 at $DIR/issue-41110.rs:16:17: 16:18 - StorageLive(_3); // bb0[6]: scope 2 at $DIR/issue-41110.rs:17:5: 17:12 - StorageLive(_4); // bb0[7]: scope 2 at $DIR/issue-41110.rs:17:10: 17:11 - _4 = move _2; // bb0[8]: scope 2 at $DIR/issue-41110.rs:17:10: 17:11 - _3 = const std::mem::drop::(move _4) -> [return: bb2, unwind: bb5]; // bb0[9]: scope 2 at $DIR/issue-41110.rs:17:5: 17:12 + _1 = S; // scope 0 at $DIR/issue-41110.rs:15:13: 15:14 + StorageLive(_2); // scope 1 at $DIR/issue-41110.rs:16:9: 16:14 + _2 = S; // scope 1 at $DIR/issue-41110.rs:16:17: 16:18 + StorageLive(_3); // scope 2 at $DIR/issue-41110.rs:17:5: 17:12 + StorageLive(_4); // scope 2 at $DIR/issue-41110.rs:17:10: 17:11 + _4 = move _2; // scope 2 at $DIR/issue-41110.rs:17:10: 17:11 + _3 = const std::mem::drop::(move _4) -> [return: bb2, unwind: bb5]; // scope 2 at $DIR/issue-41110.rs:17:5: 17:12 // ty::Const // + ty: fn(S) {std::mem::drop::} // + val: Value(Scalar()) @@ -47,99 +47,99 @@ fn test() -> () { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-41110.rs:14:1: 19:2 + resume; // scope 0 at $DIR/issue-41110.rs:14:1: 19:2 } bb2: { - StorageDead(_4); // bb2[0]: scope 2 at $DIR/issue-41110.rs:17:11: 17:12 - StorageDead(_3); // bb2[1]: scope 2 at $DIR/issue-41110.rs:17:12: 17:13 - StorageLive(_5); // bb2[2]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10 - _6 = const false; // bb2[3]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10 + StorageDead(_4); // scope 2 at $DIR/issue-41110.rs:17:11: 17:12 + StorageDead(_3); // scope 2 at $DIR/issue-41110.rs:17:12: 17:13 + StorageLive(_5); // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 + _6 = const false; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:18:9: 18:10 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _5 = move _1; // bb2[4]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10 - goto -> bb12; // bb2[5]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6 + _5 = move _1; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 + goto -> bb12; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6 } bb3 (cleanup): { - goto -> bb15; // bb3[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + goto -> bb15; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 } bb4 (cleanup): { - goto -> bb3; // bb4[0]: scope 1 at $DIR/issue-41110.rs:19:1: 19:2 + goto -> bb3; // scope 1 at $DIR/issue-41110.rs:19:1: 19:2 } bb5 (cleanup): { - goto -> bb4; // bb5[0]: scope 2 at $DIR/issue-41110.rs:17:11: 17:12 + goto -> bb4; // scope 2 at $DIR/issue-41110.rs:17:11: 17:12 } bb6: { - goto -> bb8; // bb6[0]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10 + goto -> bb8; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 } bb7 (cleanup): { - goto -> bb4; // bb7[0]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10 + goto -> bb4; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 } bb8: { - StorageDead(_5); // bb8[0]: scope 2 at $DIR/issue-41110.rs:18:9: 18:10 - _0 = const (); // bb8[1]: scope 0 at $DIR/issue-41110.rs:14:15: 19:2 + StorageDead(_5); // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 + _0 = const (); // scope 0 at $DIR/issue-41110.rs:14:15: 19:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-41110.rs:14:15: 19:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_2) -> [return: bb9, unwind: bb3]; // bb8[2]: scope 1 at $DIR/issue-41110.rs:19:1: 19:2 + drop(_2) -> [return: bb9, unwind: bb3]; // scope 1 at $DIR/issue-41110.rs:19:1: 19:2 } bb9: { - StorageDead(_2); // bb9[0]: scope 1 at $DIR/issue-41110.rs:19:1: 19:2 - goto -> bb10; // bb9[1]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + StorageDead(_2); // scope 1 at $DIR/issue-41110.rs:19:1: 19:2 + goto -> bb10; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 } bb10: { - _6 = const false; // bb10[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + _6 = const false; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:19:1: 19:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - StorageDead(_1); // bb10[1]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 - return; // bb10[2]: scope 0 at $DIR/issue-41110.rs:19:2: 19:2 + StorageDead(_1); // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + return; // scope 0 at $DIR/issue-41110.rs:19:2: 19:2 } bb11 (cleanup): { - _2 = move _5; // bb11[0]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6 - goto -> bb7; // bb11[1]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6 + _2 = move _5; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6 + goto -> bb7; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6 } bb12: { - _2 = move _5; // bb12[0]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6 - goto -> bb6; // bb12[1]: scope 2 at $DIR/issue-41110.rs:18:5: 18:6 + _2 = move _5; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6 + goto -> bb6; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6 } bb13 (cleanup): { - drop(_1) -> bb1; // bb13[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + drop(_1) -> bb1; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 } bb14 (cleanup): { - _6 = const false; // bb14[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + _6 = const false; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41110.rs:19:1: 19:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - goto -> bb13; // bb14[1]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + goto -> bb13; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 } bb15 (cleanup): { - switchInt(_6) -> [false: bb1, otherwise: bb14]; // bb15[0]: scope 0 at $DIR/issue-41110.rs:19:1: 19:2 + switchInt(_6) -> [false: bb1, otherwise: bb14]; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 } } diff --git a/src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir index 072ca4cfe4737..d263b2515f17a 100644 --- a/src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir +++ b/src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir @@ -5,7 +5,7 @@ let mut _1: (usize, bool); // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22 bb0: { - _1 = CheckedAdd(const 1usize, const 1usize); // bb0[0]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + _1 = CheckedAdd(const 1usize, const 1usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) @@ -18,15 +18,15 @@ // mir::Constant // + span: $DIR/issue-41697.rs:18:21: 18:22 // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - assert(!move (_1.1: bool), "attempt to add with overflow") -> [success: bb2, unwind: bb1]; // bb0[1]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + assert(!move (_1.1: bool), "attempt to add with overflow") -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + resume; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 } bb2: { - _0 = move (_1.0: usize); // bb2[0]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 - return; // bb2[1]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + _0 = move (_1.0: usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + return; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 } } diff --git a/src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir index 5a9d1570b80dc..6c00f49fb75b1 100644 --- a/src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir +++ b/src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir @@ -5,7 +5,7 @@ let mut _1: (usize, bool); // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22 bb0: { - _1 = CheckedAdd(const 1usize, const 1usize); // bb0[0]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + _1 = CheckedAdd(const 1usize, const 1usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) @@ -18,15 +18,15 @@ // mir::Constant // + span: $DIR/issue-41697.rs:18:21: 18:22 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - assert(!move (_1.1: bool), "attempt to add with overflow") -> [success: bb2, unwind: bb1]; // bb0[1]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + assert(!move (_1.1: bool), "attempt to add with overflow") -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + resume; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 } bb2: { - _0 = move (_1.0: usize); // bb2[0]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 - return; // bb2[1]: scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + _0 = move (_1.0: usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 + return; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 } } diff --git a/src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir index fe376f2a0486d..ce940273c3ef5 100644 --- a/src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir @@ -21,30 +21,30 @@ fn main() -> () { } bb0: { - _9 = const false; // bb0[0]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 + _9 = const false; // scope 0 at $DIR/issue-41888.rs:7:9: 7:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:7:9: 7:10 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _7 = const false; // bb0[1]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 + _7 = const false; // scope 0 at $DIR/issue-41888.rs:7:9: 7:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:7:9: 7:10 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _8 = const false; // bb0[2]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 + _8 = const false; // scope 0 at $DIR/issue-41888.rs:7:9: 7:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:7:9: 7:10 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - StorageLive(_1); // bb0[3]: scope 0 at $DIR/issue-41888.rs:7:9: 7:10 - StorageLive(_2); // bb0[4]: scope 1 at $DIR/issue-41888.rs:8:8: 8:14 - _2 = const cond() -> [return: bb2, unwind: bb3]; // bb0[5]: scope 1 at $DIR/issue-41888.rs:8:8: 8:14 + StorageLive(_1); // scope 0 at $DIR/issue-41888.rs:7:9: 7:10 + StorageLive(_2); // scope 1 at $DIR/issue-41888.rs:8:8: 8:14 + _2 = const cond() -> [return: bb2, unwind: bb3]; // scope 1 at $DIR/issue-41888.rs:8:8: 8:14 // ty::Const // + ty: fn() -> bool {cond} // + val: Value(Scalar()) @@ -54,215 +54,215 @@ fn main() -> () { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-41888.rs:6:1: 15:2 + resume; // scope 0 at $DIR/issue-41888.rs:6:1: 15:2 } bb2: { - switchInt(_2) -> [false: bb4, otherwise: bb5]; // bb2[0]: scope 1 at $DIR/issue-41888.rs:8:5: 14:6 + switchInt(_2) -> [false: bb4, otherwise: bb5]; // scope 1 at $DIR/issue-41888.rs:8:5: 14:6 } bb3 (cleanup): { - goto -> bb1; // bb3[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + goto -> bb1; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb4: { - _0 = const (); // bb4[0]: scope 1 at $DIR/issue-41888.rs:8:5: 14:6 + _0 = const (); // scope 1 at $DIR/issue-41888.rs:8:5: 14:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-41888.rs:8:5: 14:6 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb11; // bb4[1]: scope 1 at $DIR/issue-41888.rs:8:5: 14:6 + goto -> bb11; // scope 1 at $DIR/issue-41888.rs:8:5: 14:6 } bb5: { - StorageLive(_3); // bb5[0]: scope 1 at $DIR/issue-41888.rs:9:13: 9:20 - StorageLive(_4); // bb5[1]: scope 1 at $DIR/issue-41888.rs:9:18: 9:19 - _4 = K; // bb5[2]: scope 1 at $DIR/issue-41888.rs:9:18: 9:19 - _3 = E::F(move _4); // bb5[3]: scope 1 at $DIR/issue-41888.rs:9:13: 9:20 - StorageDead(_4); // bb5[4]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 - goto -> bb14; // bb5[5]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + StorageLive(_3); // scope 1 at $DIR/issue-41888.rs:9:13: 9:20 + StorageLive(_4); // scope 1 at $DIR/issue-41888.rs:9:18: 9:19 + _4 = K; // scope 1 at $DIR/issue-41888.rs:9:18: 9:19 + _3 = E::F(move _4); // scope 1 at $DIR/issue-41888.rs:9:13: 9:20 + StorageDead(_4); // scope 1 at $DIR/issue-41888.rs:9:19: 9:20 + goto -> bb14; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 } bb6: { - goto -> bb8; // bb6[0]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 + goto -> bb8; // scope 1 at $DIR/issue-41888.rs:9:19: 9:20 } bb7 (cleanup): { - goto -> bb3; // bb7[0]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 + goto -> bb3; // scope 1 at $DIR/issue-41888.rs:9:19: 9:20 } bb8: { - StorageDead(_3); // bb8[0]: scope 1 at $DIR/issue-41888.rs:9:19: 9:20 - _5 = discriminant(_1); // bb8[1]: scope 1 at $DIR/issue-41888.rs:10:16: 10:24 - switchInt(move _5) -> [0isize: bb10, otherwise: bb9]; // bb8[2]: scope 1 at $DIR/issue-41888.rs:10:16: 10:24 + StorageDead(_3); // scope 1 at $DIR/issue-41888.rs:9:19: 9:20 + _5 = discriminant(_1); // scope 1 at $DIR/issue-41888.rs:10:16: 10:24 + switchInt(move _5) -> [0isize: bb10, otherwise: bb9]; // scope 1 at $DIR/issue-41888.rs:10:16: 10:24 } bb9: { - _0 = const (); // bb9[0]: scope 1 at $DIR/issue-41888.rs:10:9: 13:10 + _0 = const (); // scope 1 at $DIR/issue-41888.rs:10:9: 13:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-41888.rs:10:9: 13:10 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb11; // bb9[1]: scope 1 at $DIR/issue-41888.rs:10:9: 13:10 + goto -> bb11; // scope 1 at $DIR/issue-41888.rs:10:9: 13:10 } bb10: { - StorageLive(_6); // bb10[0]: scope 1 at $DIR/issue-41888.rs:10:21: 10:23 - _9 = const false; // bb10[1]: scope 1 at $DIR/issue-41888.rs:10:21: 10:23 + StorageLive(_6); // scope 1 at $DIR/issue-41888.rs:10:21: 10:23 + _9 = const false; // scope 1 at $DIR/issue-41888.rs:10:21: 10:23 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:10:21: 10:23 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _6 = move ((_1 as F).0: K); // bb10[2]: scope 1 at $DIR/issue-41888.rs:10:21: 10:23 - _0 = const (); // bb10[3]: scope 2 at $DIR/issue-41888.rs:10:29: 13:10 + _6 = move ((_1 as F).0: K); // scope 1 at $DIR/issue-41888.rs:10:21: 10:23 + _0 = const (); // scope 2 at $DIR/issue-41888.rs:10:29: 13:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-41888.rs:10:29: 13:10 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_6); // bb10[4]: scope 1 at $DIR/issue-41888.rs:13:9: 13:10 - goto -> bb11; // bb10[5]: scope 1 at $DIR/issue-41888.rs:10:9: 13:10 + StorageDead(_6); // scope 1 at $DIR/issue-41888.rs:13:9: 13:10 + goto -> bb11; // scope 1 at $DIR/issue-41888.rs:10:9: 13:10 } bb11: { - goto -> bb21; // bb11[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + goto -> bb21; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb12: { - _7 = const false; // bb12[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _7 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:15:1: 15:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _8 = const false; // bb12[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _8 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:15:1: 15:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _9 = const false; // bb12[2]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _9 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:15:1: 15:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - StorageDead(_1); // bb12[3]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 - StorageDead(_2); // bb12[4]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 - return; // bb12[5]: scope 0 at $DIR/issue-41888.rs:15:2: 15:2 + StorageDead(_1); // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + StorageDead(_2); // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + return; // scope 0 at $DIR/issue-41888.rs:15:2: 15:2 } bb13 (cleanup): { - _7 = const true; // bb13[0]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _7 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41888.rs:9:9: 9:10 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _8 = const true; // bb13[1]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _8 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41888.rs:9:9: 9:10 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _9 = const true; // bb13[2]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _9 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41888.rs:9:9: 9:10 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _1 = move _3; // bb13[3]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 - goto -> bb7; // bb13[4]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _1 = move _3; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + goto -> bb7; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 } bb14: { - _7 = const true; // bb14[0]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _7 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41888.rs:9:9: 9:10 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _8 = const true; // bb14[1]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _8 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41888.rs:9:9: 9:10 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _9 = const true; // bb14[2]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _9 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-41888.rs:9:9: 9:10 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _1 = move _3; // bb14[3]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 - goto -> bb6; // bb14[4]: scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + _1 = move _3; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 + goto -> bb6; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10 } bb15: { - _7 = const false; // bb15[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _7 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:15:1: 15:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - goto -> bb12; // bb15[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + goto -> bb12; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb16 (cleanup): { - _7 = const false; // bb16[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _7 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/issue-41888.rs:15:1: 15:2 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - goto -> bb1; // bb16[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + goto -> bb1; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb17 (cleanup): { - goto -> bb16; // bb17[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + goto -> bb16; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb18: { - drop(_1) -> [return: bb15, unwind: bb16]; // bb18[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + drop(_1) -> [return: bb15, unwind: bb16]; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb19 (cleanup): { - drop(_1) -> bb16; // bb19[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + drop(_1) -> bb16; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb20: { - _10 = discriminant(_1); // bb20[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 - switchInt(move _10) -> [0isize: bb15, otherwise: bb18]; // bb20[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _10 = discriminant(_1); // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + switchInt(move _10) -> [0isize: bb15, otherwise: bb18]; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb21: { - switchInt(_7) -> [false: bb15, otherwise: bb20]; // bb21[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + switchInt(_7) -> [false: bb15, otherwise: bb20]; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb22 (cleanup): { - _11 = discriminant(_1); // bb22[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 - switchInt(move _11) -> [0isize: bb17, otherwise: bb19]; // bb22[1]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + _11 = discriminant(_1); // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + switchInt(move _11) -> [0isize: bb17, otherwise: bb19]; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb23 (cleanup): { - switchInt(_7) -> [false: bb16, otherwise: bb22]; // bb23[0]: scope 0 at $DIR/issue-41888.rs:15:1: 15:2 + switchInt(_7) -> [false: bb16, otherwise: bb22]; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } } diff --git a/src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir b/src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir index 5440d4488bb97..abf33cce133dd 100644 --- a/src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir +++ b/src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir @@ -13,93 +13,93 @@ fn main() -> () { } bb0: { - goto -> bb1; // bb0[0]: scope 0 at $DIR/issue-49232.rs:6:5: 14:6 + goto -> bb1; // scope 0 at $DIR/issue-49232.rs:6:5: 14:6 } bb1: { - falseUnwind -> [real: bb3, cleanup: bb4]; // bb1[0]: scope 0 at $DIR/issue-49232.rs:6:5: 14:6 + falseUnwind -> [real: bb3, cleanup: bb4]; // scope 0 at $DIR/issue-49232.rs:6:5: 14:6 } bb2: { - goto -> bb14; // bb2[0]: scope 0 at $DIR/issue-49232.rs:15:2: 15:2 + goto -> bb14; // scope 0 at $DIR/issue-49232.rs:15:2: 15:2 } bb3: { - StorageLive(_2); // bb3[0]: scope 0 at $DIR/issue-49232.rs:7:13: 7:19 - StorageLive(_3); // bb3[1]: scope 0 at $DIR/issue-49232.rs:8:19: 8:23 - _3 = const true; // bb3[2]: scope 0 at $DIR/issue-49232.rs:8:19: 8:23 + StorageLive(_2); // scope 0 at $DIR/issue-49232.rs:7:13: 7:19 + StorageLive(_3); // scope 0 at $DIR/issue-49232.rs:8:19: 8:23 + _3 = const true; // scope 0 at $DIR/issue-49232.rs:8:19: 8:23 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/issue-49232.rs:8:19: 8:23 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - FakeRead(ForMatchedPlace, _3); // bb3[3]: scope 0 at $DIR/issue-49232.rs:8:19: 8:23 - switchInt(_3) -> [false: bb5, otherwise: bb6]; // bb3[4]: scope 0 at $DIR/issue-49232.rs:9:17: 9:22 + FakeRead(ForMatchedPlace, _3); // scope 0 at $DIR/issue-49232.rs:8:19: 8:23 + switchInt(_3) -> [false: bb5, otherwise: bb6]; // scope 0 at $DIR/issue-49232.rs:9:17: 9:22 } bb4 (cleanup): { - resume; // bb4[0]: scope 0 at $DIR/issue-49232.rs:5:1: 15:2 + resume; // scope 0 at $DIR/issue-49232.rs:5:1: 15:2 } bb5: { - falseEdges -> [real: bb7, imaginary: bb6]; // bb5[0]: scope 0 at $DIR/issue-49232.rs:9:17: 9:22 + falseEdges -> [real: bb7, imaginary: bb6]; // scope 0 at $DIR/issue-49232.rs:9:17: 9:22 } bb6: { - _0 = const (); // bb6[0]: scope 0 at $DIR/issue-49232.rs:10:25: 10:30 + _0 = const (); // scope 0 at $DIR/issue-49232.rs:10:25: 10:30 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-49232.rs:10:25: 10:30 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb8; // bb6[1]: scope 0 at $DIR/issue-49232.rs:10:25: 10:30 + goto -> bb8; // scope 0 at $DIR/issue-49232.rs:10:25: 10:30 } bb7: { - _2 = const 4i32; // bb7[0]: scope 0 at $DIR/issue-49232.rs:9:26: 9:27 + _2 = const 4i32; // scope 0 at $DIR/issue-49232.rs:9:26: 9:27 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000004)) // mir::Constant // + span: $DIR/issue-49232.rs:9:26: 9:27 // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - goto -> bb12; // bb7[1]: scope 0 at $DIR/issue-49232.rs:8:13: 11:14 + goto -> bb12; // scope 0 at $DIR/issue-49232.rs:8:13: 11:14 } bb8: { - StorageDead(_3); // bb8[0]: scope 0 at $DIR/issue-49232.rs:12:10: 12:11 - goto -> bb9; // bb8[1]: scope 0 at $DIR/issue-49232.rs:10:25: 10:30 + StorageDead(_3); // scope 0 at $DIR/issue-49232.rs:12:10: 12:11 + goto -> bb9; // scope 0 at $DIR/issue-49232.rs:10:25: 10:30 } bb9: { - StorageDead(_2); // bb9[0]: scope 0 at $DIR/issue-49232.rs:14:5: 14:6 - goto -> bb2; // bb9[1]: scope 0 at $DIR/issue-49232.rs:10:25: 10:30 + StorageDead(_2); // scope 0 at $DIR/issue-49232.rs:14:5: 14:6 + goto -> bb2; // scope 0 at $DIR/issue-49232.rs:10:25: 10:30 } bb10: { - _4 = const (); // bb10[0]: scope 0 at $DIR/issue-49232.rs:10:25: 10:30 + _4 = const (); // scope 0 at $DIR/issue-49232.rs:10:25: 10:30 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-49232.rs:10:25: 10:30 // + literal: Const { ty: (), val: Value(Scalar()) } - unreachable; // bb10[1]: scope 0 at $DIR/issue-49232.rs:10:25: 10:30 + unreachable; // scope 0 at $DIR/issue-49232.rs:10:25: 10:30 } bb11: { - goto -> bb12; // bb11[0]: scope 0 at $DIR/issue-49232.rs:8:13: 11:14 + goto -> bb12; // scope 0 at $DIR/issue-49232.rs:8:13: 11:14 } bb12: { - FakeRead(ForLet, _2); // bb12[0]: scope 0 at $DIR/issue-49232.rs:7:13: 7:19 - StorageDead(_3); // bb12[1]: scope 0 at $DIR/issue-49232.rs:12:10: 12:11 - StorageLive(_5); // bb12[2]: scope 1 at $DIR/issue-49232.rs:13:9: 13:22 - StorageLive(_6); // bb12[3]: scope 1 at $DIR/issue-49232.rs:13:14: 13:21 - _6 = &_2; // bb12[4]: scope 1 at $DIR/issue-49232.rs:13:14: 13:21 - _5 = const std::mem::drop::<&i32>(move _6) -> [return: bb13, unwind: bb4]; // bb12[5]: scope 1 at $DIR/issue-49232.rs:13:9: 13:22 + FakeRead(ForLet, _2); // scope 0 at $DIR/issue-49232.rs:7:13: 7:19 + StorageDead(_3); // scope 0 at $DIR/issue-49232.rs:12:10: 12:11 + StorageLive(_5); // scope 1 at $DIR/issue-49232.rs:13:9: 13:22 + StorageLive(_6); // scope 1 at $DIR/issue-49232.rs:13:14: 13:21 + _6 = &_2; // scope 1 at $DIR/issue-49232.rs:13:14: 13:21 + _5 = const std::mem::drop::<&i32>(move _6) -> [return: bb13, unwind: bb4]; // scope 1 at $DIR/issue-49232.rs:13:9: 13:22 // ty::Const // + ty: fn(&i32) {std::mem::drop::<&i32>} // + val: Value(Scalar()) @@ -109,20 +109,20 @@ fn main() -> () { } bb13: { - StorageDead(_6); // bb13[0]: scope 1 at $DIR/issue-49232.rs:13:21: 13:22 - StorageDead(_5); // bb13[1]: scope 1 at $DIR/issue-49232.rs:13:22: 13:23 - _1 = const (); // bb13[2]: scope 0 at $DIR/issue-49232.rs:6:10: 14:6 + StorageDead(_6); // scope 1 at $DIR/issue-49232.rs:13:21: 13:22 + StorageDead(_5); // scope 1 at $DIR/issue-49232.rs:13:22: 13:23 + _1 = const (); // scope 0 at $DIR/issue-49232.rs:6:10: 14:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/issue-49232.rs:6:10: 14:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb13[3]: scope 0 at $DIR/issue-49232.rs:14:5: 14:6 - goto -> bb1; // bb13[4]: scope 0 at $DIR/issue-49232.rs:6:5: 14:6 + StorageDead(_2); // scope 0 at $DIR/issue-49232.rs:14:5: 14:6 + goto -> bb1; // scope 0 at $DIR/issue-49232.rs:6:5: 14:6 } bb14: { - return; // bb14[0]: scope 0 at $DIR/issue-49232.rs:15:2: 15:2 + return; // scope 0 at $DIR/issue-49232.rs:15:2: 15:2 } } diff --git a/src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir b/src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir index 8970cc83f2b3c..0b8b03961f2a0 100644 --- a/src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir +++ b/src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir @@ -24,13 +24,13 @@ fn test() -> std::option::Option> { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21 - _2 = Box(u32); // bb0[2]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21 - StorageLive(_3); // bb0[3]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20 - StorageLive(_4); // bb0[4]: scope 0 at $DIR/issue-62289.rs:9:15: 9:19 - _4 = std::option::Option::::None; // bb0[5]: scope 0 at $DIR/issue-62289.rs:9:15: 9:19 - _3 = const as std::ops::Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; // bb0[6]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20 + StorageLive(_1); // scope 0 at $DIR/issue-62289.rs:9:10: 9:21 + StorageLive(_2); // scope 0 at $DIR/issue-62289.rs:9:10: 9:21 + _2 = Box(u32); // scope 0 at $DIR/issue-62289.rs:9:10: 9:21 + StorageLive(_3); // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 + StorageLive(_4); // scope 0 at $DIR/issue-62289.rs:9:15: 9:19 + _4 = std::option::Option::::None; // scope 0 at $DIR/issue-62289.rs:9:15: 9:19 + _3 = const as std::ops::Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 // ty::Const // + ty: fn(std::option::Option) -> std::result::Result< as std::ops::Try>::Ok, as std::ops::Try>::Error> { as std::ops::Try>::into_result} // + val: Value(Scalar()) @@ -40,39 +40,39 @@ fn test() -> std::option::Option> { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/issue-62289.rs:8:1: 10:2 + resume; // scope 0 at $DIR/issue-62289.rs:8:1: 10:2 } bb2: { - StorageDead(_4); // bb2[0]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 - _5 = discriminant(_3); // bb2[1]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 - switchInt(move _5) -> [0isize: bb4, 1isize: bb6, otherwise: bb5]; // bb2[2]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + StorageDead(_4); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + _5 = discriminant(_3); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + switchInt(move _5) -> [0isize: bb4, 1isize: bb6, otherwise: bb5]; // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 } bb3 (cleanup): { - drop(_2) -> bb1; // bb3[0]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21 + drop(_2) -> bb1; // scope 0 at $DIR/issue-62289.rs:9:20: 9:21 } bb4: { - StorageLive(_10); // bb4[0]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20 - _10 = ((_3 as Ok).0: u32); // bb4[1]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20 - (*_2) = _10; // bb4[2]: scope 4 at $DIR/issue-62289.rs:9:15: 9:20 - StorageDead(_10); // bb4[3]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 - _1 = move _2; // bb4[4]: scope 0 at $DIR/issue-62289.rs:9:10: 9:21 - drop(_2) -> [return: bb12, unwind: bb11]; // bb4[5]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21 + StorageLive(_10); // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 + _10 = ((_3 as Ok).0: u32); // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 + (*_2) = _10; // scope 4 at $DIR/issue-62289.rs:9:15: 9:20 + StorageDead(_10); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + _1 = move _2; // scope 0 at $DIR/issue-62289.rs:9:10: 9:21 + drop(_2) -> [return: bb12, unwind: bb11]; // scope 0 at $DIR/issue-62289.rs:9:20: 9:21 } bb5: { - unreachable; // bb5[0]: scope 0 at $DIR/issue-62289.rs:9:15: 9:20 + unreachable; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 } bb6: { - StorageLive(_6); // bb6[0]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 - _6 = ((_3 as Err).0: std::option::NoneError); // bb6[1]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 - StorageLive(_8); // bb6[2]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - StorageLive(_9); // bb6[3]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - _9 = _6; // bb6[4]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - _8 = const >::from(move _9) -> [return: bb8, unwind: bb3]; // bb6[5]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + StorageLive(_6); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + _6 = ((_3 as Err).0: std::option::NoneError); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + StorageLive(_8); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + StorageLive(_9); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + _9 = _6; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + _8 = const >::from(move _9) -> [return: bb8, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 // ty::Const // + ty: fn(std::option::NoneError) -> std::option::NoneError {>::from} // + val: Value(Scalar()) @@ -82,12 +82,12 @@ fn test() -> std::option::Option> { } bb7: { - return; // bb7[0]: scope 0 at $DIR/issue-62289.rs:10:2: 10:2 + return; // scope 0 at $DIR/issue-62289.rs:10:2: 10:2 } bb8: { - StorageDead(_9); // bb8[0]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - _0 = const > as std::ops::Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // bb8[1]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + StorageDead(_9); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + _0 = const > as std::ops::Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 // ty::Const // + ty: fn(> as std::ops::Try>::Error) -> std::option::Option> {> as std::ops::Try>::from_error} // + val: Value(Scalar()) @@ -97,31 +97,31 @@ fn test() -> std::option::Option> { } bb9: { - StorageDead(_8); // bb9[0]: scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - StorageDead(_6); // bb9[1]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 - drop(_2) -> bb10; // bb9[2]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21 + StorageDead(_8); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + StorageDead(_6); // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + drop(_2) -> bb10; // scope 0 at $DIR/issue-62289.rs:9:20: 9:21 } bb10: { - StorageDead(_2); // bb10[0]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21 - StorageDead(_1); // bb10[1]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22 - StorageDead(_3); // bb10[2]: scope 0 at $DIR/issue-62289.rs:10:1: 10:2 - goto -> bb7; // bb10[3]: scope 0 at $DIR/issue-62289.rs:9:19: 9:20 + StorageDead(_2); // scope 0 at $DIR/issue-62289.rs:9:20: 9:21 + StorageDead(_1); // scope 0 at $DIR/issue-62289.rs:9:21: 9:22 + StorageDead(_3); // scope 0 at $DIR/issue-62289.rs:10:1: 10:2 + goto -> bb7; // scope 0 at $DIR/issue-62289.rs:9:19: 9:20 } bb11 (cleanup): { - drop(_1) -> bb1; // bb11[0]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22 + drop(_1) -> bb1; // scope 0 at $DIR/issue-62289.rs:9:21: 9:22 } bb12: { - StorageDead(_2); // bb12[0]: scope 0 at $DIR/issue-62289.rs:9:20: 9:21 - _0 = std::option::Option::>::Some(move _1); // bb12[1]: scope 0 at $DIR/issue-62289.rs:9:5: 9:22 - drop(_1) -> bb13; // bb12[2]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22 + StorageDead(_2); // scope 0 at $DIR/issue-62289.rs:9:20: 9:21 + _0 = std::option::Option::>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:9:5: 9:22 + drop(_1) -> bb13; // scope 0 at $DIR/issue-62289.rs:9:21: 9:22 } bb13: { - StorageDead(_1); // bb13[0]: scope 0 at $DIR/issue-62289.rs:9:21: 9:22 - StorageDead(_3); // bb13[1]: scope 0 at $DIR/issue-62289.rs:10:1: 10:2 - goto -> bb7; // bb13[2]: scope 0 at $DIR/issue-62289.rs:10:2: 10:2 + StorageDead(_1); // scope 0 at $DIR/issue-62289.rs:9:21: 9:22 + StorageDead(_3); // scope 0 at $DIR/issue-62289.rs:10:1: 10:2 + goto -> bb7; // scope 0 at $DIR/issue-62289.rs:10:2: 10:2 } } diff --git a/src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir index df05dbabc770d..38e04a6399fc2 100644 --- a/src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir +++ b/src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir @@ -13,69 +13,69 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/loop_test.rs:10:5: 12:6 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/loop_test.rs:10:8: 10:12 - _2 = const true; // bb0[2]: scope 0 at $DIR/loop_test.rs:10:8: 10:12 + StorageLive(_1); // scope 0 at $DIR/loop_test.rs:10:5: 12:6 + StorageLive(_2); // scope 0 at $DIR/loop_test.rs:10:8: 10:12 + _2 = const true; // scope 0 at $DIR/loop_test.rs:10:8: 10:12 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/loop_test.rs:10:8: 10:12 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - FakeRead(ForMatchedPlace, _2); // bb0[3]: scope 0 at $DIR/loop_test.rs:10:8: 10:12 - switchInt(_2) -> [false: bb3, otherwise: bb2]; // bb0[4]: scope 0 at $DIR/loop_test.rs:10:5: 12:6 + FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/loop_test.rs:10:8: 10:12 + switchInt(_2) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/loop_test.rs:6:1: 17:2 + resume; // scope 0 at $DIR/loop_test.rs:6:1: 17:2 } bb2: { - falseEdges -> [real: bb4, imaginary: bb3]; // bb2[0]: scope 0 at $DIR/loop_test.rs:10:5: 12:6 + falseEdges -> [real: bb4, imaginary: bb3]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6 } bb3: { - _1 = const (); // bb3[0]: scope 0 at $DIR/loop_test.rs:10:5: 12:6 + _1 = const (); // scope 0 at $DIR/loop_test.rs:10:5: 12:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/loop_test.rs:10:5: 12:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb3[1]: scope 0 at $DIR/loop_test.rs:12:5: 12:6 - StorageDead(_1); // bb3[2]: scope 0 at $DIR/loop_test.rs:12:5: 12:6 - StorageLive(_4); // bb3[3]: scope 0 at $DIR/loop_test.rs:13:5: 16:6 - goto -> bb5; // bb3[4]: scope 0 at $DIR/loop_test.rs:13:5: 16:6 + StorageDead(_2); // scope 0 at $DIR/loop_test.rs:12:5: 12:6 + StorageDead(_1); // scope 0 at $DIR/loop_test.rs:12:5: 12:6 + StorageLive(_4); // scope 0 at $DIR/loop_test.rs:13:5: 16:6 + goto -> bb5; // scope 0 at $DIR/loop_test.rs:13:5: 16:6 } bb4: { - _0 = const (); // bb4[0]: scope 0 at $DIR/loop_test.rs:11:9: 11:15 + _0 = const (); // scope 0 at $DIR/loop_test.rs:11:9: 11:15 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/loop_test.rs:11:9: 11:15 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb4[1]: scope 0 at $DIR/loop_test.rs:12:5: 12:6 - StorageDead(_1); // bb4[2]: scope 0 at $DIR/loop_test.rs:12:5: 12:6 - return; // bb4[3]: scope 0 at $DIR/loop_test.rs:17:2: 17:2 + StorageDead(_2); // scope 0 at $DIR/loop_test.rs:12:5: 12:6 + StorageDead(_1); // scope 0 at $DIR/loop_test.rs:12:5: 12:6 + return; // scope 0 at $DIR/loop_test.rs:17:2: 17:2 } bb5: { - falseUnwind -> [real: bb6, cleanup: bb1]; // bb5[0]: scope 0 at $DIR/loop_test.rs:13:5: 16:6 + falseUnwind -> [real: bb6, cleanup: bb1]; // scope 0 at $DIR/loop_test.rs:13:5: 16:6 } bb6: { - StorageLive(_6); // bb6[0]: scope 0 at $DIR/loop_test.rs:14:13: 14:14 - _6 = const 1i32; // bb6[1]: scope 0 at $DIR/loop_test.rs:14:17: 14:18 + StorageLive(_6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14 + _6 = const 1i32; // scope 0 at $DIR/loop_test.rs:14:17: 14:18 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/loop_test.rs:14:17: 14:18 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - FakeRead(ForLet, _6); // bb6[2]: scope 0 at $DIR/loop_test.rs:14:13: 14:14 - StorageDead(_6); // bb6[3]: scope 0 at $DIR/loop_test.rs:16:5: 16:6 - goto -> bb5; // bb6[4]: scope 0 at $DIR/loop_test.rs:15:9: 15:17 + FakeRead(ForLet, _6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14 + StorageDead(_6); // scope 0 at $DIR/loop_test.rs:16:5: 16:6 + goto -> bb5; // scope 0 at $DIR/loop_test.rs:15:9: 15:17 } } diff --git a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir index 0b60f4f3321b6..856248e90d495 100644 --- a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir +++ b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir @@ -30,206 +30,206 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb0: { - switchInt((_2.0: bool)) -> [false: bb6, otherwise: bb2]; // bb0[0]: scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:15 + switchInt((_2.0: bool)) -> [false: bb6, otherwise: bb2]; // scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:15 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/match-arm-scopes.rs:14:1: 19:2 + resume; // scope 0 at $DIR/match-arm-scopes.rs:14:1: 19:2 } bb2: { - switchInt((_2.1: bool)) -> [false: bb14, otherwise: bb3]; // bb2[0]: scope 0 at $DIR/match-arm-scopes.rs:16:29: 16:34 + switchInt((_2.1: bool)) -> [false: bb14, otherwise: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:16:29: 16:34 } bb3: { - switchInt((_2.0: bool)) -> [false: bb4, otherwise: bb21]; // bb3[0]: scope 0 at $DIR/match-arm-scopes.rs:17:10: 17:14 + switchInt((_2.0: bool)) -> [false: bb4, otherwise: bb21]; // scope 0 at $DIR/match-arm-scopes.rs:17:10: 17:14 } bb4: { - StorageLive(_15); // bb4[0]: scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 - _15 = (_2.1: bool); // bb4[1]: scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 - StorageLive(_16); // bb4[2]: scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 - _16 = move (_2.2: std::string::String); // bb4[3]: scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 - goto -> bb20; // bb4[4]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageLive(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 + _15 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 + StorageLive(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 + _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 + goto -> bb20; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb5: { - _0 = const 1i32; // bb5[0]: scope 1 at $DIR/match-arm-scopes.rs:16:77: 16:78 + _0 = const 1i32; // scope 1 at $DIR/match-arm-scopes.rs:16:77: 16:78 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:77: 16:78 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - drop(_7) -> [return: bb19, unwind: bb10]; // bb5[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + drop(_7) -> [return: bb19, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 } bb6: { - StorageLive(_6); // bb6[0]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - _6 = &(_2.1: bool); // bb6[1]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - StorageLive(_8); // bb6[2]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - _8 = &(_2.2: std::string::String); // bb6[3]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - StorageLive(_9); // bb6[4]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 - StorageLive(_10); // bb6[5]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - _10 = _1; // bb6[6]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - switchInt(_10) -> [false: bb7, otherwise: bb8]; // bb6[7]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + _6 = &(_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + StorageLive(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + StorageLive(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + _10 = _1; // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + switchInt(_10) -> [false: bb7, otherwise: bb8]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb7: { - _9 = (*_6); // bb7[0]: scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 - StorageDead(_10); // bb7[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - switchInt(move _9) -> [false: bb13, otherwise: bb12]; // bb7[2]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + _9 = (*_6); // scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 + StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + switchInt(move _9) -> [false: bb13, otherwise: bb12]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb8: { - _0 = const 3i32; // bb8[0]: scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 + _0 = const 3i32; // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_10); // bb8[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_9); // bb8[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb8[3]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb8[4]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb11; // bb8[5]: scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 + StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb11; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } bb9: { - return; // bb9[0]: scope 0 at $DIR/match-arm-scopes.rs:19:2: 19:2 + return; // scope 0 at $DIR/match-arm-scopes.rs:19:2: 19:2 } bb10 (cleanup): { - goto -> bb25; // bb10[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb25; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb11: { - drop(_2) -> [return: bb9, unwind: bb1]; // bb11[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + drop(_2) -> [return: bb9, unwind: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb12: { - StorageDead(_9); // bb12[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageLive(_5); // bb12[1]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - _5 = (_2.1: bool); // bb12[2]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - StorageLive(_7); // bb12[3]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - _7 = move (_2.2: std::string::String); // bb12[4]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - goto -> bb5; // bb12[5]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + _5 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + goto -> bb5; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb13: { - StorageDead(_9); // bb13[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb13[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb13[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb2; // bb13[3]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb2; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb14: { - StorageLive(_6); // bb14[0]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - _6 = &(_2.0: bool); // bb14[1]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - StorageLive(_8); // bb14[2]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - _8 = &(_2.2: std::string::String); // bb14[3]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - StorageLive(_12); // bb14[4]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 - StorageLive(_13); // bb14[5]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - _13 = _1; // bb14[6]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - switchInt(_13) -> [false: bb15, otherwise: bb16]; // bb14[7]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + _6 = &(_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + StorageLive(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + StorageLive(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + _13 = _1; // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + switchInt(_13) -> [false: bb15, otherwise: bb16]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb15: { - _12 = (*_6); // bb15[0]: scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 - StorageDead(_13); // bb15[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - switchInt(move _12) -> [false: bb18, otherwise: bb17]; // bb15[2]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + _12 = (*_6); // scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 + StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + switchInt(move _12) -> [false: bb18, otherwise: bb17]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb16: { - _0 = const 3i32; // bb16[0]: scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 + _0 = const 3i32; // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_13); // bb16[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_12); // bb16[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb16[3]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb16[4]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb11; // bb16[5]: scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 + StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb11; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } bb17: { - StorageDead(_12); // bb17[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageLive(_5); // bb17[1]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - _5 = (_2.0: bool); // bb17[2]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - StorageLive(_7); // bb17[3]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - _7 = move (_2.2: std::string::String); // bb17[4]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - goto -> bb5; // bb17[5]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + _5 = (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + goto -> bb5; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb18: { - StorageDead(_12); // bb18[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb18[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb18[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb3; // bb18[3]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb3; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb19: { - StorageDead(_7); // bb19[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_5); // bb19[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb19[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb19[3]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb23; // bb19[4]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb20: { - _0 = const 2i32; // bb20[0]: scope 2 at $DIR/match-arm-scopes.rs:17:41: 17:42 + _0 = const 2i32; // scope 2 at $DIR/match-arm-scopes.rs:17:41: 17:42 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:17:41: 17:42 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - drop(_16) -> [return: bb22, unwind: bb10]; // bb20[1]: scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + drop(_16) -> [return: bb22, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 } bb21: { - StorageLive(_15); // bb21[0]: scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 - _15 = (_2.1: bool); // bb21[1]: scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 - StorageLive(_16); // bb21[2]: scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 - _16 = move (_2.2: std::string::String); // bb21[3]: scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 - goto -> bb20; // bb21[4]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageLive(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 + _15 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 + StorageLive(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 + _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 + goto -> bb20; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb22: { - StorageDead(_16); // bb22[0]: scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 - StorageDead(_15); // bb22[1]: scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 - goto -> bb23; // bb22[2]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb23: { - goto -> bb29; // bb23[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb29; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb24 (cleanup): { - goto -> bb1; // bb24[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb1; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb25 (cleanup): { - goto -> bb24; // bb25[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb24; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb26: { - goto -> bb9; // bb26[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb9; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb27 (cleanup): { - goto -> bb1; // bb27[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb1; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb28 (cleanup): { - goto -> bb27; // bb28[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb27; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb29: { - goto -> bb26; // bb29[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + goto -> bb26; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } } diff --git a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir index 80ce94a7f3c61..63974bda26038 100644 --- a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir @@ -30,217 +30,217 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb0: { - FakeRead(ForMatchedPlace, _2); // bb0[0]: scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 - switchInt((_2.0: bool)) -> [false: bb2, otherwise: bb3]; // bb0[1]: scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:15 + FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 + switchInt((_2.0: bool)) -> [false: bb2, otherwise: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:16:10: 16:15 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/match-arm-scopes.rs:14:1: 19:2 + resume; // scope 0 at $DIR/match-arm-scopes.rs:14:1: 19:2 } bb2: { - falseEdges -> [real: bb9, imaginary: bb4]; // bb2[0]: scope 0 at $DIR/match-arm-scopes.rs:16:9: 16:22 + falseEdges -> [real: bb9, imaginary: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:16:9: 16:22 } bb3: { - switchInt((_2.1: bool)) -> [false: bb4, otherwise: bb5]; // bb3[0]: scope 0 at $DIR/match-arm-scopes.rs:16:29: 16:34 + switchInt((_2.1: bool)) -> [false: bb4, otherwise: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:16:29: 16:34 } bb4: { - falseEdges -> [real: bb18, imaginary: bb6]; // bb4[0]: scope 0 at $DIR/match-arm-scopes.rs:16:25: 16:38 + falseEdges -> [real: bb18, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:16:25: 16:38 } bb5: { - switchInt((_2.0: bool)) -> [false: bb7, otherwise: bb6]; // bb5[0]: scope 0 at $DIR/match-arm-scopes.rs:17:10: 17:14 + switchInt((_2.0: bool)) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:17:10: 17:14 } bb6: { - falseEdges -> [real: bb26, imaginary: bb7]; // bb6[0]: scope 0 at $DIR/match-arm-scopes.rs:17:9: 17:21 + falseEdges -> [real: bb26, imaginary: bb7]; // scope 0 at $DIR/match-arm-scopes.rs:17:9: 17:21 } bb7: { - StorageLive(_15); // bb7[0]: scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 - _15 = (_2.1: bool); // bb7[1]: scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 - StorageLive(_16); // bb7[2]: scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 - _16 = move (_2.2: std::string::String); // bb7[3]: scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 - goto -> bb25; // bb7[4]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageLive(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 + _15 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:17:32: 17:33 + StorageLive(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 + _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:17:35: 17:36 + goto -> bb25; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb8: { - _0 = const 1i32; // bb8[0]: scope 1 at $DIR/match-arm-scopes.rs:16:77: 16:78 + _0 = const 1i32; // scope 1 at $DIR/match-arm-scopes.rs:16:77: 16:78 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:77: 16:78 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - drop(_7) -> [return: bb24, unwind: bb14]; // bb8[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + drop(_7) -> [return: bb24, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 } bb9: { - StorageLive(_6); // bb9[0]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - _6 = &(_2.1: bool); // bb9[1]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - StorageLive(_8); // bb9[2]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - _8 = &(_2.2: std::string::String); // bb9[3]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - _3 = &shallow (_2.0: bool); // bb9[4]: scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 - _4 = &shallow (_2.1: bool); // bb9[5]: scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 - StorageLive(_9); // bb9[6]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 - StorageLive(_10); // bb9[7]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - _10 = _1; // bb9[8]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - FakeRead(ForMatchedPlace, _10); // bb9[9]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - switchInt(_10) -> [false: bb11, otherwise: bb10]; // bb9[10]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + _6 = &(_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + StorageLive(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + _3 = &shallow (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 + _4 = &shallow (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 + StorageLive(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + _10 = _1; // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + FakeRead(ForMatchedPlace, _10); // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + switchInt(_10) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb10: { - falseEdges -> [real: bb12, imaginary: bb11]; // bb10[0]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + falseEdges -> [real: bb12, imaginary: bb11]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb11: { - _9 = (*_6); // bb11[0]: scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 - StorageDead(_10); // bb11[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - switchInt(move _9) -> [false: bb17, otherwise: bb16]; // bb11[2]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + _9 = (*_6); // scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 + StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + switchInt(move _9) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb12: { - _0 = const 3i32; // bb12[0]: scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 + _0 = const 3i32; // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_10); // bb12[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_9); // bb12[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb12[3]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb12[4]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb15; // bb12[5]: scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 + StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb15; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } bb13: { - return; // bb13[0]: scope 0 at $DIR/match-arm-scopes.rs:19:2: 19:2 + return; // scope 0 at $DIR/match-arm-scopes.rs:19:2: 19:2 } bb14 (cleanup): { - drop(_2) -> bb1; // bb14[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + drop(_2) -> bb1; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb15: { - drop(_2) -> [return: bb13, unwind: bb1]; // bb15[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + drop(_2) -> [return: bb13, unwind: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } bb16: { - StorageDead(_9); // bb16[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - FakeRead(ForMatchGuard, _3); // bb16[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - FakeRead(ForMatchGuard, _4); // bb16[2]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - FakeRead(ForGuardBinding, _6); // bb16[3]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - FakeRead(ForGuardBinding, _8); // bb16[4]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageLive(_5); // bb16[5]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - _5 = (_2.1: bool); // bb16[6]: scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 - StorageLive(_7); // bb16[7]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - _7 = move (_2.2: std::string::String); // bb16[8]: scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 - goto -> bb8; // bb16[9]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + FakeRead(ForGuardBinding, _8); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + _5 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 + StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 + goto -> bb8; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb17: { - StorageDead(_9); // bb17[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb17[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb17[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - falseEdges -> [real: bb3, imaginary: bb4]; // bb17[3]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + falseEdges -> [real: bb3, imaginary: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb18: { - StorageLive(_6); // bb18[0]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - _6 = &(_2.0: bool); // bb18[1]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - StorageLive(_8); // bb18[2]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - _8 = &(_2.2: std::string::String); // bb18[3]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - _3 = &shallow (_2.0: bool); // bb18[4]: scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 - _4 = &shallow (_2.1: bool); // bb18[5]: scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 - StorageLive(_12); // bb18[6]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 - StorageLive(_13); // bb18[7]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - _13 = _1; // bb18[8]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - FakeRead(ForMatchedPlace, _13); // bb18[9]: scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 - switchInt(_13) -> [false: bb20, otherwise: bb19]; // bb18[10]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + _6 = &(_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + StorageLive(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + _3 = &shallow (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 + _4 = &shallow (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:15:11: 15:16 + StorageLive(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageLive(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + _13 = _1; // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + FakeRead(ForMatchedPlace, _13); // scope 0 at $DIR/match-arm-scopes.rs:16:45: 16:49 + switchInt(_13) -> [false: bb20, otherwise: bb19]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb19: { - falseEdges -> [real: bb21, imaginary: bb20]; // bb19[0]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + falseEdges -> [real: bb21, imaginary: bb20]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb20: { - _12 = (*_6); // bb20[0]: scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 - StorageDead(_13); // bb20[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - switchInt(move _12) -> [false: bb23, otherwise: bb22]; // bb20[2]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + _12 = (*_6); // scope 0 at $DIR/match-arm-scopes.rs:16:70: 16:71 + StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + switchInt(move _12) -> [false: bb23, otherwise: bb22]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb21: { - _0 = const 3i32; // bb21[0]: scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 + _0 = const 3i32; // scope 0 at $DIR/match-arm-scopes.rs:16:59: 16:60 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_13); // bb21[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_12); // bb21[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb21[3]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb21[4]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb15; // bb21[5]: scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 + StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb15; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } bb22: { - StorageDead(_12); // bb22[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - FakeRead(ForMatchGuard, _3); // bb22[1]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - FakeRead(ForMatchGuard, _4); // bb22[2]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - FakeRead(ForGuardBinding, _6); // bb22[3]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - FakeRead(ForGuardBinding, _8); // bb22[4]: scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageLive(_5); // bb22[5]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - _5 = (_2.0: bool); // bb22[6]: scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 - StorageLive(_7); // bb22[7]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - _7 = move (_2.2: std::string::String); // bb22[8]: scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 - goto -> bb8; // bb22[9]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + FakeRead(ForGuardBinding, _8); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 + StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + _5 = (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 + StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 + goto -> bb8; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb23: { - StorageDead(_12); // bb23[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb23[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb23[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - falseEdges -> [real: bb5, imaginary: bb6]; // bb23[3]: scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + falseEdges -> [real: bb5, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb24: { - StorageDead(_7); // bb24[0]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_5); // bb24[1]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // bb24[2]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // bb24[3]: scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - goto -> bb28; // bb24[4]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + goto -> bb28; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb25: { - _0 = const 2i32; // bb25[0]: scope 2 at $DIR/match-arm-scopes.rs:17:41: 17:42 + _0 = const 2i32; // scope 2 at $DIR/match-arm-scopes.rs:17:41: 17:42 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/match-arm-scopes.rs:17:41: 17:42 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - drop(_16) -> [return: bb27, unwind: bb14]; // bb25[1]: scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + drop(_16) -> [return: bb27, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 } bb26: { - StorageLive(_15); // bb26[0]: scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 - _15 = (_2.1: bool); // bb26[1]: scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 - StorageLive(_16); // bb26[2]: scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 - _16 = move (_2.2: std::string::String); // bb26[3]: scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 - goto -> bb25; // bb26[4]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageLive(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 + _15 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:17:16: 17:17 + StorageLive(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 + _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:17:19: 17:20 + goto -> bb25; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb27: { - StorageDead(_16); // bb27[0]: scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 - StorageDead(_15); // bb27[1]: scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 - goto -> bb28; // bb27[2]: scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 + StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + goto -> bb28; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } bb28: { - drop(_2) -> [return: bb13, unwind: bb1]; // bb28[0]: scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 + drop(_2) -> [return: bb13, unwind: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:19:1: 19:2 } } diff --git a/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir index 0f8b6cc9c841b..db888bc4b87b2 100644 --- a/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir +++ b/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir @@ -24,26 +24,26 @@ fn full_tested_match() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 - _2 = std::option::Option::::Some(const 42i32); // bb0[2]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 + StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 + StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 + _2 = std::option::Option::::Some(const 42i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/match_false_edges.rs:15:24: 15:26 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - FakeRead(ForMatchedPlace, _2); // bb0[3]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 - _3 = discriminant(_2); // bb0[4]: scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 - switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb5]; // bb0[5]: scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 + FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 + _3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 + switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/match_false_edges.rs:14:1: 20:2 + resume; // scope 0 at $DIR/match_false_edges.rs:14:1: 20:2 } bb2: { - _1 = (const 3i32, const 3i32); // bb2[0]: scope 0 at $DIR/match_false_edges.rs:18:17: 18:23 + _1 = (const 3i32, const 3i32); // scope 0 at $DIR/match_false_edges.rs:18:17: 18:23 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) @@ -56,34 +56,34 @@ fn full_tested_match() -> () { // mir::Constant // + span: $DIR/match_false_edges.rs:18:21: 18:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - goto -> bb11; // bb2[1]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 + goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 } bb3: { - falseEdges -> [real: bb6, imaginary: bb4]; // bb3[0]: scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 + falseEdges -> [real: bb6, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 } bb4: { - falseEdges -> [real: bb10, imaginary: bb2]; // bb4[0]: scope 0 at $DIR/match_false_edges.rs:17:9: 17:16 + falseEdges -> [real: bb10, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:17:9: 17:16 } bb5: { - unreachable; // bb5[0]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 + unreachable; // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 } bb6: { - StorageLive(_6); // bb6[0]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 - _11 = const full_tested_match::promoted[0]; // bb6[1]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 + StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 + _11 = const full_tested_match::promoted[0]; // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 // ty::Const // + ty: &std::option::Option // + val: Unevaluated(DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/match_false_edges.rs:16:14: 16:15 // + literal: Const { ty: &std::option::Option, val: Unevaluated(DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), [], Some(promoted[0])) } - _6 = &(((*_11) as Some).0: i32); // bb6[2]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 - _4 = &shallow _2; // bb6[3]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 - StorageLive(_7); // bb6[4]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 - _7 = const guard() -> [return: bb7, unwind: bb1]; // bb6[5]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 + _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 + _4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 + StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 + _7 = const guard() -> [return: bb7, unwind: bb1]; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 // ty::Const // + ty: fn() -> bool {guard} // + val: Value(Scalar()) @@ -93,63 +93,63 @@ fn full_tested_match() -> () { } bb7: { - switchInt(move _7) -> [false: bb9, otherwise: bb8]; // bb7[0]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 + switchInt(move _7) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 } bb8: { - StorageDead(_7); // bb8[0]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - FakeRead(ForMatchGuard, _4); // bb8[1]: scope 0 at $DIR/match_false_edges.rs:16:26: 16:27 - FakeRead(ForGuardBinding, _6); // bb8[2]: scope 0 at $DIR/match_false_edges.rs:16:26: 16:27 - StorageLive(_5); // bb8[3]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 - _5 = ((_2 as Some).0: i32); // bb8[4]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 - StorageLive(_8); // bb8[5]: scope 2 at $DIR/match_false_edges.rs:16:35: 16:36 - _8 = _5; // bb8[6]: scope 2 at $DIR/match_false_edges.rs:16:35: 16:36 - _1 = (const 1i32, move _8); // bb8[7]: scope 2 at $DIR/match_false_edges.rs:16:31: 16:37 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27 + FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27 + StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 + _5 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 + StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36 + _8 = _5; // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36 + _1 = (const 1i32, move _8); // scope 2 at $DIR/match_false_edges.rs:16:31: 16:37 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match_false_edges.rs:16:32: 16:33 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - StorageDead(_8); // bb8[8]: scope 2 at $DIR/match_false_edges.rs:16:36: 16:37 - StorageDead(_5); // bb8[9]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - StorageDead(_6); // bb8[10]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - goto -> bb11; // bb8[11]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 + StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:16:36: 16:37 + StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 } bb9: { - StorageDead(_7); // bb9[0]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - StorageDead(_6); // bb9[1]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - goto -> bb4; // bb9[2]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + goto -> bb4; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 } bb10: { - StorageLive(_9); // bb10[0]: scope 0 at $DIR/match_false_edges.rs:17:14: 17:15 - _9 = ((_2 as Some).0: i32); // bb10[1]: scope 0 at $DIR/match_false_edges.rs:17:14: 17:15 - StorageLive(_10); // bb10[2]: scope 3 at $DIR/match_false_edges.rs:17:24: 17:25 - _10 = _9; // bb10[3]: scope 3 at $DIR/match_false_edges.rs:17:24: 17:25 - _1 = (const 2i32, move _10); // bb10[4]: scope 3 at $DIR/match_false_edges.rs:17:20: 17:26 + StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:17:14: 17:15 + _9 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:17:14: 17:15 + StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25 + _10 = _9; // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25 + _1 = (const 2i32, move _10); // scope 3 at $DIR/match_false_edges.rs:17:20: 17:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/match_false_edges.rs:17:21: 17:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - StorageDead(_10); // bb10[5]: scope 3 at $DIR/match_false_edges.rs:17:25: 17:26 - StorageDead(_9); // bb10[6]: scope 0 at $DIR/match_false_edges.rs:17:26: 17:27 - goto -> bb11; // bb10[7]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 + StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:17:25: 17:26 + StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:17:26: 17:27 + goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 } bb11: { - StorageDead(_2); // bb11[0]: scope 0 at $DIR/match_false_edges.rs:19:6: 19:7 - StorageDead(_1); // bb11[1]: scope 0 at $DIR/match_false_edges.rs:19:6: 19:7 - _0 = const (); // bb11[2]: scope 0 at $DIR/match_false_edges.rs:14:28: 20:2 + StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:19:6: 19:7 + StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:19:6: 19:7 + _0 = const (); // scope 0 at $DIR/match_false_edges.rs:14:28: 20:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/match_false_edges.rs:14:28: 20:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb11[3]: scope 0 at $DIR/match_false_edges.rs:20:2: 20:2 + return; // scope 0 at $DIR/match_false_edges.rs:20:2: 20:2 } } diff --git a/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir index 2cf6c97ae2265..96aa9e828d784 100644 --- a/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir @@ -23,59 +23,59 @@ fn full_tested_match2() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 - _2 = std::option::Option::::Some(const 42i32); // bb0[2]: scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 + StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 + StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 + _2 = std::option::Option::::Some(const 42i32); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/match_false_edges.rs:26:24: 26:26 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - FakeRead(ForMatchedPlace, _2); // bb0[3]: scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 - _3 = discriminant(_2); // bb0[4]: scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 - switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb5]; // bb0[5]: scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 + FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 + _3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 + switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/match_false_edges.rs:25:1: 31:2 + resume; // scope 0 at $DIR/match_false_edges.rs:25:1: 31:2 } bb2: { - falseEdges -> [real: bb10, imaginary: bb4]; // bb2[0]: scope 0 at $DIR/match_false_edges.rs:28:9: 28:13 + falseEdges -> [real: bb10, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:28:9: 28:13 } bb3: { - falseEdges -> [real: bb6, imaginary: bb2]; // bb3[0]: scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 + falseEdges -> [real: bb6, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 } bb4: { - StorageLive(_9); // bb4[0]: scope 0 at $DIR/match_false_edges.rs:29:14: 29:15 - _9 = ((_2 as Some).0: i32); // bb4[1]: scope 0 at $DIR/match_false_edges.rs:29:14: 29:15 - StorageLive(_10); // bb4[2]: scope 3 at $DIR/match_false_edges.rs:29:24: 29:25 - _10 = _9; // bb4[3]: scope 3 at $DIR/match_false_edges.rs:29:24: 29:25 - _1 = (const 2i32, move _10); // bb4[4]: scope 3 at $DIR/match_false_edges.rs:29:20: 29:26 + StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:29:14: 29:15 + _9 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:29:14: 29:15 + StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:29:24: 29:25 + _10 = _9; // scope 3 at $DIR/match_false_edges.rs:29:24: 29:25 + _1 = (const 2i32, move _10); // scope 3 at $DIR/match_false_edges.rs:29:20: 29:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/match_false_edges.rs:29:21: 29:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - StorageDead(_10); // bb4[5]: scope 3 at $DIR/match_false_edges.rs:29:25: 29:26 - StorageDead(_9); // bb4[6]: scope 0 at $DIR/match_false_edges.rs:29:26: 29:27 - goto -> bb11; // bb4[7]: scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 + StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:29:25: 29:26 + StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:29:26: 29:27 + goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 } bb5: { - unreachable; // bb5[0]: scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 + unreachable; // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 } bb6: { - StorageLive(_6); // bb6[0]: scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 - _6 = &((_2 as Some).0: i32); // bb6[1]: scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 - _4 = &shallow _2; // bb6[2]: scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 - StorageLive(_7); // bb6[3]: scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 - _7 = const guard() -> [return: bb7, unwind: bb1]; // bb6[4]: scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 + StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 + _6 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 + _4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 + StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 + _7 = const guard() -> [return: bb7, unwind: bb1]; // scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 // ty::Const // + ty: fn() -> bool {guard} // + val: Value(Scalar()) @@ -85,38 +85,38 @@ fn full_tested_match2() -> () { } bb7: { - switchInt(move _7) -> [false: bb9, otherwise: bb8]; // bb7[0]: scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 + switchInt(move _7) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 } bb8: { - StorageDead(_7); // bb8[0]: scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - FakeRead(ForMatchGuard, _4); // bb8[1]: scope 0 at $DIR/match_false_edges.rs:27:26: 27:27 - FakeRead(ForGuardBinding, _6); // bb8[2]: scope 0 at $DIR/match_false_edges.rs:27:26: 27:27 - StorageLive(_5); // bb8[3]: scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 - _5 = ((_2 as Some).0: i32); // bb8[4]: scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 - StorageLive(_8); // bb8[5]: scope 2 at $DIR/match_false_edges.rs:27:35: 27:36 - _8 = _5; // bb8[6]: scope 2 at $DIR/match_false_edges.rs:27:35: 27:36 - _1 = (const 1i32, move _8); // bb8[7]: scope 2 at $DIR/match_false_edges.rs:27:31: 27:37 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:27:26: 27:27 + FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:27:26: 27:27 + StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 + _5 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 + StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:27:35: 27:36 + _8 = _5; // scope 2 at $DIR/match_false_edges.rs:27:35: 27:36 + _1 = (const 1i32, move _8); // scope 2 at $DIR/match_false_edges.rs:27:31: 27:37 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match_false_edges.rs:27:32: 27:33 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - StorageDead(_8); // bb8[8]: scope 2 at $DIR/match_false_edges.rs:27:36: 27:37 - StorageDead(_5); // bb8[9]: scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - StorageDead(_6); // bb8[10]: scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - goto -> bb11; // bb8[11]: scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 + StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:27:36: 27:37 + StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 } bb9: { - StorageDead(_7); // bb9[0]: scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - StorageDead(_6); // bb9[1]: scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - falseEdges -> [real: bb4, imaginary: bb2]; // bb9[2]: scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + falseEdges -> [real: bb4, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 } bb10: { - _1 = (const 3i32, const 3i32); // bb10[0]: scope 0 at $DIR/match_false_edges.rs:28:17: 28:23 + _1 = (const 3i32, const 3i32); // scope 0 at $DIR/match_false_edges.rs:28:17: 28:23 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) @@ -129,19 +129,19 @@ fn full_tested_match2() -> () { // mir::Constant // + span: $DIR/match_false_edges.rs:28:21: 28:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - goto -> bb11; // bb10[1]: scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 + goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 } bb11: { - StorageDead(_2); // bb11[0]: scope 0 at $DIR/match_false_edges.rs:30:6: 30:7 - StorageDead(_1); // bb11[1]: scope 0 at $DIR/match_false_edges.rs:30:6: 30:7 - _0 = const (); // bb11[2]: scope 0 at $DIR/match_false_edges.rs:25:29: 31:2 + StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:30:6: 30:7 + StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:30:6: 30:7 + _0 = const (); // scope 0 at $DIR/match_false_edges.rs:25:29: 31:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/match_false_edges.rs:25:29: 31:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb11[3]: scope 0 at $DIR/match_false_edges.rs:31:2: 31:2 + return; // scope 0 at $DIR/match_false_edges.rs:31:2: 31:2 } } diff --git a/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir index 7bba0b20d8ebc..63a7c4bc43d7a 100644 --- a/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir @@ -34,56 +34,56 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 - _2 = std::option::Option::::Some(const 1i32); // bb0[2]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 + StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 + StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 + _2 = std::option::Option::::Some(const 1i32); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match_false_edges.rs:35:24: 35:25 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - FakeRead(ForMatchedPlace, _2); // bb0[3]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 - _4 = discriminant(_2); // bb0[4]: scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 - switchInt(move _4) -> [1isize: bb3, otherwise: bb2]; // bb0[5]: scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 + FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 + _4 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 + switchInt(move _4) -> [1isize: bb3, otherwise: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/match_false_edges.rs:34:1: 41:2 + resume; // scope 0 at $DIR/match_false_edges.rs:34:1: 41:2 } bb2: { - falseEdges -> [real: bb10, imaginary: bb5]; // bb2[0]: scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 + falseEdges -> [real: bb10, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 } bb3: { - falseEdges -> [real: bb6, imaginary: bb2]; // bb3[0]: scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 + falseEdges -> [real: bb6, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 } bb4: { - StorageLive(_14); // bb4[0]: scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 - _14 = _2; // bb4[1]: scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 - _1 = const 4i32; // bb4[2]: scope 5 at $DIR/match_false_edges.rs:39:15: 39:16 + StorageLive(_14); // scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 + _14 = _2; // scope 0 at $DIR/match_false_edges.rs:39:9: 39:11 + _1 = const 4i32; // scope 5 at $DIR/match_false_edges.rs:39:15: 39:16 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000004)) // mir::Constant // + span: $DIR/match_false_edges.rs:39:15: 39:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageDead(_14); // bb4[3]: scope 0 at $DIR/match_false_edges.rs:39:16: 39:17 - goto -> bb15; // bb4[4]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 + StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:39:16: 39:17 + goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } bb5: { - falseEdges -> [real: bb11, imaginary: bb4]; // bb5[0]: scope 0 at $DIR/match_false_edges.rs:38:9: 38:16 + falseEdges -> [real: bb11, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:38:9: 38:16 } bb6: { - StorageLive(_7); // bb6[0]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 - _7 = &((_2 as Some).0: i32); // bb6[1]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 - _5 = &shallow _2; // bb6[2]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 - StorageLive(_8); // bb6[3]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 - _8 = const guard() -> [return: bb7, unwind: bb1]; // bb6[4]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 + StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 + _7 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 + _5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 + StorageLive(_8); // scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 + _8 = const guard() -> [return: bb7, unwind: bb1]; // scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 // ty::Const // + ty: fn() -> bool {guard} // + val: Value(Scalar()) @@ -93,55 +93,55 @@ fn main() -> () { } bb7: { - switchInt(move _8) -> [false: bb9, otherwise: bb8]; // bb7[0]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 + switchInt(move _8) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 } bb8: { - StorageDead(_8); // bb8[0]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - FakeRead(ForMatchGuard, _5); // bb8[1]: scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 - FakeRead(ForGuardBinding, _7); // bb8[2]: scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 - StorageLive(_6); // bb8[3]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 - _6 = ((_2 as Some).0: i32); // bb8[4]: scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 - _1 = const 1i32; // bb8[5]: scope 2 at $DIR/match_false_edges.rs:36:32: 36:33 + StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 + FakeRead(ForGuardBinding, _7); // scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 + StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 + _6 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 + _1 = const 1i32; // scope 2 at $DIR/match_false_edges.rs:36:32: 36:33 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match_false_edges.rs:36:32: 36:33 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - StorageDead(_6); // bb8[6]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - StorageDead(_7); // bb8[7]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - goto -> bb15; // bb8[8]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } bb9: { - StorageDead(_8); // bb9[0]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - StorageDead(_7); // bb9[1]: scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - falseEdges -> [real: bb2, imaginary: bb2]; // bb9[2]: scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 + StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + falseEdges -> [real: bb2, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 } bb10: { - StorageLive(_9); // bb10[0]: scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 - _9 = _2; // bb10[1]: scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 - _1 = const 2i32; // bb10[2]: scope 3 at $DIR/match_false_edges.rs:37:15: 37:16 + StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 + _9 = _2; // scope 0 at $DIR/match_false_edges.rs:37:9: 37:11 + _1 = const 2i32; // scope 3 at $DIR/match_false_edges.rs:37:15: 37:16 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/match_false_edges.rs:37:15: 37:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - StorageDead(_9); // bb10[3]: scope 0 at $DIR/match_false_edges.rs:37:16: 37:17 - goto -> bb15; // bb10[4]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 + StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:37:16: 37:17 + goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } bb11: { - StorageLive(_11); // bb11[0]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 - _11 = &((_2 as Some).0: i32); // bb11[1]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 - _5 = &shallow _2; // bb11[2]: scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 - StorageLive(_12); // bb11[3]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 - StorageLive(_13); // bb11[4]: scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 - _13 = (*_11); // bb11[5]: scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 - _12 = const guard2(move _13) -> [return: bb12, unwind: bb1]; // bb11[6]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 + StorageLive(_11); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 + _11 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 + _5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 + StorageLive(_12); // scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 + StorageLive(_13); // scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 + _13 = (*_11); // scope 0 at $DIR/match_false_edges.rs:38:27: 38:28 + _12 = const guard2(move _13) -> [return: bb12, unwind: bb1]; // scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 // ty::Const // + ty: fn(i32) -> bool {guard2} // + val: Value(Scalar()) @@ -151,44 +151,44 @@ fn main() -> () { } bb12: { - StorageDead(_13); // bb12[0]: scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 - switchInt(move _12) -> [false: bb14, otherwise: bb13]; // bb12[1]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 + StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 + switchInt(move _12) -> [false: bb14, otherwise: bb13]; // scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 } bb13: { - StorageDead(_12); // bb13[0]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - FakeRead(ForMatchGuard, _5); // bb13[1]: scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 - FakeRead(ForGuardBinding, _11); // bb13[2]: scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 - StorageLive(_10); // bb13[3]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 - _10 = ((_2 as Some).0: i32); // bb13[4]: scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 - _1 = const 3i32; // bb13[5]: scope 4 at $DIR/match_false_edges.rs:38:33: 38:34 + StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 + FakeRead(ForGuardBinding, _11); // scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 + StorageLive(_10); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 + _10 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 + _1 = const 3i32; // scope 4 at $DIR/match_false_edges.rs:38:33: 38:34 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match_false_edges.rs:38:33: 38:34 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_10); // bb13[6]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - StorageDead(_11); // bb13[7]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - goto -> bb15; // bb13[8]: scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 + StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } bb14: { - StorageDead(_12); // bb14[0]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - StorageDead(_11); // bb14[1]: scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - falseEdges -> [real: bb4, imaginary: bb4]; // bb14[2]: scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 + StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + falseEdges -> [real: bb4, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 } bb15: { - StorageDead(_2); // bb15[0]: scope 0 at $DIR/match_false_edges.rs:40:6: 40:7 - StorageDead(_1); // bb15[1]: scope 0 at $DIR/match_false_edges.rs:40:6: 40:7 - _0 = const (); // bb15[2]: scope 0 at $DIR/match_false_edges.rs:34:11: 41:2 + StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:40:6: 40:7 + StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:40:6: 40:7 + _0 = const (); // scope 0 at $DIR/match_false_edges.rs:34:11: 41:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/match_false_edges.rs:34:11: 41:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb15[3]: scope 0 at $DIR/match_false_edges.rs:41:2: 41:2 + return; // scope 0 at $DIR/match_false_edges.rs:41:2: 41:2 } } diff --git a/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir index 3236b3bcc738f..9408248b25dd3 100644 --- a/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir @@ -19,154 +19,154 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/match_test.rs:7:9: 7:10 - _1 = const 3i32; // bb0[1]: scope 0 at $DIR/match_test.rs:7:13: 7:14 + StorageLive(_1); // scope 0 at $DIR/match_test.rs:7:9: 7:10 + _1 = const 3i32; // scope 0 at $DIR/match_test.rs:7:13: 7:14 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match_test.rs:7:13: 7:14 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/match_test.rs:7:9: 7:10 - StorageLive(_2); // bb0[3]: scope 1 at $DIR/match_test.rs:8:9: 8:10 - _2 = const true; // bb0[4]: scope 1 at $DIR/match_test.rs:8:13: 8:17 + FakeRead(ForLet, _1); // scope 0 at $DIR/match_test.rs:7:9: 7:10 + StorageLive(_2); // scope 1 at $DIR/match_test.rs:8:9: 8:10 + _2 = const true; // scope 1 at $DIR/match_test.rs:8:13: 8:17 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/match_test.rs:8:13: 8:17 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - FakeRead(ForLet, _2); // bb0[5]: scope 1 at $DIR/match_test.rs:8:9: 8:10 - StorageLive(_3); // bb0[6]: scope 2 at $DIR/match_test.rs:12:5: 17:6 - FakeRead(ForMatchedPlace, _1); // bb0[7]: scope 2 at $DIR/match_test.rs:12:11: 12:12 - _6 = Le(const 0i32, _1); // bb0[8]: scope 2 at $DIR/match_test.rs:13:9: 13:14 + FakeRead(ForLet, _2); // scope 1 at $DIR/match_test.rs:8:9: 8:10 + StorageLive(_3); // scope 2 at $DIR/match_test.rs:12:5: 17:6 + FakeRead(ForMatchedPlace, _1); // scope 2 at $DIR/match_test.rs:12:11: 12:12 + _6 = Le(const 0i32, _1); // scope 2 at $DIR/match_test.rs:13:9: 13:14 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/match_test.rs:13:9: 13:14 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - switchInt(move _6) -> [false: bb4, otherwise: bb1]; // bb0[9]: scope 2 at $DIR/match_test.rs:13:9: 13:14 + switchInt(move _6) -> [false: bb4, otherwise: bb1]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 } bb1: { - _7 = Lt(_1, const 10i32); // bb1[0]: scope 2 at $DIR/match_test.rs:13:9: 13:14 + _7 = Lt(_1, const 10i32); // scope 2 at $DIR/match_test.rs:13:9: 13:14 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000000a)) // mir::Constant // + span: $DIR/match_test.rs:13:9: 13:14 // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } - switchInt(move _7) -> [false: bb4, otherwise: bb2]; // bb1[1]: scope 2 at $DIR/match_test.rs:13:9: 13:14 + switchInt(move _7) -> [false: bb4, otherwise: bb2]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 } bb2: { - falseEdges -> [real: bb9, imaginary: bb6]; // bb2[0]: scope 2 at $DIR/match_test.rs:13:9: 13:14 + falseEdges -> [real: bb9, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 } bb3: { - _3 = const 3i32; // bb3[0]: scope 2 at $DIR/match_test.rs:16:14: 16:15 + _3 = const 3i32; // scope 2 at $DIR/match_test.rs:16:14: 16:15 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000003)) // mir::Constant // + span: $DIR/match_test.rs:16:14: 16:15 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - goto -> bb14; // bb3[1]: scope 2 at $DIR/match_test.rs:12:5: 17:6 + goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } bb4: { - _4 = Le(const 10i32, _1); // bb4[0]: scope 2 at $DIR/match_test.rs:14:9: 14:16 + _4 = Le(const 10i32, _1); // scope 2 at $DIR/match_test.rs:14:9: 14:16 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000000a)) // mir::Constant // + span: $DIR/match_test.rs:14:9: 14:16 // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } - switchInt(move _4) -> [false: bb7, otherwise: bb5]; // bb4[1]: scope 2 at $DIR/match_test.rs:14:9: 14:16 + switchInt(move _4) -> [false: bb7, otherwise: bb5]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 } bb5: { - _5 = Le(_1, const 20i32); // bb5[0]: scope 2 at $DIR/match_test.rs:14:9: 14:16 + _5 = Le(_1, const 20i32); // scope 2 at $DIR/match_test.rs:14:9: 14:16 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000014)) // mir::Constant // + span: $DIR/match_test.rs:14:9: 14:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000014)) } - switchInt(move _5) -> [false: bb7, otherwise: bb6]; // bb5[1]: scope 2 at $DIR/match_test.rs:14:9: 14:16 + switchInt(move _5) -> [false: bb7, otherwise: bb6]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 } bb6: { - falseEdges -> [real: bb12, imaginary: bb8]; // bb6[0]: scope 2 at $DIR/match_test.rs:14:9: 14:16 + falseEdges -> [real: bb12, imaginary: bb8]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 } bb7: { - switchInt(_1) -> [-1i32: bb8, otherwise: bb3]; // bb7[0]: scope 2 at $DIR/match_test.rs:15:9: 15:11 + switchInt(_1) -> [-1i32: bb8, otherwise: bb3]; // scope 2 at $DIR/match_test.rs:15:9: 15:11 } bb8: { - falseEdges -> [real: bb13, imaginary: bb3]; // bb8[0]: scope 2 at $DIR/match_test.rs:15:9: 15:11 + falseEdges -> [real: bb13, imaginary: bb3]; // scope 2 at $DIR/match_test.rs:15:9: 15:11 } bb9: { - _8 = &shallow _1; // bb9[0]: scope 2 at $DIR/match_test.rs:12:11: 12:12 - StorageLive(_9); // bb9[1]: scope 2 at $DIR/match_test.rs:13:18: 13:19 - _9 = _2; // bb9[2]: scope 2 at $DIR/match_test.rs:13:18: 13:19 - switchInt(move _9) -> [false: bb11, otherwise: bb10]; // bb9[3]: scope 2 at $DIR/match_test.rs:13:18: 13:19 + _8 = &shallow _1; // scope 2 at $DIR/match_test.rs:12:11: 12:12 + StorageLive(_9); // scope 2 at $DIR/match_test.rs:13:18: 13:19 + _9 = _2; // scope 2 at $DIR/match_test.rs:13:18: 13:19 + switchInt(move _9) -> [false: bb11, otherwise: bb10]; // scope 2 at $DIR/match_test.rs:13:18: 13:19 } bb10: { - StorageDead(_9); // bb10[0]: scope 2 at $DIR/match_test.rs:13:24: 13:25 - FakeRead(ForMatchGuard, _8); // bb10[1]: scope 2 at $DIR/match_test.rs:13:18: 13:19 - _3 = const 0i32; // bb10[2]: scope 2 at $DIR/match_test.rs:13:23: 13:24 + StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:24: 13:25 + FakeRead(ForMatchGuard, _8); // scope 2 at $DIR/match_test.rs:13:18: 13:19 + _3 = const 0i32; // scope 2 at $DIR/match_test.rs:13:23: 13:24 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/match_test.rs:13:23: 13:24 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - goto -> bb14; // bb10[3]: scope 2 at $DIR/match_test.rs:12:5: 17:6 + goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } bb11: { - StorageDead(_9); // bb11[0]: scope 2 at $DIR/match_test.rs:13:24: 13:25 - falseEdges -> [real: bb3, imaginary: bb6]; // bb11[1]: scope 2 at $DIR/match_test.rs:13:18: 13:19 + StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:24: 13:25 + falseEdges -> [real: bb3, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:18: 13:19 } bb12: { - _3 = const 1i32; // bb12[0]: scope 2 at $DIR/match_test.rs:14:20: 14:21 + _3 = const 1i32; // scope 2 at $DIR/match_test.rs:14:20: 14:21 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/match_test.rs:14:20: 14:21 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - goto -> bb14; // bb12[1]: scope 2 at $DIR/match_test.rs:12:5: 17:6 + goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } bb13: { - _3 = const 2i32; // bb13[0]: scope 2 at $DIR/match_test.rs:15:15: 15:16 + _3 = const 2i32; // scope 2 at $DIR/match_test.rs:15:15: 15:16 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/match_test.rs:15:15: 15:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - goto -> bb14; // bb13[1]: scope 2 at $DIR/match_test.rs:12:5: 17:6 + goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } bb14: { - StorageDead(_3); // bb14[0]: scope 2 at $DIR/match_test.rs:17:6: 17:7 - _0 = const (); // bb14[1]: scope 0 at $DIR/match_test.rs:6:11: 18:2 + StorageDead(_3); // scope 2 at $DIR/match_test.rs:17:6: 17:7 + _0 = const (); // scope 0 at $DIR/match_test.rs:6:11: 18:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/match_test.rs:6:11: 18:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb14[2]: scope 1 at $DIR/match_test.rs:18:1: 18:2 - StorageDead(_1); // bb14[3]: scope 0 at $DIR/match_test.rs:18:1: 18:2 - return; // bb14[4]: scope 0 at $DIR/match_test.rs:18:2: 18:2 + StorageDead(_2); // scope 1 at $DIR/match_test.rs:18:1: 18:2 + StorageDead(_1); // scope 0 at $DIR/match_test.rs:18:1: 18:2 + return; // scope 0 at $DIR/match_test.rs:18:2: 18:2 } } diff --git a/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir index 383024113366d..a20a3c0e603e9 100644 --- a/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir @@ -13,17 +13,17 @@ fn unwrap(_1: std::option::Option) -> T { } bb0: { - _2 = discriminant(_1); // bb0[0]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16 - switchInt(move _2) -> [0isize: bb2, 1isize: bb4, otherwise: bb3]; // bb0[1]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16 + _2 = discriminant(_1); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16 + switchInt(move _2) -> [0isize: bb2, 1isize: bb4, otherwise: bb3]; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:7:1: 12:2 + resume; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:7:1: 12:2 } bb2: { - StorageLive(_4); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL - const std::rt::begin_panic::<&str>(const "explicit panic") -> bb5; // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL + StorageLive(_4); // scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL + const std::rt::begin_panic::<&str>(const "explicit panic") -> bb5; // scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL // ty::Const // + ty: fn(&str) -> ! {std::rt::begin_panic::<&str>} // + val: Value(Scalar()) @@ -39,19 +39,19 @@ fn unwrap(_1: std::option::Option) -> T { } bb3: { - unreachable; // bb3[0]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:8:11: 8:14 + unreachable; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:8:11: 8:14 } bb4: { - StorageLive(_3); // bb4[0]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15 - _3 = move ((_1 as Some).0: T); // bb4[1]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15 - _0 = move _3; // bb4[2]: scope 1 at $DIR/no-drop-for-inactive-variant.rs:9:20: 9:21 - StorageDead(_3); // bb4[3]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:21: 9:22 - _5 = discriminant(_1); // bb4[4]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2 - return; // bb4[5]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:2: 12:2 + StorageLive(_3); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15 + _3 = move ((_1 as Some).0: T); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15 + _0 = move _3; // scope 1 at $DIR/no-drop-for-inactive-variant.rs:9:20: 9:21 + StorageDead(_3); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:21: 9:22 + _5 = discriminant(_1); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2 + return; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:2: 12:2 } bb5 (cleanup): { - drop(_1) -> bb1; // bb5[0]: scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2 + drop(_1) -> bb1; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2 } } diff --git a/src/test/mir-opt/no-spurious-drop-after-call/rustc.main.ElaborateDrops.before.mir b/src/test/mir-opt/no-spurious-drop-after-call/rustc.main.ElaborateDrops.before.mir index e43e37feba743..e1ab6cc0b9423 100644 --- a/src/test/mir-opt/no-spurious-drop-after-call/rustc.main.ElaborateDrops.before.mir +++ b/src/test/mir-opt/no-spurious-drop-after-call/rustc.main.ElaborateDrops.before.mir @@ -8,19 +8,19 @@ fn main() -> () { let _4: &str; // in scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 - StorageLive(_4); // bb0[3]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 - _4 = const ""; // bb0[4]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 + StorageLive(_1); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 + StorageLive(_2); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 + StorageLive(_3); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 + StorageLive(_4); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 + _4 = const ""; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 0 }) // mir::Constant // + span: $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 0 }) } - _3 = &(*_4); // bb0[5]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 - _2 = const ::to_string(move _3) -> bb2; // bb0[6]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 + _3 = &(*_4); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 + _2 = const ::to_string(move _3) -> bb2; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 // ty::Const // + ty: for<'r> fn(&'r str) -> std::string::String {::to_string} // + val: Value(Scalar()) @@ -30,12 +30,12 @@ fn main() -> () { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/no-spurious-drop-after-call.rs:8:1: 10:2 + resume; // scope 0 at $DIR/no-spurious-drop-after-call.rs:8:1: 10:2 } bb2: { - StorageDead(_3); // bb2[0]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:33: 9:34 - _1 = const std::mem::drop::(move _2) -> [return: bb3, unwind: bb4]; // bb2[1]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 + StorageDead(_3); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:33: 9:34 + _1 = const std::mem::drop::(move _2) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 // ty::Const // + ty: fn(std::string::String) {std::mem::drop::} // + val: Value(Scalar()) @@ -45,20 +45,20 @@ fn main() -> () { } bb3: { - StorageDead(_2); // bb3[0]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:34: 9:35 - StorageDead(_4); // bb3[1]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:35: 9:36 - StorageDead(_1); // bb3[2]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:35: 9:36 - _0 = const (); // bb3[3]: scope 0 at $DIR/no-spurious-drop-after-call.rs:8:11: 10:2 + StorageDead(_2); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:34: 9:35 + StorageDead(_4); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:35: 9:36 + StorageDead(_1); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:35: 9:36 + _0 = const (); // scope 0 at $DIR/no-spurious-drop-after-call.rs:8:11: 10:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/no-spurious-drop-after-call.rs:8:11: 10:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb3[4]: scope 0 at $DIR/no-spurious-drop-after-call.rs:10:2: 10:2 + return; // scope 0 at $DIR/no-spurious-drop-after-call.rs:10:2: 10:2 } bb4 (cleanup): { - drop(_2) -> bb1; // bb4[0]: scope 0 at $DIR/no-spurious-drop-after-call.rs:9:34: 9:35 + drop(_2) -> bb1; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:34: 9:35 } } diff --git a/src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir index cf423d06efb5f..21dab9ab92394 100644 --- a/src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir @@ -13,61 +13,61 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:9: 6:14 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 - _3 = Droppy(const 0usize); // bb0[3]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 + StorageLive(_1); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:9: 6:14 + StorageLive(_2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 + StorageLive(_3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 + _3 = Droppy(const 0usize); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/packed-struct-drop-aligned.rs:6:39: 6:40 // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } - _2 = Aligned(move _3); // bb0[4]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 - StorageDead(_3); // bb0[5]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:41: 6:42 - _1 = Packed(move _2); // bb0[6]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:17: 6:43 - StorageDead(_2); // bb0[7]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:42: 6:43 - StorageLive(_4); // bb0[8]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 - StorageLive(_5); // bb0[9]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 - _5 = Droppy(const 0usize); // bb0[10]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 + _2 = Aligned(move _3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 + StorageDead(_3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:41: 6:42 + _1 = Packed(move _2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:17: 6:43 + StorageDead(_2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:42: 6:43 + StorageLive(_4); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 + StorageLive(_5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 + _5 = Droppy(const 0usize); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/packed-struct-drop-aligned.rs:7:26: 7:27 // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } - _4 = Aligned(move _5); // bb0[11]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 - StorageDead(_5); // bb0[12]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 - StorageLive(_6); // bb0[13]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - _6 = move (_1.0: Aligned); // bb0[14]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - drop(_6) -> [return: bb4, unwind: bb3]; // bb0[15]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + _4 = Aligned(move _5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 + StorageDead(_5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 + StorageLive(_6); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + _6 = move (_1.0: Aligned); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + drop(_6) -> [return: bb4, unwind: bb3]; // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/packed-struct-drop-aligned.rs:5:1: 8:2 + resume; // scope 0 at $DIR/packed-struct-drop-aligned.rs:5:1: 8:2 } bb2: { - StorageDead(_1); // bb2[0]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 - return; // bb2[1]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:2: 8:2 + StorageDead(_1); // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 + return; // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:2: 8:2 } bb3 (cleanup): { - (_1.0: Aligned) = move _4; // bb3[0]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - drop(_1) -> bb1; // bb3[1]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 + (_1.0: Aligned) = move _4; // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + drop(_1) -> bb1; // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 } bb4: { - StorageDead(_6); // bb4[0]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - (_1.0: Aligned) = move _4; // bb4[1]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - StorageDead(_4); // bb4[2]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 - _0 = const (); // bb4[3]: scope 0 at $DIR/packed-struct-drop-aligned.rs:5:11: 8:2 + StorageDead(_6); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + (_1.0: Aligned) = move _4; // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + StorageDead(_4); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 + _0 = const (); // scope 0 at $DIR/packed-struct-drop-aligned.rs:5:11: 8:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/packed-struct-drop-aligned.rs:5:11: 8:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_1) -> [return: bb2, unwind: bb1]; // bb4[4]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 + drop(_1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 } } diff --git a/src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir index 09b398e960420..cf46f74c16df3 100644 --- a/src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir @@ -13,61 +13,61 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:9: 6:14 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 - _3 = Droppy(const 0usize); // bb0[3]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 + StorageLive(_1); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:9: 6:14 + StorageLive(_2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 + StorageLive(_3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 + _3 = Droppy(const 0usize); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000000)) // mir::Constant // + span: $DIR/packed-struct-drop-aligned.rs:6:39: 6:40 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } - _2 = Aligned(move _3); // bb0[4]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 - StorageDead(_3); // bb0[5]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:41: 6:42 - _1 = Packed(move _2); // bb0[6]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:17: 6:43 - StorageDead(_2); // bb0[7]: scope 0 at $DIR/packed-struct-drop-aligned.rs:6:42: 6:43 - StorageLive(_4); // bb0[8]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 - StorageLive(_5); // bb0[9]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 - _5 = Droppy(const 0usize); // bb0[10]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 + _2 = Aligned(move _3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42 + StorageDead(_3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:41: 6:42 + _1 = Packed(move _2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:17: 6:43 + StorageDead(_2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:42: 6:43 + StorageLive(_4); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 + StorageLive(_5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 + _5 = Droppy(const 0usize); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000000)) // mir::Constant // + span: $DIR/packed-struct-drop-aligned.rs:7:26: 7:27 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } - _4 = Aligned(move _5); // bb0[11]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 - StorageDead(_5); // bb0[12]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 - StorageLive(_6); // bb0[13]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - _6 = move (_1.0: Aligned); // bb0[14]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - drop(_6) -> [return: bb4, unwind: bb3]; // bb0[15]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + _4 = Aligned(move _5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29 + StorageDead(_5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 + StorageLive(_6); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + _6 = move (_1.0: Aligned); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + drop(_6) -> [return: bb4, unwind: bb3]; // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/packed-struct-drop-aligned.rs:5:1: 8:2 + resume; // scope 0 at $DIR/packed-struct-drop-aligned.rs:5:1: 8:2 } bb2: { - StorageDead(_1); // bb2[0]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 - return; // bb2[1]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:2: 8:2 + StorageDead(_1); // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 + return; // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:2: 8:2 } bb3 (cleanup): { - (_1.0: Aligned) = move _4; // bb3[0]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - drop(_1) -> bb1; // bb3[1]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 + (_1.0: Aligned) = move _4; // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + drop(_1) -> bb1; // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 } bb4: { - StorageDead(_6); // bb4[0]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - (_1.0: Aligned) = move _4; // bb4[1]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 - StorageDead(_4); // bb4[2]: scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 - _0 = const (); // bb4[3]: scope 0 at $DIR/packed-struct-drop-aligned.rs:5:11: 8:2 + StorageDead(_6); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + (_1.0: Aligned) = move _4; // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8 + StorageDead(_4); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29 + _0 = const (); // scope 0 at $DIR/packed-struct-drop-aligned.rs:5:11: 8:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/packed-struct-drop-aligned.rs:5:11: 8:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_1) -> [return: bb2, unwind: bb1]; // bb4[4]: scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 + drop(_1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/packed-struct-drop-aligned.rs:8:1: 8:2 } } diff --git a/src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir b/src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir index 1cc2138f19e37..6f4a024d20f93 100644 --- a/src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir +++ b/src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir @@ -6,6 +6,6 @@ fn no_codegen() -> () { } bb0: { - unreachable; // bb0[0]: scope 0 at $DIR/remove-never-const.rs:20:13: 20:33 + unreachable; // scope 0 at $DIR/remove-never-const.rs:20:13: 20:33 } } diff --git a/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff b/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff index c915554a127be..4e626b1384afc 100644 --- a/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff +++ b/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff @@ -13,76 +13,76 @@ let mut _8: bool; // in scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 bb0: { -- FakeRead(ForMatchedPlace, _1); // bb0[0]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -+ nop; // bb0[0]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 - _3 = discriminant(_1); // bb0[1]: scope 0 at $DIR/remove_fake_borrows.rs:8:9: 8:16 - switchInt(move _3) -> [1isize: bb2, otherwise: bb1]; // bb0[2]: scope 0 at $DIR/remove_fake_borrows.rs:8:9: 8:16 +- FakeRead(ForMatchedPlace, _1); // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 + _3 = discriminant(_1); // scope 0 at $DIR/remove_fake_borrows.rs:8:9: 8:16 + switchInt(move _3) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/remove_fake_borrows.rs:8:9: 8:16 } bb1: { - _0 = const 1i32; // bb1[0]: scope 0 at $DIR/remove_fake_borrows.rs:9:14: 9:15 + _0 = const 1i32; // scope 0 at $DIR/remove_fake_borrows.rs:9:14: 9:15 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/remove_fake_borrows.rs:9:14: 9:15 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - goto -> bb7; // bb1[1]: scope 0 at $DIR/remove_fake_borrows.rs:7:5: 10:6 + goto -> bb7; // scope 0 at $DIR/remove_fake_borrows.rs:7:5: 10:6 } bb2: { - switchInt((*(*((_1 as Some).0: &&i32)))) -> [0i32: bb3, otherwise: bb1]; // bb2[0]: scope 0 at $DIR/remove_fake_borrows.rs:8:14: 8:15 + switchInt((*(*((_1 as Some).0: &&i32)))) -> [0i32: bb3, otherwise: bb1]; // scope 0 at $DIR/remove_fake_borrows.rs:8:14: 8:15 } bb3: { - goto -> bb4; // bb3[0]: scope 0 at $DIR/remove_fake_borrows.rs:8:9: 8:16 + goto -> bb4; // scope 0 at $DIR/remove_fake_borrows.rs:8:9: 8:16 } bb4: { -- _4 = &shallow _1; // bb4[0]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -- _5 = &shallow ((_1 as Some).0: &&i32); // bb4[1]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -- _6 = &shallow (*((_1 as Some).0: &&i32)); // bb4[2]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -- _7 = &shallow (*(*((_1 as Some).0: &&i32))); // bb4[3]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -+ nop; // bb4[0]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -+ nop; // bb4[1]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -+ nop; // bb4[2]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 -+ nop; // bb4[3]: scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 - StorageLive(_8); // bb4[4]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 - _8 = _2; // bb4[5]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 - switchInt(move _8) -> [false: bb6, otherwise: bb5]; // bb4[6]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 +- _4 = &shallow _1; // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 +- _5 = &shallow ((_1 as Some).0: &&i32); // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 +- _6 = &shallow (*((_1 as Some).0: &&i32)); // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 +- _7 = &shallow (*(*((_1 as Some).0: &&i32))); // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:7:11: 7:12 + StorageLive(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 + _8 = _2; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 + switchInt(move _8) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 } bb5: { - StorageDead(_8); // bb5[0]: scope 0 at $DIR/remove_fake_borrows.rs:8:26: 8:27 -- FakeRead(ForMatchGuard, _4); // bb5[1]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -- FakeRead(ForMatchGuard, _5); // bb5[2]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -- FakeRead(ForMatchGuard, _6); // bb5[3]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -- FakeRead(ForMatchGuard, _7); // bb5[4]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -+ nop; // bb5[1]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -+ nop; // bb5[2]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -+ nop; // bb5[3]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 -+ nop; // bb5[4]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 - _0 = const 0i32; // bb5[5]: scope 0 at $DIR/remove_fake_borrows.rs:8:25: 8:26 + StorageDead(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:26: 8:27 +- FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 +- FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 +- FakeRead(ForMatchGuard, _6); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 +- FakeRead(ForMatchGuard, _7); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 ++ nop; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 + _0 = const 0i32; // scope 0 at $DIR/remove_fake_borrows.rs:8:25: 8:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/remove_fake_borrows.rs:8:25: 8:26 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - goto -> bb7; // bb5[6]: scope 0 at $DIR/remove_fake_borrows.rs:7:5: 10:6 + goto -> bb7; // scope 0 at $DIR/remove_fake_borrows.rs:7:5: 10:6 } bb6: { - StorageDead(_8); // bb6[0]: scope 0 at $DIR/remove_fake_borrows.rs:8:26: 8:27 - goto -> bb1; // bb6[1]: scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 + StorageDead(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:26: 8:27 + goto -> bb1; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 } bb7: { - return; // bb7[0]: scope 0 at $DIR/remove_fake_borrows.rs:11:2: 11:2 + return; // scope 0 at $DIR/remove_fake_borrows.rs:11:2: 11:2 } bb8 (cleanup): { - resume; // bb8[0]: scope 0 at $DIR/remove_fake_borrows.rs:6:1: 11:2 + resume; // scope 0 at $DIR/remove_fake_borrows.rs:6:1: 11:2 } } diff --git a/src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir index 5aa2510f3449e..01f5fbb7d236c 100644 --- a/src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir @@ -9,14 +9,14 @@ fn main::{{closure}}#0(_1: &[closure@main::{{closure}}#0], _2: &i32) -> &i32 { } bb0: { - Retag([fn entry] _1); // bb0[0]: scope 0 at $DIR/retag.rs:40:31: 43:6 - Retag([fn entry] _2); // bb0[1]: scope 0 at $DIR/retag.rs:40:31: 43:6 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/retag.rs:41:13: 41:15 - _3 = _2; // bb0[3]: scope 0 at $DIR/retag.rs:41:18: 41:19 - Retag(_3); // bb0[4]: scope 0 at $DIR/retag.rs:41:18: 41:19 - _0 = _2; // bb0[5]: scope 1 at $DIR/retag.rs:42:9: 42:10 - Retag(_0); // bb0[6]: scope 1 at $DIR/retag.rs:42:9: 42:10 - StorageDead(_3); // bb0[7]: scope 0 at $DIR/retag.rs:43:5: 43:6 - return; // bb0[8]: scope 0 at $DIR/retag.rs:43:6: 43:6 + Retag([fn entry] _1); // scope 0 at $DIR/retag.rs:40:31: 43:6 + Retag([fn entry] _2); // scope 0 at $DIR/retag.rs:40:31: 43:6 + StorageLive(_3); // scope 0 at $DIR/retag.rs:41:13: 41:15 + _3 = _2; // scope 0 at $DIR/retag.rs:41:18: 41:19 + Retag(_3); // scope 0 at $DIR/retag.rs:41:18: 41:19 + _0 = _2; // scope 1 at $DIR/retag.rs:42:9: 42:10 + Retag(_0); // scope 1 at $DIR/retag.rs:42:9: 42:10 + StorageDead(_3); // scope 0 at $DIR/retag.rs:43:5: 43:6 + return; // scope 0 at $DIR/retag.rs:43:6: 43:6 } } diff --git a/src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir index 125f69b0bc288..7484d209d1b6f 100644 --- a/src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir @@ -55,34 +55,34 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/retag.rs:30:9: 30:14 - _1 = const 0i32; // bb0[1]: scope 0 at $DIR/retag.rs:30:17: 30:18 + StorageLive(_1); // scope 0 at $DIR/retag.rs:30:9: 30:14 + _1 = const 0i32; // scope 0 at $DIR/retag.rs:30:17: 30:18 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/retag.rs:30:17: 30:18 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/retag.rs:31:5: 37:6 - StorageLive(_3); // bb0[3]: scope 1 at $DIR/retag.rs:32:13: 32:14 - StorageLive(_4); // bb0[4]: scope 1 at $DIR/retag.rs:32:17: 32:24 - StorageLive(_5); // bb0[5]: scope 1 at $DIR/retag.rs:32:17: 32:24 - _5 = Test(const 0i32); // bb0[6]: scope 1 at $DIR/retag.rs:32:17: 32:24 + StorageLive(_2); // scope 1 at $DIR/retag.rs:31:5: 37:6 + StorageLive(_3); // scope 1 at $DIR/retag.rs:32:13: 32:14 + StorageLive(_4); // scope 1 at $DIR/retag.rs:32:17: 32:24 + StorageLive(_5); // scope 1 at $DIR/retag.rs:32:17: 32:24 + _5 = Test(const 0i32); // scope 1 at $DIR/retag.rs:32:17: 32:24 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/retag.rs:32:22: 32:23 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - _4 = &_5; // bb0[7]: scope 1 at $DIR/retag.rs:32:17: 32:24 - Retag(_4); // bb0[8]: scope 1 at $DIR/retag.rs:32:17: 32:24 - StorageLive(_6); // bb0[9]: scope 1 at $DIR/retag.rs:32:29: 32:35 - StorageLive(_7); // bb0[10]: scope 1 at $DIR/retag.rs:32:29: 32:35 - _7 = &mut _1; // bb0[11]: scope 1 at $DIR/retag.rs:32:29: 32:35 - Retag(_7); // bb0[12]: scope 1 at $DIR/retag.rs:32:29: 32:35 - _6 = &mut (*_7); // bb0[13]: scope 1 at $DIR/retag.rs:32:29: 32:35 - Retag([2phase] _6); // bb0[14]: scope 1 at $DIR/retag.rs:32:29: 32:35 - _3 = const Test::foo(move _4, move _6) -> [return: bb2, unwind: bb3]; // bb0[15]: scope 1 at $DIR/retag.rs:32:17: 32:36 + _4 = &_5; // scope 1 at $DIR/retag.rs:32:17: 32:24 + Retag(_4); // scope 1 at $DIR/retag.rs:32:17: 32:24 + StorageLive(_6); // scope 1 at $DIR/retag.rs:32:29: 32:35 + StorageLive(_7); // scope 1 at $DIR/retag.rs:32:29: 32:35 + _7 = &mut _1; // scope 1 at $DIR/retag.rs:32:29: 32:35 + Retag(_7); // scope 1 at $DIR/retag.rs:32:29: 32:35 + _6 = &mut (*_7); // scope 1 at $DIR/retag.rs:32:29: 32:35 + Retag([2phase] _6); // scope 1 at $DIR/retag.rs:32:29: 32:35 + _3 = const Test::foo(move _4, move _6) -> [return: bb2, unwind: bb3]; // scope 1 at $DIR/retag.rs:32:17: 32:36 // ty::Const // + ty: for<'r, 'x> fn(&'r Test, &'x mut i32) -> &'x mut i32 {Test::foo} // + val: Value(Scalar()) @@ -92,54 +92,54 @@ fn main() -> () { } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/retag.rs:29:1: 51:2 + resume; // scope 0 at $DIR/retag.rs:29:1: 51:2 } bb2: { - Retag(_3); // bb2[0]: scope 1 at $DIR/retag.rs:32:17: 32:36 - StorageDead(_6); // bb2[1]: scope 1 at $DIR/retag.rs:32:35: 32:36 - StorageDead(_4); // bb2[2]: scope 1 at $DIR/retag.rs:32:35: 32:36 - StorageDead(_7); // bb2[3]: scope 1 at $DIR/retag.rs:32:36: 32:37 - drop(_5) -> [return: bb4, unwind: bb1]; // bb2[4]: scope 1 at $DIR/retag.rs:32:36: 32:37 + Retag(_3); // scope 1 at $DIR/retag.rs:32:17: 32:36 + StorageDead(_6); // scope 1 at $DIR/retag.rs:32:35: 32:36 + StorageDead(_4); // scope 1 at $DIR/retag.rs:32:35: 32:36 + StorageDead(_7); // scope 1 at $DIR/retag.rs:32:36: 32:37 + drop(_5) -> [return: bb4, unwind: bb1]; // scope 1 at $DIR/retag.rs:32:36: 32:37 } bb3 (cleanup): { - drop(_5) -> bb1; // bb3[0]: scope 1 at $DIR/retag.rs:32:36: 32:37 + drop(_5) -> bb1; // scope 1 at $DIR/retag.rs:32:36: 32:37 } bb4: { - StorageDead(_5); // bb4[0]: scope 1 at $DIR/retag.rs:32:36: 32:37 - StorageLive(_8); // bb4[1]: scope 2 at $DIR/retag.rs:33:13: 33:14 - StorageLive(_9); // bb4[2]: scope 2 at $DIR/retag.rs:33:19: 33:20 - _9 = move _3; // bb4[3]: scope 2 at $DIR/retag.rs:33:19: 33:20 - Retag(_9); // bb4[4]: scope 2 at $DIR/retag.rs:33:19: 33:20 - _8 = &mut (*_9); // bb4[5]: scope 2 at $DIR/retag.rs:33:19: 33:20 - Retag(_8); // bb4[6]: scope 2 at $DIR/retag.rs:33:19: 33:20 - StorageDead(_9); // bb4[7]: scope 2 at $DIR/retag.rs:33:22: 33:23 - StorageLive(_10); // bb4[8]: scope 3 at $DIR/retag.rs:34:13: 34:14 - _10 = move _8; // bb4[9]: scope 3 at $DIR/retag.rs:34:17: 34:18 - Retag(_10); // bb4[10]: scope 3 at $DIR/retag.rs:34:17: 34:18 - StorageLive(_11); // bb4[11]: scope 4 at $DIR/retag.rs:36:13: 36:15 - StorageLive(_12); // bb4[12]: scope 4 at $DIR/retag.rs:36:18: 36:29 - _12 = &raw mut (*_10); // bb4[13]: scope 4 at $DIR/retag.rs:36:18: 36:19 - Retag([raw] _12); // bb4[14]: scope 4 at $DIR/retag.rs:36:18: 36:19 - _11 = _12; // bb4[15]: scope 4 at $DIR/retag.rs:36:18: 36:29 - StorageDead(_12); // bb4[16]: scope 4 at $DIR/retag.rs:36:29: 36:30 - _2 = const (); // bb4[17]: scope 1 at $DIR/retag.rs:31:5: 37:6 + StorageDead(_5); // scope 1 at $DIR/retag.rs:32:36: 32:37 + StorageLive(_8); // scope 2 at $DIR/retag.rs:33:13: 33:14 + StorageLive(_9); // scope 2 at $DIR/retag.rs:33:19: 33:20 + _9 = move _3; // scope 2 at $DIR/retag.rs:33:19: 33:20 + Retag(_9); // scope 2 at $DIR/retag.rs:33:19: 33:20 + _8 = &mut (*_9); // scope 2 at $DIR/retag.rs:33:19: 33:20 + Retag(_8); // scope 2 at $DIR/retag.rs:33:19: 33:20 + StorageDead(_9); // scope 2 at $DIR/retag.rs:33:22: 33:23 + StorageLive(_10); // scope 3 at $DIR/retag.rs:34:13: 34:14 + _10 = move _8; // scope 3 at $DIR/retag.rs:34:17: 34:18 + Retag(_10); // scope 3 at $DIR/retag.rs:34:17: 34:18 + StorageLive(_11); // scope 4 at $DIR/retag.rs:36:13: 36:15 + StorageLive(_12); // scope 4 at $DIR/retag.rs:36:18: 36:29 + _12 = &raw mut (*_10); // scope 4 at $DIR/retag.rs:36:18: 36:19 + Retag([raw] _12); // scope 4 at $DIR/retag.rs:36:18: 36:19 + _11 = _12; // scope 4 at $DIR/retag.rs:36:18: 36:29 + StorageDead(_12); // scope 4 at $DIR/retag.rs:36:29: 36:30 + _2 = const (); // scope 1 at $DIR/retag.rs:31:5: 37:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/retag.rs:31:5: 37:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_11); // bb4[18]: scope 4 at $DIR/retag.rs:37:5: 37:6 - StorageDead(_10); // bb4[19]: scope 3 at $DIR/retag.rs:37:5: 37:6 - StorageDead(_8); // bb4[20]: scope 2 at $DIR/retag.rs:37:5: 37:6 - StorageDead(_3); // bb4[21]: scope 1 at $DIR/retag.rs:37:5: 37:6 - StorageDead(_2); // bb4[22]: scope 1 at $DIR/retag.rs:37:5: 37:6 - StorageLive(_13); // bb4[23]: scope 1 at $DIR/retag.rs:40:9: 40:10 - StorageLive(_14); // bb4[24]: scope 1 at $DIR/retag.rs:40:31: 43:6 - _14 = [closure@main::{{closure}}#0]; // bb4[25]: scope 1 at $DIR/retag.rs:40:31: 43:6 + StorageDead(_11); // scope 4 at $DIR/retag.rs:37:5: 37:6 + StorageDead(_10); // scope 3 at $DIR/retag.rs:37:5: 37:6 + StorageDead(_8); // scope 2 at $DIR/retag.rs:37:5: 37:6 + StorageDead(_3); // scope 1 at $DIR/retag.rs:37:5: 37:6 + StorageDead(_2); // scope 1 at $DIR/retag.rs:37:5: 37:6 + StorageLive(_13); // scope 1 at $DIR/retag.rs:40:9: 40:10 + StorageLive(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6 + _14 = [closure@main::{{closure}}#0]; // scope 1 at $DIR/retag.rs:40:31: 43:6 // closure // + def_id: DefId(0:14 ~ retag[317d]::main[0]::{{closure}}[0]) // + substs: [ @@ -147,53 +147,53 @@ fn main() -> () { // for<'r> extern "rust-call" fn((&'r i32,)) -> &'r i32, // (), // ] - Retag(_14); // bb4[26]: scope 1 at $DIR/retag.rs:40:31: 43:6 - _13 = move _14 as for<'r> fn(&'r i32) -> &'r i32 (Pointer(ClosureFnPointer(Normal))); // bb4[27]: scope 1 at $DIR/retag.rs:40:31: 43:6 - StorageDead(_14); // bb4[28]: scope 1 at $DIR/retag.rs:43:5: 43:6 - StorageLive(_15); // bb4[29]: scope 6 at $DIR/retag.rs:44:9: 44:11 - StorageLive(_16); // bb4[30]: scope 6 at $DIR/retag.rs:44:14: 44:15 - _16 = _13; // bb4[31]: scope 6 at $DIR/retag.rs:44:14: 44:15 - StorageLive(_17); // bb4[32]: scope 6 at $DIR/retag.rs:44:16: 44:18 - StorageLive(_18); // bb4[33]: scope 6 at $DIR/retag.rs:44:16: 44:18 - _18 = &_1; // bb4[34]: scope 6 at $DIR/retag.rs:44:16: 44:18 - Retag(_18); // bb4[35]: scope 6 at $DIR/retag.rs:44:16: 44:18 - _17 = &(*_18); // bb4[36]: scope 6 at $DIR/retag.rs:44:16: 44:18 - Retag(_17); // bb4[37]: scope 6 at $DIR/retag.rs:44:16: 44:18 - _15 = move _16(move _17) -> bb5; // bb4[38]: scope 6 at $DIR/retag.rs:44:14: 44:19 + Retag(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6 + _13 = move _14 as for<'r> fn(&'r i32) -> &'r i32 (Pointer(ClosureFnPointer(Normal))); // scope 1 at $DIR/retag.rs:40:31: 43:6 + StorageDead(_14); // scope 1 at $DIR/retag.rs:43:5: 43:6 + StorageLive(_15); // scope 6 at $DIR/retag.rs:44:9: 44:11 + StorageLive(_16); // scope 6 at $DIR/retag.rs:44:14: 44:15 + _16 = _13; // scope 6 at $DIR/retag.rs:44:14: 44:15 + StorageLive(_17); // scope 6 at $DIR/retag.rs:44:16: 44:18 + StorageLive(_18); // scope 6 at $DIR/retag.rs:44:16: 44:18 + _18 = &_1; // scope 6 at $DIR/retag.rs:44:16: 44:18 + Retag(_18); // scope 6 at $DIR/retag.rs:44:16: 44:18 + _17 = &(*_18); // scope 6 at $DIR/retag.rs:44:16: 44:18 + Retag(_17); // scope 6 at $DIR/retag.rs:44:16: 44:18 + _15 = move _16(move _17) -> bb5; // scope 6 at $DIR/retag.rs:44:14: 44:19 } bb5: { - Retag(_15); // bb5[0]: scope 6 at $DIR/retag.rs:44:14: 44:19 - StorageDead(_17); // bb5[1]: scope 6 at $DIR/retag.rs:44:18: 44:19 - StorageDead(_16); // bb5[2]: scope 6 at $DIR/retag.rs:44:18: 44:19 - StorageDead(_18); // bb5[3]: scope 6 at $DIR/retag.rs:44:19: 44:20 - StorageLive(_19); // bb5[4]: scope 7 at $DIR/retag.rs:47:5: 47:24 - StorageLive(_20); // bb5[5]: scope 7 at $DIR/retag.rs:47:5: 47:12 - StorageLive(_21); // bb5[6]: scope 7 at $DIR/retag.rs:47:5: 47:12 - _21 = Test(const 0i32); // bb5[7]: scope 7 at $DIR/retag.rs:47:5: 47:12 + Retag(_15); // scope 6 at $DIR/retag.rs:44:14: 44:19 + StorageDead(_17); // scope 6 at $DIR/retag.rs:44:18: 44:19 + StorageDead(_16); // scope 6 at $DIR/retag.rs:44:18: 44:19 + StorageDead(_18); // scope 6 at $DIR/retag.rs:44:19: 44:20 + StorageLive(_19); // scope 7 at $DIR/retag.rs:47:5: 47:24 + StorageLive(_20); // scope 7 at $DIR/retag.rs:47:5: 47:12 + StorageLive(_21); // scope 7 at $DIR/retag.rs:47:5: 47:12 + _21 = Test(const 0i32); // scope 7 at $DIR/retag.rs:47:5: 47:12 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/retag.rs:47:10: 47:11 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - _20 = &_21; // bb5[8]: scope 7 at $DIR/retag.rs:47:5: 47:12 - Retag(_20); // bb5[9]: scope 7 at $DIR/retag.rs:47:5: 47:12 - StorageLive(_22); // bb5[10]: scope 7 at $DIR/retag.rs:47:21: 47:23 - StorageLive(_23); // bb5[11]: scope 7 at $DIR/retag.rs:47:21: 47:23 - _27 = const main::promoted[0]; // bb5[12]: scope 7 at $DIR/retag.rs:47:21: 47:23 + _20 = &_21; // scope 7 at $DIR/retag.rs:47:5: 47:12 + Retag(_20); // scope 7 at $DIR/retag.rs:47:5: 47:12 + StorageLive(_22); // scope 7 at $DIR/retag.rs:47:21: 47:23 + StorageLive(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23 + _27 = const main::promoted[0]; // scope 7 at $DIR/retag.rs:47:21: 47:23 // ty::Const // + ty: &i32 // + val: Unevaluated(DefId(0:13 ~ retag[317d]::main[0]), [], Some(promoted[0])) // mir::Constant // + span: $DIR/retag.rs:47:21: 47:23 // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:13 ~ retag[317d]::main[0]), [], Some(promoted[0])) } - Retag(_27); // bb5[13]: scope 7 at $DIR/retag.rs:47:21: 47:23 - _23 = &(*_27); // bb5[14]: scope 7 at $DIR/retag.rs:47:21: 47:23 - Retag(_23); // bb5[15]: scope 7 at $DIR/retag.rs:47:21: 47:23 - _22 = &(*_23); // bb5[16]: scope 7 at $DIR/retag.rs:47:21: 47:23 - Retag(_22); // bb5[17]: scope 7 at $DIR/retag.rs:47:21: 47:23 - _19 = const Test::foo_shr(move _20, move _22) -> [return: bb6, unwind: bb7]; // bb5[18]: scope 7 at $DIR/retag.rs:47:5: 47:24 + Retag(_27); // scope 7 at $DIR/retag.rs:47:21: 47:23 + _23 = &(*_27); // scope 7 at $DIR/retag.rs:47:21: 47:23 + Retag(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23 + _22 = &(*_23); // scope 7 at $DIR/retag.rs:47:21: 47:23 + Retag(_22); // scope 7 at $DIR/retag.rs:47:21: 47:23 + _19 = const Test::foo_shr(move _20, move _22) -> [return: bb6, unwind: bb7]; // scope 7 at $DIR/retag.rs:47:5: 47:24 // ty::Const // + ty: for<'r, 'x> fn(&'r Test, &'x i32) -> &'x i32 {Test::foo_shr} // + val: Value(Scalar()) @@ -203,37 +203,37 @@ fn main() -> () { } bb6: { - Retag(_19); // bb6[0]: scope 7 at $DIR/retag.rs:47:5: 47:24 - StorageDead(_22); // bb6[1]: scope 7 at $DIR/retag.rs:47:23: 47:24 - StorageDead(_20); // bb6[2]: scope 7 at $DIR/retag.rs:47:23: 47:24 - StorageDead(_23); // bb6[3]: scope 7 at $DIR/retag.rs:47:24: 47:25 - drop(_21) -> [return: bb8, unwind: bb1]; // bb6[4]: scope 7 at $DIR/retag.rs:47:24: 47:25 + Retag(_19); // scope 7 at $DIR/retag.rs:47:5: 47:24 + StorageDead(_22); // scope 7 at $DIR/retag.rs:47:23: 47:24 + StorageDead(_20); // scope 7 at $DIR/retag.rs:47:23: 47:24 + StorageDead(_23); // scope 7 at $DIR/retag.rs:47:24: 47:25 + drop(_21) -> [return: bb8, unwind: bb1]; // scope 7 at $DIR/retag.rs:47:24: 47:25 } bb7 (cleanup): { - drop(_21) -> bb1; // bb7[0]: scope 7 at $DIR/retag.rs:47:24: 47:25 + drop(_21) -> bb1; // scope 7 at $DIR/retag.rs:47:24: 47:25 } bb8: { - StorageDead(_21); // bb8[0]: scope 7 at $DIR/retag.rs:47:24: 47:25 - StorageDead(_19); // bb8[1]: scope 7 at $DIR/retag.rs:47:24: 47:25 - StorageLive(_25); // bb8[2]: scope 7 at $DIR/retag.rs:50:9: 50:11 - StorageLive(_26); // bb8[3]: scope 7 at $DIR/retag.rs:50:14: 50:28 - _26 = &raw const (*_15); // bb8[4]: scope 7 at $DIR/retag.rs:50:14: 50:16 - Retag([raw] _26); // bb8[5]: scope 7 at $DIR/retag.rs:50:14: 50:16 - _25 = _26; // bb8[6]: scope 7 at $DIR/retag.rs:50:14: 50:28 - StorageDead(_26); // bb8[7]: scope 7 at $DIR/retag.rs:50:28: 50:29 - _0 = const (); // bb8[8]: scope 0 at $DIR/retag.rs:29:11: 51:2 + StorageDead(_21); // scope 7 at $DIR/retag.rs:47:24: 47:25 + StorageDead(_19); // scope 7 at $DIR/retag.rs:47:24: 47:25 + StorageLive(_25); // scope 7 at $DIR/retag.rs:50:9: 50:11 + StorageLive(_26); // scope 7 at $DIR/retag.rs:50:14: 50:28 + _26 = &raw const (*_15); // scope 7 at $DIR/retag.rs:50:14: 50:16 + Retag([raw] _26); // scope 7 at $DIR/retag.rs:50:14: 50:16 + _25 = _26; // scope 7 at $DIR/retag.rs:50:14: 50:28 + StorageDead(_26); // scope 7 at $DIR/retag.rs:50:28: 50:29 + _0 = const (); // scope 0 at $DIR/retag.rs:29:11: 51:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/retag.rs:29:11: 51:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_25); // bb8[9]: scope 7 at $DIR/retag.rs:51:1: 51:2 - StorageDead(_15); // bb8[10]: scope 6 at $DIR/retag.rs:51:1: 51:2 - StorageDead(_13); // bb8[11]: scope 1 at $DIR/retag.rs:51:1: 51:2 - StorageDead(_1); // bb8[12]: scope 0 at $DIR/retag.rs:51:1: 51:2 - return; // bb8[13]: scope 0 at $DIR/retag.rs:51:2: 51:2 + StorageDead(_25); // scope 7 at $DIR/retag.rs:51:1: 51:2 + StorageDead(_15); // scope 6 at $DIR/retag.rs:51:1: 51:2 + StorageDead(_13); // scope 1 at $DIR/retag.rs:51:1: 51:2 + StorageDead(_1); // scope 0 at $DIR/retag.rs:51:1: 51:2 + return; // scope 0 at $DIR/retag.rs:51:2: 51:2 } } diff --git a/src/test/mir-opt/retag/rustc.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir b/src/test/mir-opt/retag/rustc.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir index 306d30587d61b..995c8c141c66f 100644 --- a/src/test/mir-opt/retag/rustc.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir +++ b/src/test/mir-opt/retag/rustc.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir @@ -6,9 +6,9 @@ fn std::intrinsics::drop_in_place(_1: *mut Test) -> () { let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL bb0: { - Retag([raw] _1); // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _2 = &mut (*_1); // bb0[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _3 = const ::drop(move _2) -> bb1; // bb0[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + Retag([raw] _1); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _2 = &mut (*_1); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _3 = const ::drop(move _2) -> bb1; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: for<'r> fn(&'r mut Test) {::drop} // + val: Value(Scalar()) @@ -18,6 +18,6 @@ fn std::intrinsics::drop_in_place(_1: *mut Test) -> () { } bb1: { - return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + return; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } } diff --git a/src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir index 265a4bdd82243..f9ed3932d3335 100644 --- a/src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir @@ -7,14 +7,14 @@ fn ::foo(_1: &Test, _2: &mut i32) -> &mut i32 let mut _3: &mut i32; // in scope 0 at $DIR/retag.rs:14:9: 14:10 bb0: { - Retag([fn entry] _1); // bb0[0]: scope 0 at $DIR/retag.rs:13:5: 15:6 - Retag([fn entry] _2); // bb0[1]: scope 0 at $DIR/retag.rs:13:5: 15:6 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/retag.rs:14:9: 14:10 - _3 = &mut (*_2); // bb0[3]: scope 0 at $DIR/retag.rs:14:9: 14:10 - Retag(_3); // bb0[4]: scope 0 at $DIR/retag.rs:14:9: 14:10 - _0 = &mut (*_3); // bb0[5]: scope 0 at $DIR/retag.rs:14:9: 14:10 - Retag(_0); // bb0[6]: scope 0 at $DIR/retag.rs:14:9: 14:10 - StorageDead(_3); // bb0[7]: scope 0 at $DIR/retag.rs:15:5: 15:6 - return; // bb0[8]: scope 0 at $DIR/retag.rs:15:6: 15:6 + Retag([fn entry] _1); // scope 0 at $DIR/retag.rs:13:5: 15:6 + Retag([fn entry] _2); // scope 0 at $DIR/retag.rs:13:5: 15:6 + StorageLive(_3); // scope 0 at $DIR/retag.rs:14:9: 14:10 + _3 = &mut (*_2); // scope 0 at $DIR/retag.rs:14:9: 14:10 + Retag(_3); // scope 0 at $DIR/retag.rs:14:9: 14:10 + _0 = &mut (*_3); // scope 0 at $DIR/retag.rs:14:9: 14:10 + Retag(_0); // scope 0 at $DIR/retag.rs:14:9: 14:10 + StorageDead(_3); // scope 0 at $DIR/retag.rs:15:5: 15:6 + return; // scope 0 at $DIR/retag.rs:15:6: 15:6 } } diff --git a/src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir index edf1058e4574e..87a8603a931da 100644 --- a/src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir @@ -6,10 +6,10 @@ fn ::foo_shr(_1: &Test, _2: &i32) -> &i32 { let mut _0: &i32; // return place in scope 0 at $DIR/retag.rs:16:42: 16:49 bb0: { - Retag([fn entry] _1); // bb0[0]: scope 0 at $DIR/retag.rs:16:5: 18:6 - Retag([fn entry] _2); // bb0[1]: scope 0 at $DIR/retag.rs:16:5: 18:6 - _0 = _2; // bb0[2]: scope 0 at $DIR/retag.rs:17:9: 17:10 - Retag(_0); // bb0[3]: scope 0 at $DIR/retag.rs:17:9: 17:10 - return; // bb0[4]: scope 0 at $DIR/retag.rs:18:6: 18:6 + Retag([fn entry] _1); // scope 0 at $DIR/retag.rs:16:5: 18:6 + Retag([fn entry] _2); // scope 0 at $DIR/retag.rs:16:5: 18:6 + _0 = _2; // scope 0 at $DIR/retag.rs:17:9: 17:10 + Retag(_0); // scope 0 at $DIR/retag.rs:17:9: 17:10 + return; // scope 0 at $DIR/retag.rs:18:6: 18:6 } } diff --git a/src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir b/src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir index b720255893a20..3a7d6a7ca3c61 100644 --- a/src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir +++ b/src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir @@ -5,45 +5,45 @@ fn match_bool(_1: bool) -> usize { let mut _0: usize; // return place in scope 0 at $DIR/simple-match.rs:5:27: 5:32 bb0: { - FakeRead(ForMatchedPlace, _1); // bb0[0]: scope 0 at $DIR/simple-match.rs:6:11: 6:12 - switchInt(_1) -> [false: bb3, otherwise: bb2]; // bb0[1]: scope 0 at $DIR/simple-match.rs:7:9: 7:13 + FakeRead(ForMatchedPlace, _1); // scope 0 at $DIR/simple-match.rs:6:11: 6:12 + switchInt(_1) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/simple-match.rs:7:9: 7:13 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/simple-match.rs:5:1: 10:2 + resume; // scope 0 at $DIR/simple-match.rs:5:1: 10:2 } bb2: { - falseEdges -> [real: bb4, imaginary: bb3]; // bb2[0]: scope 0 at $DIR/simple-match.rs:7:9: 7:13 + falseEdges -> [real: bb4, imaginary: bb3]; // scope 0 at $DIR/simple-match.rs:7:9: 7:13 } bb3: { - _0 = const 20usize; // bb3[0]: scope 0 at $DIR/simple-match.rs:8:14: 8:16 + _0 = const 20usize; // scope 0 at $DIR/simple-match.rs:8:14: 8:16 // ty::Const // + ty: usize // + val: Value(Scalar(0x00000014)) // mir::Constant // + span: $DIR/simple-match.rs:8:14: 8:16 // + literal: Const { ty: usize, val: Value(Scalar(0x00000014)) } - goto -> bb5; // bb3[1]: scope 0 at $DIR/simple-match.rs:6:5: 9:6 + goto -> bb5; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } bb4: { - _0 = const 10usize; // bb4[0]: scope 0 at $DIR/simple-match.rs:7:17: 7:19 + _0 = const 10usize; // scope 0 at $DIR/simple-match.rs:7:17: 7:19 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000a)) // mir::Constant // + span: $DIR/simple-match.rs:7:17: 7:19 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000a)) } - goto -> bb5; // bb4[1]: scope 0 at $DIR/simple-match.rs:6:5: 9:6 + goto -> bb5; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } bb5: { - goto -> bb6; // bb5[0]: scope 0 at $DIR/simple-match.rs:10:2: 10:2 + goto -> bb6; // scope 0 at $DIR/simple-match.rs:10:2: 10:2 } bb6: { - return; // bb6[0]: scope 0 at $DIR/simple-match.rs:10:2: 10:2 + return; // scope 0 at $DIR/simple-match.rs:10:2: 10:2 } } diff --git a/src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir b/src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir index f2fe72d0c118c..170181177b26a 100644 --- a/src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir +++ b/src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir @@ -5,45 +5,45 @@ fn match_bool(_1: bool) -> usize { let mut _0: usize; // return place in scope 0 at $DIR/simple-match.rs:5:27: 5:32 bb0: { - FakeRead(ForMatchedPlace, _1); // bb0[0]: scope 0 at $DIR/simple-match.rs:6:11: 6:12 - switchInt(_1) -> [false: bb3, otherwise: bb2]; // bb0[1]: scope 0 at $DIR/simple-match.rs:7:9: 7:13 + FakeRead(ForMatchedPlace, _1); // scope 0 at $DIR/simple-match.rs:6:11: 6:12 + switchInt(_1) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/simple-match.rs:7:9: 7:13 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/simple-match.rs:5:1: 10:2 + resume; // scope 0 at $DIR/simple-match.rs:5:1: 10:2 } bb2: { - falseEdges -> [real: bb4, imaginary: bb3]; // bb2[0]: scope 0 at $DIR/simple-match.rs:7:9: 7:13 + falseEdges -> [real: bb4, imaginary: bb3]; // scope 0 at $DIR/simple-match.rs:7:9: 7:13 } bb3: { - _0 = const 20usize; // bb3[0]: scope 0 at $DIR/simple-match.rs:8:14: 8:16 + _0 = const 20usize; // scope 0 at $DIR/simple-match.rs:8:14: 8:16 // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000014)) // mir::Constant // + span: $DIR/simple-match.rs:8:14: 8:16 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000014)) } - goto -> bb5; // bb3[1]: scope 0 at $DIR/simple-match.rs:6:5: 9:6 + goto -> bb5; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } bb4: { - _0 = const 10usize; // bb4[0]: scope 0 at $DIR/simple-match.rs:7:17: 7:19 + _0 = const 10usize; // scope 0 at $DIR/simple-match.rs:7:17: 7:19 // ty::Const // + ty: usize // + val: Value(Scalar(0x000000000000000a)) // mir::Constant // + span: $DIR/simple-match.rs:7:17: 7:19 // + literal: Const { ty: usize, val: Value(Scalar(0x000000000000000a)) } - goto -> bb5; // bb4[1]: scope 0 at $DIR/simple-match.rs:6:5: 9:6 + goto -> bb5; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } bb5: { - goto -> bb6; // bb5[0]: scope 0 at $DIR/simple-match.rs:10:2: 10:2 + goto -> bb6; // scope 0 at $DIR/simple-match.rs:10:2: 10:2 } bb6: { - return; // bb6[0]: scope 0 at $DIR/simple-match.rs:10:2: 10:2 + return; // scope 0 at $DIR/simple-match.rs:10:2: 10:2 } } diff --git a/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff index 2caa6235d54c0..b2517cb7012b4 100644 --- a/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff @@ -18,54 +18,54 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/simplify-arm-identity.rs:17:9: 17:10 - ((_1 as Foo).0: u8) = const 0u8; // bb0[1]: scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29 + StorageLive(_1); // scope 0 at $DIR/simplify-arm-identity.rs:17:9: 17:10 + ((_1 as Foo).0: u8) = const 0u8; // scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29 // ty::Const // + ty: u8 // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/simplify-arm-identity.rs:17:27: 17:28 // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } - discriminant(_1) = 0; // bb0[2]: scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29 - StorageLive(_2); // bb0[3]: scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 - _3 = discriminant(_1); // bb0[4]: scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20 - switchInt(move _3) -> [0isize: bb3, 1isize: bb1, otherwise: bb2]; // bb0[5]: scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20 + discriminant(_1) = 0; // scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29 + StorageLive(_2); // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 + _3 = discriminant(_1); // scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20 + switchInt(move _3) -> [0isize: bb3, 1isize: bb1, otherwise: bb2]; // scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20 } bb1: { - ((_2 as Foo).0: u8) = const 0u8; // bb1[0]: scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32 + ((_2 as Foo).0: u8) = const 0u8; // scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32 // ty::Const // + ty: u8 // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/simplify-arm-identity.rs:20:30: 20:31 // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } - discriminant(_2) = 0; // bb1[1]: scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32 - goto -> bb4; // bb1[2]: scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 + discriminant(_2) = 0; // scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32 + goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 } bb2: { - unreachable; // bb2[0]: scope 1 at $DIR/simplify-arm-identity.rs:18:24: 18:25 + unreachable; // scope 1 at $DIR/simplify-arm-identity.rs:18:24: 18:25 } bb3: { - _4 = ((_1 as Foo).0: u8); // bb3[0]: scope 1 at $DIR/simplify-arm-identity.rs:19:18: 19:19 - ((_2 as Foo).0: u8) = move _4; // bb3[1]: scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35 - discriminant(_2) = 0; // bb3[2]: scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35 - goto -> bb4; // bb3[3]: scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 + _4 = ((_1 as Foo).0: u8); // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 19:19 + ((_2 as Foo).0: u8) = move _4; // scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35 + discriminant(_2) = 0; // scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35 + goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 } bb4: { - StorageDead(_2); // bb4[0]: scope 1 at $DIR/simplify-arm-identity.rs:21:6: 21:7 - _0 = const (); // bb4[1]: scope 0 at $DIR/simplify-arm-identity.rs:16:11: 22:2 + StorageDead(_2); // scope 1 at $DIR/simplify-arm-identity.rs:21:6: 21:7 + _0 = const (); // scope 0 at $DIR/simplify-arm-identity.rs:16:11: 22:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify-arm-identity.rs:16:11: 22:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb4[2]: scope 0 at $DIR/simplify-arm-identity.rs:22:1: 22:2 - return; // bb4[3]: scope 0 at $DIR/simplify-arm-identity.rs:22:2: 22:2 + StorageDead(_1); // scope 0 at $DIR/simplify-arm-identity.rs:22:1: 22:2 + return; // scope 0 at $DIR/simplify-arm-identity.rs:22:2: 22:2 } } diff --git a/src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff b/src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff index bc59be48eee0f..f7db14e716526 100644 --- a/src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff +++ b/src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff @@ -16,87 +16,87 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49 - discriminant(_2) = 0; // bb0[2]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49 - StorageLive(_3); // bb0[3]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68 - discriminant(_3) = 0; // bb0[4]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68 - (_1.0: std::option::Option) = move _2; // bb0[5]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69 - (_1.1: std::option::Option) = move _3; // bb0[6]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69 - StorageDead(_3); // bb0[7]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69 - StorageDead(_2); // bb0[8]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69 - _5 = discriminant((_1.0: std::option::Option)); // bb0[9]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20 - switchInt(move _5) -> [1isize: bb2, otherwise: bb1]; // bb0[10]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20 + StorageLive(_1); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69 + StorageLive(_2); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49 + discriminant(_2) = 0; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:31: 4:49 + StorageLive(_3); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68 + discriminant(_3) = 0; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:51: 4:68 + (_1.0: std::option::Option) = move _2; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69 + (_1.1: std::option::Option) = move _3; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:30: 4:69 + StorageDead(_3); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69 + StorageDead(_2); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69 + _5 = discriminant((_1.0: std::option::Option)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20 + switchInt(move _5) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20 } bb1: { - _0 = const (); // bb1[0]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 + _0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb7; // bb1[1]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 + goto -> bb7; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 } bb2: { - _4 = discriminant((_1.1: std::option::Option)); // bb2[0]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26 - switchInt(move _4) -> [0isize: bb3, otherwise: bb1]; // bb2[1]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26 + _4 = discriminant((_1.1: std::option::Option)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26 + switchInt(move _4) -> [0isize: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26 } bb3: { - StorageLive(_6); // bb3[0]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19 - _6 = (((_1.0: std::option::Option) as Some).0: u8); // bb3[1]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19 - StorageLive(_7); // bb3[2]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20 - StorageLive(_8); // bb3[3]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13 - _8 = _6; // bb3[4]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13 - _7 = Gt(move _8, const 42u8); // bb3[5]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20 + StorageLive(_6); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19 + _6 = (((_1.0: std::option::Option) as Some).0: u8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19 + StorageLive(_7); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20 + StorageLive(_8); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13 + _8 = _6; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13 + _7 = Gt(move _8, const 42u8); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20 // ty::Const // + ty: u8 // + val: Value(Scalar(0x2a)) // mir::Constant // + span: $DIR/simplify-locals-fixedpoint.rs:5:16: 5:20 // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) } - StorageDead(_8); // bb3[6]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:19: 5:20 - switchInt(_7) -> [false: bb4, otherwise: bb5]; // bb3[7]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 + StorageDead(_8); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:19: 5:20 + switchInt(_7) -> [false: bb4, otherwise: bb5]; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 } bb4: { - _0 = const (); // bb4[0]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 + _0 = const (); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb6; // bb4[1]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 + goto -> bb6; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 } bb5: { - _0 = const (); // bb5[0]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10 + _0 = const (); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb6; // bb5[1]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 + goto -> bb6; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10 } bb6: { - StorageDead(_7); // bb6[0]: scope 1 at $DIR/simplify-locals-fixedpoint.rs:8:5: 8:6 - StorageDead(_6); // bb6[1]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:5: 8:6 - goto -> bb7; // bb6[2]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 + StorageDead(_7); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:8:5: 8:6 + StorageDead(_6); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:5: 8:6 + goto -> bb7; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6 } bb7: { - drop(_1) -> bb8; // bb7[0]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2 + drop(_1) -> bb8; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2 } bb8: { - StorageDead(_1); // bb8[0]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2 - return; // bb8[1]: scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:2: 9:2 + StorageDead(_1); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2 + return; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff b/src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff index 855ead7ea0554..0742f655730c5 100644 --- a/src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff +++ b/src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff @@ -20,55 +20,55 @@ } bb0: { -- StorageLive(_1); // bb0[0]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28 -- StorageLive(_2); // bb0[1]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23 -- _2 = const (); // bb0[2]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23 -+ StorageLive(_1); // bb0[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 -+ _1 = const use_zst(const ((), ())) -> bb1; // bb0[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 +- StorageLive(_1); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28 +- StorageLive(_2); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23 +- _2 = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23 ++ StorageLive(_1); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 ++ _1 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23 - // + literal: Const { ty: (), val: Value(Scalar()) } -- StorageLive(_3); // bb0[3]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27 -- _3 = const (); // bb0[4]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27 +- StorageLive(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27 +- _3 = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27 - // + literal: Const { ty: (), val: Value(Scalar()) } -- _1 = const ((), ()); // bb0[5]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28 +- _1 = const ((), ()); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28 - // ty::Const - // + ty: ((), ()) - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28 - // + literal: Const { ty: ((), ()), val: Value(Scalar()) } -- StorageDead(_3); // bb0[6]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28 -- StorageDead(_2); // bb0[7]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28 -- StorageDead(_1); // bb0[8]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29 -- StorageLive(_4); // bb0[9]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 -- StorageLive(_6); // bb0[10]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16 -- _6 = const (); // bb0[11]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16 +- StorageDead(_3); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28 +- StorageDead(_2); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28 +- StorageDead(_1); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29 +- StorageLive(_4); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 +- StorageLive(_6); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16 +- _6 = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16 - // + literal: Const { ty: (), val: Value(Scalar()) } -- StorageLive(_7); // bb0[12]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20 -- _7 = const (); // bb0[13]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20 +- StorageLive(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20 +- _7 = const (); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20 - // + literal: Const { ty: (), val: Value(Scalar()) } -- StorageDead(_7); // bb0[14]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21 -- StorageDead(_6); // bb0[15]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21 -- _4 = const use_zst(const ((), ())) -> bb1; // bb0[16]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 +- StorageDead(_7); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21 +- StorageDead(_6); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21 +- _4 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22 - // ty::Const // + ty: fn(((), ())) {use_zst} // + val: Value(Scalar()) @@ -84,29 +84,29 @@ } bb1: { -- StorageDead(_4); // bb1[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23 -- StorageLive(_8); // bb1[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 -- StorageLive(_10); // bb1[2]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30 -- StorageLive(_11); // bb1[3]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 -- _11 = const Temp { x: 40u8 }; // bb1[4]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 -+ StorageDead(_1); // bb1[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23 -+ StorageLive(_2); // bb1[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 -+ _2 = const use_u8(const 42u8) -> bb2; // bb1[2]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 +- StorageDead(_4); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23 +- StorageLive(_8); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 +- StorageLive(_10); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30 +- StorageLive(_11); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 +- _11 = const Temp { x: 40u8 }; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 ++ StorageDead(_1); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23 ++ StorageLive(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 ++ _2 = const use_u8(const 42u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 // ty::Const - // + ty: Temp - // + val: Value(Scalar(0x28)) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28 - // + literal: Const { ty: Temp, val: Value(Scalar(0x28)) } -- _10 = const 40u8; // bb1[5]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30 +- _10 = const 40u8; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x28)) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30 - // + literal: Const { ty: u8, val: Value(Scalar(0x28)) } -- StorageDead(_10); // bb1[6]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34 -- _8 = const use_u8(const 42u8) -> bb2; // bb1[7]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 +- StorageDead(_10); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34 +- _8 = const use_u8(const 42u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 - // ty::Const // + ty: fn(u8) {use_u8} // + val: Value(Scalar()) @@ -122,19 +122,17 @@ } bb2: { -- StorageDead(_11); // bb2[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 -- StorageDead(_8); // bb2[1]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 -- _0 = const (); // bb2[2]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2 -+ StorageDead(_2); // bb2[0]: scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 -+ _0 = const (); // bb2[1]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2 +- StorageDead(_11); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 +- StorageDead(_8); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 ++ StorageDead(_2); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36 + _0 = const (); // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2 // + literal: Const { ty: (), val: Value(Scalar()) } -- return; // bb2[3]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2 -+ return; // bb2[2]: scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2 + return; // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/rustc.map.SimplifyLocals.diff b/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/rustc.map.SimplifyLocals.diff index bba8bc82fe7d9..0ca54af85e3b6 100644 --- a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/rustc.map.SimplifyLocals.diff +++ b/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/rustc.map.SimplifyLocals.diff @@ -14,24 +14,23 @@ } bb0: { - _2 = discriminant(_1); // bb0[0]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 - switchInt(move _2) -> [0isize: bb2, otherwise: bb1]; // bb0[1]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 + _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 + switchInt(move _2) -> [0isize: bb2, otherwise: bb1]; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 } bb1: { - _0 = move _1; // bb1[0]: scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27 - goto -> bb3; // bb1[1]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:2:5: 5:6 + _0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27 + goto -> bb3; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:2:5: 5:6 } bb2: { - discriminant(_0) = 0; // bb2[0]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21 - goto -> bb3; // bb2[1]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:2:5: 5:6 + discriminant(_0) = 0; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:17: 3:21 + goto -> bb3; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:2:5: 5:6 } bb3: { -- _5 = discriminant(_1); // bb3[0]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2 -- return; // bb3[1]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2 -+ return; // bb3[0]: scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2 +- _5 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2 + return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2 } } diff --git a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff b/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff index ecac835fb87ef..3b472ed3a0376 100644 --- a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff +++ b/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff @@ -8,14 +8,13 @@ let mut _3: !; // in scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10 bb0: { -- goto -> bb1; // bb0[0]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 +- goto -> bb1; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 - } - - bb1: { -- StorageLive(_2); // bb1[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -- _2 = const bar() -> bb3; // bb1[1]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -+ StorageLive(_2); // bb0[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -+ _2 = const bar() -> bb1; // bb0[1]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 + StorageLive(_2); // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 +- _2 = const bar() -> bb3; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 ++ _2 = const bar() -> bb1; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 // ty::Const // + ty: fn() -> bool {bar} // + val: Value(Scalar()) @@ -25,50 +24,44 @@ } - bb2 (cleanup): { -- resume; // bb2[0]: scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 +- resume; // scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 + bb1: { -+ switchInt(_2) -> [false: bb2, otherwise: bb3]; // bb1[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 ++ switchInt(_2) -> [false: bb2, otherwise: bb3]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 } - bb3: { -- nop; // bb3[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -- switchInt(_2) -> [false: bb5, otherwise: bb4]; // bb3[1]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 +- nop; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 +- switchInt(_2) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 - } - - bb4: { -- goto -> bb6; // bb4[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 +- goto -> bb6; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 - } - - bb5: { -- _1 = const (); // bb5[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + bb2: { -+ _1 = const (); // bb2[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + _1 = const (); // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_cfg.rs:7:9: 9:10 // + literal: Const { ty: (), val: Value(Scalar()) } -- StorageDead(_2); // bb5[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -- goto -> bb0; // bb5[2]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 -+ StorageDead(_2); // bb2[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -+ goto -> bb0; // bb2[2]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 + StorageDead(_2); // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 + goto -> bb0; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 } - bb6: { -- _0 = const (); // bb6[0]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 + bb3: { -+ _0 = const (); // bb3[0]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 + _0 = const (); // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_cfg.rs:8:13: 8:18 // + literal: Const { ty: (), val: Value(Scalar()) } -- StorageDead(_2); // bb6[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -- return; // bb6[2]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 -+ StorageDead(_2); // bb3[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -+ return; // bb3[2]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 + StorageDead(_2); // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 + return; // scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 } } diff --git a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff b/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff index 7c8bdde5418c2..0cc2258f46364 100644 --- a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff +++ b/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff @@ -8,23 +8,22 @@ let mut _3: !; // in scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10 bb0: { -- goto -> bb1; // bb0[0]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 -+ falseUnwind -> [real: bb1, cleanup: bb2]; // bb0[0]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 +- goto -> bb1; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 ++ falseUnwind -> [real: bb1, cleanup: bb2]; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 } bb1: { -- falseUnwind -> [real: bb3, cleanup: bb4]; // bb1[0]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 +- falseUnwind -> [real: bb3, cleanup: bb4]; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 - } - - bb2: { -- goto -> bb13; // bb2[0]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 +- goto -> bb13; // scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 - } - - bb3: { -- StorageLive(_2); // bb3[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -- _2 = const bar() -> [return: bb5, unwind: bb4]; // bb3[1]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -+ StorageLive(_2); // bb1[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -+ _2 = const bar() -> [return: bb3, unwind: bb2]; // bb1[1]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 + StorageLive(_2); // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 +- _2 = const bar() -> [return: bb5, unwind: bb4]; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 ++ _2 = const bar() -> [return: bb3, unwind: bb2]; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 // ty::Const // + ty: fn() -> bool {bar} // + val: Value(Scalar()) @@ -34,75 +33,69 @@ } - bb4 (cleanup): { -- resume; // bb4[0]: scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 + bb2 (cleanup): { -+ resume; // bb2[0]: scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 + resume; // scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2 } - bb5: { -- FakeRead(ForMatchedPlace, _2); // bb5[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -- switchInt(_2) -> [false: bb7, otherwise: bb6]; // bb5[1]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + bb3: { -+ FakeRead(ForMatchedPlace, _2); // bb3[0]: scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 -+ switchInt(_2) -> [false: bb5, otherwise: bb4]; // bb3[1]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17 +- switchInt(_2) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 ++ switchInt(_2) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 } - bb6: { -- falseEdges -> [real: bb8, imaginary: bb7]; // bb6[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 +- falseEdges -> [real: bb8, imaginary: bb7]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + bb4: { -+ falseEdges -> [real: bb6, imaginary: bb5]; // bb4[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 ++ falseEdges -> [real: bb6, imaginary: bb5]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 } - bb7: { -- _1 = const (); // bb7[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + bb5: { -+ _1 = const (); // bb5[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 + _1 = const (); // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_cfg.rs:7:9: 9:10 // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb12; // bb7[1]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 -+ StorageDead(_2); // bb5[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -+ goto -> bb0; // bb5[2]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 +- goto -> bb12; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 ++ StorageDead(_2); // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 ++ goto -> bb0; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 } - bb8: { -- _0 = const (); // bb8[0]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 + bb6: { -+ _0 = const (); // bb6[0]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 + _0 = const (); // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_cfg.rs:8:13: 8:18 // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb9; // bb8[1]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 +- goto -> bb9; // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 - } - - bb9: { -- StorageDead(_2); // bb9[0]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -- goto -> bb2; // bb9[1]: scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 + StorageDead(_2); // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 +- goto -> bb2; // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18 - } - - bb10: { -- unreachable; // bb10[0]: scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10 +- unreachable; // scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10 - } - - bb11: { -- goto -> bb12; // bb11[0]: scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 +- goto -> bb12; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10 - } - - bb12: { -- StorageDead(_2); // bb12[0]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -- goto -> bb1; // bb12[1]: scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 +- StorageDead(_2); // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 +- goto -> bb1; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6 - } - - bb13: { -- return; // bb13[0]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 -+ StorageDead(_2); // bb6[1]: scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6 -+ return; // bb6[2]: scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 + return; // scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2 } } diff --git a/src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff index 2946eb1cc44e1..e94e49bf0cb4f 100644 --- a/src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff +++ b/src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff @@ -7,38 +7,38 @@ let _2: (); // in scope 0 at $DIR/simplify_if.rs:7:9: 7:15 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/simplify_if.rs:6:8: 6:13 - _1 = const false; // bb0[1]: scope 0 at $DIR/simplify_if.rs:6:8: 6:13 + StorageLive(_1); // scope 0 at $DIR/simplify_if.rs:6:8: 6:13 + _1 = const false; // scope 0 at $DIR/simplify_if.rs:6:8: 6:13 // ty::Const // + ty: bool // + val: Value(Scalar(0x00)) // mir::Constant // + span: $DIR/simplify_if.rs:6:8: 6:13 // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -- switchInt(const false) -> [false: bb1, otherwise: bb2]; // bb0[2]: scope 0 at $DIR/simplify_if.rs:6:5: 8:6 +- switchInt(const false) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify_if.rs:6:5: 8:6 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ goto -> bb1; // bb0[2]: scope 0 at $DIR/simplify_if.rs:6:5: 8:6 ++ goto -> bb1; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 } bb1: { - _0 = const (); // bb1[0]: scope 0 at $DIR/simplify_if.rs:6:5: 8:6 + _0 = const (); // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_if.rs:6:5: 8:6 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb4; // bb1[1]: scope 0 at $DIR/simplify_if.rs:6:5: 8:6 + goto -> bb4; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 } bb2: { - StorageLive(_2); // bb2[0]: scope 0 at $DIR/simplify_if.rs:7:9: 7:15 - _2 = const noop() -> bb3; // bb2[1]: scope 0 at $DIR/simplify_if.rs:7:9: 7:15 + StorageLive(_2); // scope 0 at $DIR/simplify_if.rs:7:9: 7:15 + _2 = const noop() -> bb3; // scope 0 at $DIR/simplify_if.rs:7:9: 7:15 // ty::Const // + ty: fn() {noop} // + val: Value(Scalar()) @@ -48,20 +48,20 @@ } bb3: { - StorageDead(_2); // bb3[0]: scope 0 at $DIR/simplify_if.rs:7:15: 7:16 - _0 = const (); // bb3[1]: scope 0 at $DIR/simplify_if.rs:6:14: 8:6 + StorageDead(_2); // scope 0 at $DIR/simplify_if.rs:7:15: 7:16 + _0 = const (); // scope 0 at $DIR/simplify_if.rs:6:14: 8:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_if.rs:6:14: 8:6 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb4; // bb3[2]: scope 0 at $DIR/simplify_if.rs:6:5: 8:6 + goto -> bb4; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 } bb4: { - StorageDead(_1); // bb4[0]: scope 0 at $DIR/simplify_if.rs:9:1: 9:2 - return; // bb4[1]: scope 0 at $DIR/simplify_if.rs:9:2: 9:2 + StorageDead(_1); // scope 0 at $DIR/simplify_if.rs:9:1: 9:2 + return; // scope 0 at $DIR/simplify_if.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff b/src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff index 1c83bb13425de..68b1b70c52a80 100644 --- a/src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff +++ b/src/test/mir-opt/simplify_match/rustc.main.SimplifyBranches-after-copy-prop.diff @@ -10,34 +10,34 @@ } bb0: { - nop; // bb0[0]: scope 0 at $DIR/simplify_match.rs:6:11: 6:31 - nop; // bb0[1]: scope 0 at $DIR/simplify_match.rs:6:17: 6:18 - nop; // bb0[2]: scope 0 at $DIR/simplify_match.rs:6:21: 6:26 - nop; // bb0[3]: scope 1 at $DIR/simplify_match.rs:6:28: 6:29 - nop; // bb0[4]: scope 0 at $DIR/simplify_match.rs:6:30: 6:31 -- switchInt(const false) -> [false: bb1, otherwise: bb2]; // bb0[5]: scope 0 at $DIR/simplify_match.rs:7:9: 7:13 + nop; // scope 0 at $DIR/simplify_match.rs:6:11: 6:31 + nop; // scope 0 at $DIR/simplify_match.rs:6:17: 6:18 + nop; // scope 0 at $DIR/simplify_match.rs:6:21: 6:26 + nop; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29 + nop; // scope 0 at $DIR/simplify_match.rs:6:30: 6:31 +- switchInt(const false) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify_match.rs:6:21: 6:26 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ goto -> bb1; // bb0[5]: scope 0 at $DIR/simplify_match.rs:7:9: 7:13 ++ goto -> bb1; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13 } bb1: { - _0 = const (); // bb1[0]: scope 0 at $DIR/simplify_match.rs:8:18: 8:20 + _0 = const (); // scope 0 at $DIR/simplify_match.rs:8:18: 8:20 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/simplify_match.rs:8:18: 8:20 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb3; // bb1[1]: scope 0 at $DIR/simplify_match.rs:6:5: 9:6 + goto -> bb3; // scope 0 at $DIR/simplify_match.rs:6:5: 9:6 } bb2: { - _0 = const noop() -> bb3; // bb2[0]: scope 0 at $DIR/simplify_match.rs:7:17: 7:23 + _0 = const noop() -> bb3; // scope 0 at $DIR/simplify_match.rs:7:17: 7:23 // ty::Const // + ty: fn() {noop} // + val: Value(Scalar()) @@ -47,8 +47,8 @@ } bb3: { - nop; // bb3[0]: scope 0 at $DIR/simplify_match.rs:10:1: 10:2 - return; // bb3[1]: scope 0 at $DIR/simplify_match.rs:10:2: 10:2 + nop; // scope 0 at $DIR/simplify_match.rs:10:1: 10:2 + return; // scope 0 at $DIR/simplify_match.rs:10:2: 10:2 } } diff --git a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff index a4cc6b817eac8..20520f7db368e 100644 --- a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff @@ -39,32 +39,32 @@ } bb0: { - _5 = discriminant(_1); // bb0[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15 - switchInt(move _5) -> [0isize: bb1, otherwise: bb2]; // bb0[1]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15 + _5 = discriminant(_1); // scope 0 at $DIR/simplify_try.rs:6:14: 6:15 + switchInt(move _5) -> [0isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:6:14: 6:15 } bb1: { -- _10 = ((_1 as Ok).0: u32); // bb1[0]: scope 0 at $DIR/simplify_try.rs:6:13: 6:15 -- ((_0 as Ok).0: u32) = move _10; // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 -- discriminant(_0) = 0; // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 -+ _0 = move _1; // bb1[0]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 -+ nop; // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 -+ nop; // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 - goto -> bb3; // bb1[3]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2 +- _10 = ((_1 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:6:13: 6:15 +- ((_0 as Ok).0: u32) = move _10; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 +- discriminant(_0) = 0; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 ++ _0 = move _1; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 ++ nop; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 ++ nop; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 + goto -> bb3; // scope 0 at $DIR/simplify_try.rs:8:2: 8:2 } bb2: { -- _6 = ((_1 as Err).0: i32); // bb2[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15 -- ((_0 as Err).0: i32) = move _6; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL -- discriminant(_0) = 1; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL -+ _0 = move _1; // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL -+ nop; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL -+ nop; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL - goto -> bb3; // bb2[3]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15 +- _6 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify_try.rs:6:14: 6:15 +- ((_0 as Err).0: i32) = move _6; // scope 8 at $SRC_DIR/libcore/result.rs:LL:COL +- discriminant(_0) = 1; // scope 8 at $SRC_DIR/libcore/result.rs:LL:COL ++ _0 = move _1; // scope 8 at $SRC_DIR/libcore/result.rs:LL:COL ++ nop; // scope 8 at $SRC_DIR/libcore/result.rs:LL:COL ++ nop; // scope 8 at $SRC_DIR/libcore/result.rs:LL:COL + goto -> bb3; // scope 0 at $DIR/simplify_try.rs:6:14: 6:15 } bb3: { - return; // bb3[0]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2 + return; // scope 0 at $DIR/simplify_try.rs:8:2: 8:2 } } diff --git a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir b/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir index a18fb641f94b3..e5661a47201d9 100644 --- a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir +++ b/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir @@ -38,18 +38,18 @@ fn try_identity(_1: std::result::Result) -> std::result::Result bb1; // bb0[1]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15 + _5 = discriminant(_1); // scope 0 at $DIR/simplify_try.rs:6:14: 6:15 + goto -> bb1; // scope 0 at $DIR/simplify_try.rs:6:14: 6:15 } bb1: { - _0 = move _1; // bb1[0]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 - nop; // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 - nop; // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10 - goto -> bb2; // bb1[3]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2 + _0 = move _1; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 + nop; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 + nop; // scope 1 at $DIR/simplify_try.rs:7:5: 7:10 + goto -> bb2; // scope 0 at $DIR/simplify_try.rs:8:2: 8:2 } bb2: { - return; // bb2[0]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2 + return; // scope 0 at $DIR/simplify_try.rs:8:2: 8:2 } } diff --git a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir b/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir index b7ed760f6d656..989931ed0eaf7 100644 --- a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir +++ b/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir @@ -29,7 +29,7 @@ fn try_identity(_1: std::result::Result) -> std::result::Result () { let mut _15: *mut [std::string::String]; // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL bb0: { - goto -> bb15; // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb15; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb1: { - return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + return; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb2 (cleanup): { - resume; // bb2[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + resume; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb3 (cleanup): { - _5 = &raw mut (*_1)[_4]; // bb3[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _4 = Add(move _4, const 1usize); // bb3[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _5 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _4 = Add(move _4, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - drop((*_5)) -> bb4; // bb3[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_5)) -> bb4; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb4 (cleanup): { - _6 = Eq(_4, _3); // bb4[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _6) -> [false: bb3, otherwise: bb2]; // bb4[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _6 = Eq(_4, _3); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _6) -> [false: bb3, otherwise: bb2]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb5: { - _7 = &raw mut (*_1)[_4]; // bb5[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _4 = Add(move _4, const 1usize); // bb5[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _7 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _4 = Add(move _4, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - drop((*_7)) -> [return: bb6, unwind: bb4]; // bb5[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_7)) -> [return: bb6, unwind: bb4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb6: { - _8 = Eq(_4, _3); // bb6[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _8) -> [false: bb5, otherwise: bb1]; // bb6[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _8 = Eq(_4, _3); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _8) -> [false: bb5, otherwise: bb1]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb7: { - _4 = const 0usize; // bb7[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _4 = const 0usize; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } - goto -> bb6; // bb7[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb6; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb8: { - goto -> bb7; // bb8[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb7; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb9 (cleanup): { - _11 = _9; // bb9[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _9 = Offset(move _9, const 1usize); // bb9[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _11 = _9; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _9 = Offset(move _9, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - drop((*_11)) -> bb10; // bb9[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_11)) -> bb10; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb10 (cleanup): { - _12 = Eq(_9, _10); // bb10[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _12) -> [false: bb9, otherwise: bb2]; // bb10[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _12 = Eq(_9, _10); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _12) -> [false: bb9, otherwise: bb2]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb11: { - _13 = _9; // bb11[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _9 = Offset(move _9, const 1usize); // bb11[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _13 = _9; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _9 = Offset(move _9, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - drop((*_13)) -> [return: bb12, unwind: bb10]; // bb11[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_13)) -> [return: bb12, unwind: bb10]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb12: { - _14 = Eq(_9, _10); // bb12[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _14) -> [false: bb11, otherwise: bb1]; // bb12[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _14 = Eq(_9, _10); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _14) -> [false: bb11, otherwise: bb1]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb13: { - _15 = &raw mut (*_1); // bb13[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _9 = move _15 as *mut std::string::String (Misc); // bb13[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _10 = Offset(_9, move _3); // bb13[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - goto -> bb12; // bb13[3]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _15 = &raw mut (*_1); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _9 = move _15 as *mut std::string::String (Misc); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _10 = Offset(_9, move _3); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb12; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb14: { - goto -> bb13; // bb14[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb13; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb15: { - _2 = SizeOf(std::string::String); // bb15[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _3 = Len((*_1)); // bb15[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _2) -> [0usize: bb8, otherwise: bb14]; // bb15[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _2 = SizeOf(std::string::String); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _3 = Len((*_1)); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _2) -> [0usize: bb8, otherwise: bb14]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } } diff --git a/src/test/mir-opt/slice-drop-shim/64bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir b/src/test/mir-opt/slice-drop-shim/64bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir index fd2bfe46c5aba..604a0228f63cf 100644 --- a/src/test/mir-opt/slice-drop-shim/64bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir +++ b/src/test/mir-opt/slice-drop-shim/64bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir @@ -18,114 +18,114 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { let mut _15: *mut [std::string::String]; // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL bb0: { - goto -> bb15; // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb15; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb1: { - return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + return; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb2 (cleanup): { - resume; // bb2[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + resume; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb3 (cleanup): { - _5 = &raw mut (*_1)[_4]; // bb3[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _4 = Add(move _4, const 1usize); // bb3[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _5 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _4 = Add(move _4, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - drop((*_5)) -> bb4; // bb3[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_5)) -> bb4; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb4 (cleanup): { - _6 = Eq(_4, _3); // bb4[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _6) -> [false: bb3, otherwise: bb2]; // bb4[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _6 = Eq(_4, _3); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _6) -> [false: bb3, otherwise: bb2]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb5: { - _7 = &raw mut (*_1)[_4]; // bb5[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _4 = Add(move _4, const 1usize); // bb5[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _7 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _4 = Add(move _4, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - drop((*_7)) -> [return: bb6, unwind: bb4]; // bb5[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_7)) -> [return: bb6, unwind: bb4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb6: { - _8 = Eq(_4, _3); // bb6[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _8) -> [false: bb5, otherwise: bb1]; // bb6[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _8 = Eq(_4, _3); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _8) -> [false: bb5, otherwise: bb1]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb7: { - _4 = const 0usize; // bb7[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _4 = const 0usize; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000000)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } - goto -> bb6; // bb7[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb6; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb8: { - goto -> bb7; // bb8[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb7; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb9 (cleanup): { - _11 = _9; // bb9[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _9 = Offset(move _9, const 1usize); // bb9[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _11 = _9; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _9 = Offset(move _9, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - drop((*_11)) -> bb10; // bb9[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_11)) -> bb10; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb10 (cleanup): { - _12 = Eq(_9, _10); // bb10[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _12) -> [false: bb9, otherwise: bb2]; // bb10[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _12 = Eq(_9, _10); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _12) -> [false: bb9, otherwise: bb2]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb11: { - _13 = _9; // bb11[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _9 = Offset(move _9, const 1usize); // bb11[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _13 = _9; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _9 = Offset(move _9, const 1usize); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: usize // + val: Value(Scalar(0x0000000000000001)) // mir::Constant // + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - drop((*_13)) -> [return: bb12, unwind: bb10]; // bb11[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop((*_13)) -> [return: bb12, unwind: bb10]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb12: { - _14 = Eq(_9, _10); // bb12[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _14) -> [false: bb11, otherwise: bb1]; // bb12[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _14 = Eq(_9, _10); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _14) -> [false: bb11, otherwise: bb1]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb13: { - _15 = &raw mut (*_1); // bb13[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _9 = move _15 as *mut std::string::String (Misc); // bb13[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _10 = Offset(_9, move _3); // bb13[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - goto -> bb12; // bb13[3]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _15 = &raw mut (*_1); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _9 = move _15 as *mut std::string::String (Misc); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _10 = Offset(_9, move _3); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb12; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb14: { - goto -> bb13; // bb14[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb13; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb15: { - _2 = SizeOf(std::string::String); // bb15[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _3 = Len((*_1)); // bb15[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - switchInt(move _2) -> [0usize: bb8, otherwise: bb14]; // bb15[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _2 = SizeOf(std::string::String); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _3 = Len((*_1)); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + switchInt(move _2) -> [0usize: bb8, otherwise: bb14]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } } diff --git a/src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir b/src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir index 5ea1e431d192b..e7815da73aa15 100644 --- a/src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir +++ b/src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir @@ -52,14 +52,14 @@ static XXX: &Foo = { let mut _48: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:29: 23:2 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 - StorageLive(_4); // bb0[3]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 - StorageLive(_5); // bb0[4]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 - StorageLive(_6); // bb0[5]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:12: 22:6 - StorageLive(_7); // bb0[6]: scope 0 at $DIR/storage_live_dead_in_statics.rs:8:9: 8:15 - _7 = (const 0u32, const 1u32); // bb0[7]: scope 0 at $DIR/storage_live_dead_in_statics.rs:8:9: 8:15 + StorageLive(_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2 + StorageLive(_2); // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:29: 23:2 + StorageLive(_3); // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 + StorageLive(_4); // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 + StorageLive(_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 + StorageLive(_6); // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:12: 22:6 + StorageLive(_7); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:9: 8:15 + _7 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:9: 8:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -72,8 +72,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:8:13: 8:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_8); // bb0[8]: scope 0 at $DIR/storage_live_dead_in_statics.rs:8:17: 8:23 - _8 = (const 0u32, const 2u32); // bb0[9]: scope 0 at $DIR/storage_live_dead_in_statics.rs:8:17: 8:23 + StorageLive(_8); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:17: 8:23 + _8 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:17: 8:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -86,8 +86,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:8:21: 8:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_9); // bb0[10]: scope 0 at $DIR/storage_live_dead_in_statics.rs:8:25: 8:31 - _9 = (const 0u32, const 3u32); // bb0[11]: scope 0 at $DIR/storage_live_dead_in_statics.rs:8:25: 8:31 + StorageLive(_9); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:25: 8:31 + _9 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:25: 8:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -100,8 +100,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:8:29: 8:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_10); // bb0[12]: scope 0 at $DIR/storage_live_dead_in_statics.rs:9:9: 9:15 - _10 = (const 0u32, const 1u32); // bb0[13]: scope 0 at $DIR/storage_live_dead_in_statics.rs:9:9: 9:15 + StorageLive(_10); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:9: 9:15 + _10 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:9: 9:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -114,8 +114,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:9:13: 9:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_11); // bb0[14]: scope 0 at $DIR/storage_live_dead_in_statics.rs:9:17: 9:23 - _11 = (const 0u32, const 2u32); // bb0[15]: scope 0 at $DIR/storage_live_dead_in_statics.rs:9:17: 9:23 + StorageLive(_11); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:17: 9:23 + _11 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:17: 9:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -128,8 +128,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:9:21: 9:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_12); // bb0[16]: scope 0 at $DIR/storage_live_dead_in_statics.rs:9:25: 9:31 - _12 = (const 0u32, const 3u32); // bb0[17]: scope 0 at $DIR/storage_live_dead_in_statics.rs:9:25: 9:31 + StorageLive(_12); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:25: 9:31 + _12 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:25: 9:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -142,8 +142,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:9:29: 9:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_13); // bb0[18]: scope 0 at $DIR/storage_live_dead_in_statics.rs:10:9: 10:15 - _13 = (const 0u32, const 1u32); // bb0[19]: scope 0 at $DIR/storage_live_dead_in_statics.rs:10:9: 10:15 + StorageLive(_13); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:9: 10:15 + _13 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:9: 10:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -156,8 +156,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:10:13: 10:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_14); // bb0[20]: scope 0 at $DIR/storage_live_dead_in_statics.rs:10:17: 10:23 - _14 = (const 0u32, const 2u32); // bb0[21]: scope 0 at $DIR/storage_live_dead_in_statics.rs:10:17: 10:23 + StorageLive(_14); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:17: 10:23 + _14 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:17: 10:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -170,8 +170,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:10:21: 10:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_15); // bb0[22]: scope 0 at $DIR/storage_live_dead_in_statics.rs:10:25: 10:31 - _15 = (const 0u32, const 3u32); // bb0[23]: scope 0 at $DIR/storage_live_dead_in_statics.rs:10:25: 10:31 + StorageLive(_15); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:25: 10:31 + _15 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:25: 10:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -184,8 +184,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:10:29: 10:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_16); // bb0[24]: scope 0 at $DIR/storage_live_dead_in_statics.rs:11:9: 11:15 - _16 = (const 0u32, const 1u32); // bb0[25]: scope 0 at $DIR/storage_live_dead_in_statics.rs:11:9: 11:15 + StorageLive(_16); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:9: 11:15 + _16 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:9: 11:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -198,8 +198,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:11:13: 11:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_17); // bb0[26]: scope 0 at $DIR/storage_live_dead_in_statics.rs:11:17: 11:23 - _17 = (const 0u32, const 2u32); // bb0[27]: scope 0 at $DIR/storage_live_dead_in_statics.rs:11:17: 11:23 + StorageLive(_17); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:17: 11:23 + _17 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:17: 11:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -212,8 +212,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:11:21: 11:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_18); // bb0[28]: scope 0 at $DIR/storage_live_dead_in_statics.rs:11:25: 11:31 - _18 = (const 0u32, const 3u32); // bb0[29]: scope 0 at $DIR/storage_live_dead_in_statics.rs:11:25: 11:31 + StorageLive(_18); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:25: 11:31 + _18 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:25: 11:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -226,8 +226,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:11:29: 11:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_19); // bb0[30]: scope 0 at $DIR/storage_live_dead_in_statics.rs:12:9: 12:15 - _19 = (const 0u32, const 1u32); // bb0[31]: scope 0 at $DIR/storage_live_dead_in_statics.rs:12:9: 12:15 + StorageLive(_19); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:9: 12:15 + _19 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:9: 12:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -240,8 +240,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:12:13: 12:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_20); // bb0[32]: scope 0 at $DIR/storage_live_dead_in_statics.rs:12:17: 12:23 - _20 = (const 0u32, const 2u32); // bb0[33]: scope 0 at $DIR/storage_live_dead_in_statics.rs:12:17: 12:23 + StorageLive(_20); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:17: 12:23 + _20 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:17: 12:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -254,8 +254,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:12:21: 12:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_21); // bb0[34]: scope 0 at $DIR/storage_live_dead_in_statics.rs:12:25: 12:31 - _21 = (const 0u32, const 3u32); // bb0[35]: scope 0 at $DIR/storage_live_dead_in_statics.rs:12:25: 12:31 + StorageLive(_21); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:25: 12:31 + _21 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:25: 12:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -268,8 +268,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:12:29: 12:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_22); // bb0[36]: scope 0 at $DIR/storage_live_dead_in_statics.rs:13:9: 13:15 - _22 = (const 0u32, const 1u32); // bb0[37]: scope 0 at $DIR/storage_live_dead_in_statics.rs:13:9: 13:15 + StorageLive(_22); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:9: 13:15 + _22 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:9: 13:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -282,8 +282,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:13:13: 13:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_23); // bb0[38]: scope 0 at $DIR/storage_live_dead_in_statics.rs:13:17: 13:23 - _23 = (const 0u32, const 2u32); // bb0[39]: scope 0 at $DIR/storage_live_dead_in_statics.rs:13:17: 13:23 + StorageLive(_23); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:17: 13:23 + _23 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:17: 13:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -296,8 +296,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:13:21: 13:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_24); // bb0[40]: scope 0 at $DIR/storage_live_dead_in_statics.rs:13:25: 13:31 - _24 = (const 0u32, const 3u32); // bb0[41]: scope 0 at $DIR/storage_live_dead_in_statics.rs:13:25: 13:31 + StorageLive(_24); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:25: 13:31 + _24 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:25: 13:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -310,8 +310,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:13:29: 13:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_25); // bb0[42]: scope 0 at $DIR/storage_live_dead_in_statics.rs:14:9: 14:15 - _25 = (const 0u32, const 1u32); // bb0[43]: scope 0 at $DIR/storage_live_dead_in_statics.rs:14:9: 14:15 + StorageLive(_25); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:9: 14:15 + _25 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:9: 14:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -324,8 +324,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:14:13: 14:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_26); // bb0[44]: scope 0 at $DIR/storage_live_dead_in_statics.rs:14:17: 14:23 - _26 = (const 0u32, const 2u32); // bb0[45]: scope 0 at $DIR/storage_live_dead_in_statics.rs:14:17: 14:23 + StorageLive(_26); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:17: 14:23 + _26 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:17: 14:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -338,8 +338,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:14:21: 14:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_27); // bb0[46]: scope 0 at $DIR/storage_live_dead_in_statics.rs:14:25: 14:31 - _27 = (const 0u32, const 3u32); // bb0[47]: scope 0 at $DIR/storage_live_dead_in_statics.rs:14:25: 14:31 + StorageLive(_27); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:25: 14:31 + _27 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:25: 14:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -352,8 +352,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:14:29: 14:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_28); // bb0[48]: scope 0 at $DIR/storage_live_dead_in_statics.rs:15:9: 15:15 - _28 = (const 0u32, const 1u32); // bb0[49]: scope 0 at $DIR/storage_live_dead_in_statics.rs:15:9: 15:15 + StorageLive(_28); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:9: 15:15 + _28 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:9: 15:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -366,8 +366,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:15:13: 15:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_29); // bb0[50]: scope 0 at $DIR/storage_live_dead_in_statics.rs:15:17: 15:23 - _29 = (const 0u32, const 2u32); // bb0[51]: scope 0 at $DIR/storage_live_dead_in_statics.rs:15:17: 15:23 + StorageLive(_29); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:17: 15:23 + _29 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:17: 15:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -380,8 +380,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:15:21: 15:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_30); // bb0[52]: scope 0 at $DIR/storage_live_dead_in_statics.rs:15:25: 15:31 - _30 = (const 0u32, const 3u32); // bb0[53]: scope 0 at $DIR/storage_live_dead_in_statics.rs:15:25: 15:31 + StorageLive(_30); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:25: 15:31 + _30 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:25: 15:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -394,8 +394,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:15:29: 15:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_31); // bb0[54]: scope 0 at $DIR/storage_live_dead_in_statics.rs:16:9: 16:15 - _31 = (const 0u32, const 1u32); // bb0[55]: scope 0 at $DIR/storage_live_dead_in_statics.rs:16:9: 16:15 + StorageLive(_31); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:9: 16:15 + _31 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:9: 16:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -408,8 +408,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:16:13: 16:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_32); // bb0[56]: scope 0 at $DIR/storage_live_dead_in_statics.rs:16:17: 16:23 - _32 = (const 0u32, const 2u32); // bb0[57]: scope 0 at $DIR/storage_live_dead_in_statics.rs:16:17: 16:23 + StorageLive(_32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:17: 16:23 + _32 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:17: 16:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -422,8 +422,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:16:21: 16:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_33); // bb0[58]: scope 0 at $DIR/storage_live_dead_in_statics.rs:16:25: 16:31 - _33 = (const 0u32, const 3u32); // bb0[59]: scope 0 at $DIR/storage_live_dead_in_statics.rs:16:25: 16:31 + StorageLive(_33); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:25: 16:31 + _33 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:25: 16:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -436,8 +436,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:16:29: 16:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_34); // bb0[60]: scope 0 at $DIR/storage_live_dead_in_statics.rs:17:9: 17:15 - _34 = (const 0u32, const 1u32); // bb0[61]: scope 0 at $DIR/storage_live_dead_in_statics.rs:17:9: 17:15 + StorageLive(_34); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:9: 17:15 + _34 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:9: 17:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -450,8 +450,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:17:13: 17:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_35); // bb0[62]: scope 0 at $DIR/storage_live_dead_in_statics.rs:17:17: 17:23 - _35 = (const 0u32, const 2u32); // bb0[63]: scope 0 at $DIR/storage_live_dead_in_statics.rs:17:17: 17:23 + StorageLive(_35); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:17: 17:23 + _35 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:17: 17:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -464,8 +464,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:17:21: 17:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_36); // bb0[64]: scope 0 at $DIR/storage_live_dead_in_statics.rs:17:25: 17:31 - _36 = (const 0u32, const 3u32); // bb0[65]: scope 0 at $DIR/storage_live_dead_in_statics.rs:17:25: 17:31 + StorageLive(_36); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:25: 17:31 + _36 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:25: 17:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -478,8 +478,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:17:29: 17:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_37); // bb0[66]: scope 0 at $DIR/storage_live_dead_in_statics.rs:18:9: 18:15 - _37 = (const 0u32, const 1u32); // bb0[67]: scope 0 at $DIR/storage_live_dead_in_statics.rs:18:9: 18:15 + StorageLive(_37); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:9: 18:15 + _37 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:9: 18:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -492,8 +492,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:18:13: 18:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_38); // bb0[68]: scope 0 at $DIR/storage_live_dead_in_statics.rs:18:17: 18:23 - _38 = (const 0u32, const 2u32); // bb0[69]: scope 0 at $DIR/storage_live_dead_in_statics.rs:18:17: 18:23 + StorageLive(_38); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:17: 18:23 + _38 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:17: 18:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -506,8 +506,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:18:21: 18:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_39); // bb0[70]: scope 0 at $DIR/storage_live_dead_in_statics.rs:18:25: 18:31 - _39 = (const 0u32, const 3u32); // bb0[71]: scope 0 at $DIR/storage_live_dead_in_statics.rs:18:25: 18:31 + StorageLive(_39); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:25: 18:31 + _39 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:25: 18:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -520,8 +520,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:18:29: 18:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_40); // bb0[72]: scope 0 at $DIR/storage_live_dead_in_statics.rs:19:9: 19:15 - _40 = (const 0u32, const 1u32); // bb0[73]: scope 0 at $DIR/storage_live_dead_in_statics.rs:19:9: 19:15 + StorageLive(_40); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:9: 19:15 + _40 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:9: 19:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -534,8 +534,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:19:13: 19:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_41); // bb0[74]: scope 0 at $DIR/storage_live_dead_in_statics.rs:19:17: 19:23 - _41 = (const 0u32, const 2u32); // bb0[75]: scope 0 at $DIR/storage_live_dead_in_statics.rs:19:17: 19:23 + StorageLive(_41); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:17: 19:23 + _41 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:17: 19:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -548,8 +548,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:19:21: 19:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_42); // bb0[76]: scope 0 at $DIR/storage_live_dead_in_statics.rs:19:25: 19:31 - _42 = (const 0u32, const 3u32); // bb0[77]: scope 0 at $DIR/storage_live_dead_in_statics.rs:19:25: 19:31 + StorageLive(_42); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:25: 19:31 + _42 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:25: 19:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -562,8 +562,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:19:29: 19:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_43); // bb0[78]: scope 0 at $DIR/storage_live_dead_in_statics.rs:20:9: 20:15 - _43 = (const 0u32, const 1u32); // bb0[79]: scope 0 at $DIR/storage_live_dead_in_statics.rs:20:9: 20:15 + StorageLive(_43); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:9: 20:15 + _43 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:9: 20:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -576,8 +576,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:20:13: 20:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_44); // bb0[80]: scope 0 at $DIR/storage_live_dead_in_statics.rs:20:17: 20:23 - _44 = (const 0u32, const 2u32); // bb0[81]: scope 0 at $DIR/storage_live_dead_in_statics.rs:20:17: 20:23 + StorageLive(_44); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:17: 20:23 + _44 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:17: 20:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -590,8 +590,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:20:21: 20:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_45); // bb0[82]: scope 0 at $DIR/storage_live_dead_in_statics.rs:20:25: 20:31 - _45 = (const 0u32, const 3u32); // bb0[83]: scope 0 at $DIR/storage_live_dead_in_statics.rs:20:25: 20:31 + StorageLive(_45); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:25: 20:31 + _45 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:25: 20:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -604,8 +604,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:20:29: 20:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - StorageLive(_46); // bb0[84]: scope 0 at $DIR/storage_live_dead_in_statics.rs:21:9: 21:15 - _46 = (const 0u32, const 1u32); // bb0[85]: scope 0 at $DIR/storage_live_dead_in_statics.rs:21:9: 21:15 + StorageLive(_46); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:9: 21:15 + _46 = (const 0u32, const 1u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:9: 21:15 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -618,8 +618,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:21:13: 21:14 // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - StorageLive(_47); // bb0[86]: scope 0 at $DIR/storage_live_dead_in_statics.rs:21:17: 21:23 - _47 = (const 0u32, const 2u32); // bb0[87]: scope 0 at $DIR/storage_live_dead_in_statics.rs:21:17: 21:23 + StorageLive(_47); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:17: 21:23 + _47 = (const 0u32, const 2u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:17: 21:23 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -632,8 +632,8 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:21:21: 21:22 // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - StorageLive(_48); // bb0[88]: scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 - _48 = (const 0u32, const 3u32); // bb0[89]: scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 + StorageLive(_48); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 + _48 = (const 0u32, const 3u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 // ty::Const // + ty: u32 // + val: Value(Scalar(0x00000000)) @@ -646,25 +646,25 @@ static XXX: &Foo = { // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:21:29: 21:30 // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } - _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48]; // bb0[90]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:12: 22:6 - _5 = &_6; // bb0[91]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 - _4 = &(*_5); // bb0[92]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 - _3 = move _4 as &[(u32, u32)] (Pointer(Unsize)); // bb0[93]: scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 - _2 = Foo { tup: const "hi", data: move _3 }; // bb0[94]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:29: 23:2 + _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48]; // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:12: 22:6 + _5 = &_6; // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 + _4 = &(*_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 + _3 = move _4 as &[(u32, u32)] (Pointer(Unsize)); // scope 0 at $DIR/storage_live_dead_in_statics.rs:7:11: 22:6 + _2 = Foo { tup: const "hi", data: move _3 }; // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:29: 23:2 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [104, 105], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [3], len: Size { raw: 2 } }, size: Size { raw: 2 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 2 }) // mir::Constant // + span: $DIR/storage_live_dead_in_statics.rs:6:10: 6:14 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [104, 105], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [3], len: Size { raw: 2 } }, size: Size { raw: 2 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 2 }) } - _1 = &_2; // bb0[95]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2 - _0 = &(*_1); // bb0[96]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2 - StorageDead(_5); // bb0[97]: scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2 - StorageDead(_1); // bb0[98]: scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2 - return; // bb0[99]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 23:3 + _1 = &_2; // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2 + _0 = &(*_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:28: 23:2 + StorageDead(_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2 + StorageDead(_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:23:1: 23:2 + return; // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 23:3 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 23:3 + resume; // scope 0 at $DIR/storage_live_dead_in_statics.rs:5:1: 23:3 } } diff --git a/src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir b/src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir index 799521b09a6fe..5ffc83158ead2 100644 --- a/src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir +++ b/src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir @@ -36,52 +36,52 @@ fn main() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/storage_ranges.rs:4:9: 4:10 - _1 = const 0i32; // bb0[1]: scope 0 at $DIR/storage_ranges.rs:4:13: 4:14 + StorageLive(_1); // scope 0 at $DIR/storage_ranges.rs:4:9: 4:10 + _1 = const 0i32; // scope 0 at $DIR/storage_ranges.rs:4:13: 4:14 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant // + span: $DIR/storage_ranges.rs:4:13: 4:14 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/storage_ranges.rs:4:9: 4:10 - StorageLive(_2); // bb0[3]: scope 1 at $DIR/storage_ranges.rs:5:5: 7:6 - StorageLive(_3); // bb0[4]: scope 1 at $DIR/storage_ranges.rs:6:13: 6:14 - StorageLive(_4); // bb0[5]: scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 - StorageLive(_5); // bb0[6]: scope 1 at $DIR/storage_ranges.rs:6:23: 6:24 - _5 = _1; // bb0[7]: scope 1 at $DIR/storage_ranges.rs:6:23: 6:24 - _4 = std::option::Option::::Some(move _5); // bb0[8]: scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 - StorageDead(_5); // bb0[9]: scope 1 at $DIR/storage_ranges.rs:6:24: 6:25 - _3 = &_4; // bb0[10]: scope 1 at $DIR/storage_ranges.rs:6:17: 6:25 - FakeRead(ForLet, _3); // bb0[11]: scope 1 at $DIR/storage_ranges.rs:6:13: 6:14 - _2 = const (); // bb0[12]: scope 1 at $DIR/storage_ranges.rs:5:5: 7:6 + FakeRead(ForLet, _1); // scope 0 at $DIR/storage_ranges.rs:4:9: 4:10 + StorageLive(_2); // scope 1 at $DIR/storage_ranges.rs:5:5: 7:6 + StorageLive(_3); // scope 1 at $DIR/storage_ranges.rs:6:13: 6:14 + StorageLive(_4); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 + StorageLive(_5); // scope 1 at $DIR/storage_ranges.rs:6:23: 6:24 + _5 = _1; // scope 1 at $DIR/storage_ranges.rs:6:23: 6:24 + _4 = std::option::Option::::Some(move _5); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 + StorageDead(_5); // scope 1 at $DIR/storage_ranges.rs:6:24: 6:25 + _3 = &_4; // scope 1 at $DIR/storage_ranges.rs:6:17: 6:25 + FakeRead(ForLet, _3); // scope 1 at $DIR/storage_ranges.rs:6:13: 6:14 + _2 = const (); // scope 1 at $DIR/storage_ranges.rs:5:5: 7:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/storage_ranges.rs:5:5: 7:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_4); // bb0[13]: scope 1 at $DIR/storage_ranges.rs:7:5: 7:6 - StorageDead(_3); // bb0[14]: scope 1 at $DIR/storage_ranges.rs:7:5: 7:6 - StorageDead(_2); // bb0[15]: scope 1 at $DIR/storage_ranges.rs:7:5: 7:6 - StorageLive(_6); // bb0[16]: scope 1 at $DIR/storage_ranges.rs:8:9: 8:10 - _6 = const 1i32; // bb0[17]: scope 1 at $DIR/storage_ranges.rs:8:13: 8:14 + StorageDead(_4); // scope 1 at $DIR/storage_ranges.rs:7:5: 7:6 + StorageDead(_3); // scope 1 at $DIR/storage_ranges.rs:7:5: 7:6 + StorageDead(_2); // scope 1 at $DIR/storage_ranges.rs:7:5: 7:6 + StorageLive(_6); // scope 1 at $DIR/storage_ranges.rs:8:9: 8:10 + _6 = const 1i32; // scope 1 at $DIR/storage_ranges.rs:8:13: 8:14 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/storage_ranges.rs:8:13: 8:14 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - FakeRead(ForLet, _6); // bb0[18]: scope 1 at $DIR/storage_ranges.rs:8:9: 8:10 - _0 = const (); // bb0[19]: scope 0 at $DIR/storage_ranges.rs:3:11: 9:2 + FakeRead(ForLet, _6); // scope 1 at $DIR/storage_ranges.rs:8:9: 8:10 + _0 = const (); // scope 0 at $DIR/storage_ranges.rs:3:11: 9:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/storage_ranges.rs:3:11: 9:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_6); // bb0[20]: scope 1 at $DIR/storage_ranges.rs:9:1: 9:2 - StorageDead(_1); // bb0[21]: scope 0 at $DIR/storage_ranges.rs:9:1: 9:2 - return; // bb0[22]: scope 0 at $DIR/storage_ranges.rs:9:2: 9:2 + StorageDead(_6); // scope 1 at $DIR/storage_ranges.rs:9:1: 9:2 + StorageDead(_1); // scope 0 at $DIR/storage_ranges.rs:9:1: 9:2 + return; // scope 0 at $DIR/storage_ranges.rs:9:2: 9:2 } } diff --git a/src/test/mir-opt/uniform_array_move_out/rustc.move_out_by_subslice.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out/rustc.move_out_by_subslice.mir_map.0.mir index b46adadf1016a..de29cd61019f1 100644 --- a/src/test/mir-opt/uniform_array_move_out/rustc.move_out_by_subslice.mir_map.0.mir +++ b/src/test/mir-opt/uniform_array_move_out/rustc.move_out_by_subslice.mir_map.0.mir @@ -16,102 +16,102 @@ fn move_out_by_subslice() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:9: 11:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 - _3 = Box(i32); // bb0[3]: scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 - (*_3) = const 1i32; // bb0[4]: scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 + StorageLive(_1); // scope 0 at $DIR/uniform_array_move_out.rs:11:9: 11:10 + StorageLive(_2); // scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 + StorageLive(_3); // scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 + _3 = Box(i32); // scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 + (*_3) = const 1i32; // scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/uniform_array_move_out.rs:11:18: 11:19 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - _2 = move _3; // bb0[5]: scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 - drop(_3) -> [return: bb4, unwind: bb2]; // bb0[6]: scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 + _2 = move _3; // scope 0 at $DIR/uniform_array_move_out.rs:11:14: 11:19 + drop(_3) -> [return: bb4, unwind: bb2]; // scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/uniform_array_move_out.rs:10:1: 13:2 + resume; // scope 0 at $DIR/uniform_array_move_out.rs:10:1: 13:2 } bb2 (cleanup): { - drop(_2) -> bb1; // bb2[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 + drop(_2) -> bb1; // scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 } bb3 (cleanup): { - drop(_3) -> bb2; // bb3[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 + drop(_3) -> bb2; // scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 } bb4: { - StorageDead(_3); // bb4[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 - StorageLive(_4); // bb4[1]: scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 - StorageLive(_5); // bb4[2]: scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 - _5 = Box(i32); // bb4[3]: scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 - (*_5) = const 2i32; // bb4[4]: scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 + StorageDead(_3); // scope 0 at $DIR/uniform_array_move_out.rs:11:18: 11:19 + StorageLive(_4); // scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 + StorageLive(_5); // scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 + _5 = Box(i32); // scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 + (*_5) = const 2i32; // scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/uniform_array_move_out.rs:11:25: 11:26 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - _4 = move _5; // bb4[5]: scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 - drop(_5) -> [return: bb7, unwind: bb5]; // bb4[6]: scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 + _4 = move _5; // scope 0 at $DIR/uniform_array_move_out.rs:11:21: 11:26 + drop(_5) -> [return: bb7, unwind: bb5]; // scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 } bb5 (cleanup): { - drop(_4) -> bb2; // bb5[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 + drop(_4) -> bb2; // scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 } bb6 (cleanup): { - drop(_5) -> bb5; // bb6[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 + drop(_5) -> bb5; // scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 } bb7: { - StorageDead(_5); // bb7[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 - _1 = [move _2, move _4]; // bb7[1]: scope 0 at $DIR/uniform_array_move_out.rs:11:13: 11:27 - drop(_4) -> [return: bb8, unwind: bb2]; // bb7[2]: scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 + StorageDead(_5); // scope 0 at $DIR/uniform_array_move_out.rs:11:25: 11:26 + _1 = [move _2, move _4]; // scope 0 at $DIR/uniform_array_move_out.rs:11:13: 11:27 + drop(_4) -> [return: bb8, unwind: bb2]; // scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 } bb8: { - StorageDead(_4); // bb8[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 - drop(_2) -> [return: bb9, unwind: bb1]; // bb8[1]: scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 + StorageDead(_4); // scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 + drop(_2) -> [return: bb9, unwind: bb1]; // scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 } bb9: { - StorageDead(_2); // bb9[0]: scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 - FakeRead(ForLet, _1); // bb9[1]: scope 0 at $DIR/uniform_array_move_out.rs:11:9: 11:10 - StorageLive(_6); // bb9[2]: scope 1 at $DIR/uniform_array_move_out.rs:12:10: 12:17 - _6 = move _1[0..2]; // bb9[3]: scope 1 at $DIR/uniform_array_move_out.rs:12:10: 12:17 - _0 = const (); // bb9[4]: scope 0 at $DIR/uniform_array_move_out.rs:10:27: 13:2 + StorageDead(_2); // scope 0 at $DIR/uniform_array_move_out.rs:11:26: 11:27 + FakeRead(ForLet, _1); // scope 0 at $DIR/uniform_array_move_out.rs:11:9: 11:10 + StorageLive(_6); // scope 1 at $DIR/uniform_array_move_out.rs:12:10: 12:17 + _6 = move _1[0..2]; // scope 1 at $DIR/uniform_array_move_out.rs:12:10: 12:17 + _0 = const (); // scope 0 at $DIR/uniform_array_move_out.rs:10:27: 13:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/uniform_array_move_out.rs:10:27: 13:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_6) -> [return: bb12, unwind: bb10]; // bb9[5]: scope 1 at $DIR/uniform_array_move_out.rs:13:1: 13:2 + drop(_6) -> [return: bb12, unwind: bb10]; // scope 1 at $DIR/uniform_array_move_out.rs:13:1: 13:2 } bb10 (cleanup): { - drop(_1) -> bb1; // bb10[0]: scope 0 at $DIR/uniform_array_move_out.rs:13:1: 13:2 + drop(_1) -> bb1; // scope 0 at $DIR/uniform_array_move_out.rs:13:1: 13:2 } bb11 (cleanup): { - drop(_6) -> bb10; // bb11[0]: scope 1 at $DIR/uniform_array_move_out.rs:13:1: 13:2 + drop(_6) -> bb10; // scope 1 at $DIR/uniform_array_move_out.rs:13:1: 13:2 } bb12: { - StorageDead(_6); // bb12[0]: scope 1 at $DIR/uniform_array_move_out.rs:13:1: 13:2 - drop(_1) -> [return: bb13, unwind: bb1]; // bb12[1]: scope 0 at $DIR/uniform_array_move_out.rs:13:1: 13:2 + StorageDead(_6); // scope 1 at $DIR/uniform_array_move_out.rs:13:1: 13:2 + drop(_1) -> [return: bb13, unwind: bb1]; // scope 0 at $DIR/uniform_array_move_out.rs:13:1: 13:2 } bb13: { - StorageDead(_1); // bb13[0]: scope 0 at $DIR/uniform_array_move_out.rs:13:1: 13:2 - goto -> bb14; // bb13[1]: scope 0 at $DIR/uniform_array_move_out.rs:13:2: 13:2 + StorageDead(_1); // scope 0 at $DIR/uniform_array_move_out.rs:13:1: 13:2 + goto -> bb14; // scope 0 at $DIR/uniform_array_move_out.rs:13:2: 13:2 } bb14: { - return; // bb14[0]: scope 0 at $DIR/uniform_array_move_out.rs:13:2: 13:2 + return; // scope 0 at $DIR/uniform_array_move_out.rs:13:2: 13:2 } } diff --git a/src/test/mir-opt/uniform_array_move_out/rustc.move_out_from_end.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out/rustc.move_out_from_end.mir_map.0.mir index 851107efe11f2..aeab0e892ae8b 100644 --- a/src/test/mir-opt/uniform_array_move_out/rustc.move_out_from_end.mir_map.0.mir +++ b/src/test/mir-opt/uniform_array_move_out/rustc.move_out_from_end.mir_map.0.mir @@ -16,102 +16,102 @@ fn move_out_from_end() -> () { } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 - StorageLive(_3); // bb0[2]: scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 - _3 = Box(i32); // bb0[3]: scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 - (*_3) = const 1i32; // bb0[4]: scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 + StorageLive(_1); // scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 + StorageLive(_2); // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 + StorageLive(_3); // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 + _3 = Box(i32); // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 + (*_3) = const 1i32; // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000001)) // mir::Constant // + span: $DIR/uniform_array_move_out.rs:5:18: 5:19 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - _2 = move _3; // bb0[5]: scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 - drop(_3) -> [return: bb4, unwind: bb2]; // bb0[6]: scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 + _2 = move _3; // scope 0 at $DIR/uniform_array_move_out.rs:5:14: 5:19 + drop(_3) -> [return: bb4, unwind: bb2]; // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/uniform_array_move_out.rs:4:1: 7:2 + resume; // scope 0 at $DIR/uniform_array_move_out.rs:4:1: 7:2 } bb2 (cleanup): { - drop(_2) -> bb1; // bb2[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 + drop(_2) -> bb1; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb3 (cleanup): { - drop(_3) -> bb2; // bb3[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 + drop(_3) -> bb2; // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 } bb4: { - StorageDead(_3); // bb4[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 - StorageLive(_4); // bb4[1]: scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 - StorageLive(_5); // bb4[2]: scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 - _5 = Box(i32); // bb4[3]: scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 - (*_5) = const 2i32; // bb4[4]: scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 + StorageDead(_3); // scope 0 at $DIR/uniform_array_move_out.rs:5:18: 5:19 + StorageLive(_4); // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 + StorageLive(_5); // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 + _5 = Box(i32); // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 + (*_5) = const 2i32; // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/uniform_array_move_out.rs:5:25: 5:26 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - _4 = move _5; // bb4[5]: scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 - drop(_5) -> [return: bb7, unwind: bb5]; // bb4[6]: scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 + _4 = move _5; // scope 0 at $DIR/uniform_array_move_out.rs:5:21: 5:26 + drop(_5) -> [return: bb7, unwind: bb5]; // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 } bb5 (cleanup): { - drop(_4) -> bb2; // bb5[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 + drop(_4) -> bb2; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb6 (cleanup): { - drop(_5) -> bb5; // bb6[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 + drop(_5) -> bb5; // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 } bb7: { - StorageDead(_5); // bb7[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 - _1 = [move _2, move _4]; // bb7[1]: scope 0 at $DIR/uniform_array_move_out.rs:5:13: 5:27 - drop(_4) -> [return: bb8, unwind: bb2]; // bb7[2]: scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 + StorageDead(_5); // scope 0 at $DIR/uniform_array_move_out.rs:5:25: 5:26 + _1 = [move _2, move _4]; // scope 0 at $DIR/uniform_array_move_out.rs:5:13: 5:27 + drop(_4) -> [return: bb8, unwind: bb2]; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb8: { - StorageDead(_4); // bb8[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 - drop(_2) -> [return: bb9, unwind: bb1]; // bb8[1]: scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 + StorageDead(_4); // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 + drop(_2) -> [return: bb9, unwind: bb1]; // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 } bb9: { - StorageDead(_2); // bb9[0]: scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 - FakeRead(ForLet, _1); // bb9[1]: scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 - StorageLive(_6); // bb9[2]: scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 - _6 = move _1[1 of 2]; // bb9[3]: scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 - _0 = const (); // bb9[4]: scope 0 at $DIR/uniform_array_move_out.rs:4:24: 7:2 + StorageDead(_2); // scope 0 at $DIR/uniform_array_move_out.rs:5:26: 5:27 + FakeRead(ForLet, _1); // scope 0 at $DIR/uniform_array_move_out.rs:5:9: 5:10 + StorageLive(_6); // scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 + _6 = move _1[1 of 2]; // scope 1 at $DIR/uniform_array_move_out.rs:6:14: 6:16 + _0 = const (); // scope 0 at $DIR/uniform_array_move_out.rs:4:24: 7:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/uniform_array_move_out.rs:4:24: 7:2 // + literal: Const { ty: (), val: Value(Scalar()) } - drop(_6) -> [return: bb12, unwind: bb10]; // bb9[5]: scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 + drop(_6) -> [return: bb12, unwind: bb10]; // scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb10 (cleanup): { - drop(_1) -> bb1; // bb10[0]: scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 + drop(_1) -> bb1; // scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb11 (cleanup): { - drop(_6) -> bb10; // bb11[0]: scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 + drop(_6) -> bb10; // scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb12: { - StorageDead(_6); // bb12[0]: scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 - drop(_1) -> [return: bb13, unwind: bb1]; // bb12[1]: scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 + StorageDead(_6); // scope 1 at $DIR/uniform_array_move_out.rs:7:1: 7:2 + drop(_1) -> [return: bb13, unwind: bb1]; // scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 } bb13: { - StorageDead(_1); // bb13[0]: scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 - goto -> bb14; // bb13[1]: scope 0 at $DIR/uniform_array_move_out.rs:7:2: 7:2 + StorageDead(_1); // scope 0 at $DIR/uniform_array_move_out.rs:7:1: 7:2 + goto -> bb14; // scope 0 at $DIR/uniform_array_move_out.rs:7:2: 7:2 } bb14: { - return; // bb14[0]: scope 0 at $DIR/uniform_array_move_out.rs:7:2: 7:2 + return; // scope 0 at $DIR/uniform_array_move_out.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir index f2c8733660873..c17fe3bb75757 100644 --- a/src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir +++ b/src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir @@ -11,9 +11,9 @@ fn process_never(_1: *const !) -> () { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/uninhabited-enum.rs:8:8: 8:14 - _2 = &(*_1); // bb0[1]: scope 2 at $DIR/uninhabited-enum.rs:8:26: 8:33 - StorageDead(_2); // bb0[2]: scope 0 at $DIR/uninhabited-enum.rs:9:1: 9:2 - unreachable; // bb0[3]: scope 0 at $DIR/uninhabited-enum.rs:7:39: 9:2 + StorageLive(_2); // scope 0 at $DIR/uninhabited-enum.rs:8:8: 8:14 + _2 = &(*_1); // scope 2 at $DIR/uninhabited-enum.rs:8:26: 8:33 + StorageDead(_2); // scope 0 at $DIR/uninhabited-enum.rs:9:1: 9:2 + unreachable; // scope 0 at $DIR/uninhabited-enum.rs:7:39: 9:2 } } diff --git a/src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir index 1ee2297daaca4..8cfcd64a70f7d 100644 --- a/src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir +++ b/src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir @@ -11,16 +11,16 @@ fn process_void(_1: *const Void) -> () { } bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/uninhabited-enum.rs:14:8: 14:14 - _2 = &(*_1); // bb0[1]: scope 2 at $DIR/uninhabited-enum.rs:14:26: 14:33 - _0 = const (); // bb0[2]: scope 0 at $DIR/uninhabited-enum.rs:13:41: 17:2 + StorageLive(_2); // scope 0 at $DIR/uninhabited-enum.rs:14:8: 14:14 + _2 = &(*_1); // scope 2 at $DIR/uninhabited-enum.rs:14:26: 14:33 + _0 = const (); // scope 0 at $DIR/uninhabited-enum.rs:13:41: 17:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/uninhabited-enum.rs:13:41: 17:2 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // bb0[3]: scope 0 at $DIR/uninhabited-enum.rs:17:1: 17:2 - return; // bb0[4]: scope 0 at $DIR/uninhabited-enum.rs:17:2: 17:2 + StorageDead(_2); // scope 0 at $DIR/uninhabited-enum.rs:17:1: 17:2 + return; // scope 0 at $DIR/uninhabited-enum.rs:17:2: 17:2 } } diff --git a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir b/src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir index fba77dfe239ef..4d65f8d10471d 100644 --- a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir +++ b/src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir @@ -13,64 +13,64 @@ fn main() -> () { let _9: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 - _2 = Test1::C; // bb0[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 - _3 = discriminant(_2); // bb0[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 - StorageLive(_5); // bb0[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 - _5 = const "C"; // bb0[5]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 + StorageLive(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 + StorageLive(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 + _2 = Test1::C; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 + _3 = discriminant(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 + StorageLive(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 + _5 = const "C"; // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [67], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [67], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } - _1 = &(*_5); // bb0[6]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 - StorageDead(_5); // bb0[7]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:23: 23:24 - StorageDead(_2); // bb0[8]: scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 - StorageDead(_1); // bb0[9]: scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 - StorageLive(_6); // bb0[10]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 - StorageLive(_7); // bb0[11]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 - _7 = Test2::D; // bb0[12]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 - _8 = discriminant(_7); // bb0[13]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 - switchInt(move _8) -> [4isize: bb2, otherwise: bb1]; // bb0[14]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 + _1 = &(*_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 + StorageDead(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:23: 23:24 + StorageDead(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 + StorageDead(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 + StorageLive(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 + StorageLive(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 + _7 = Test2::D; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 + _8 = discriminant(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 + switchInt(move _8) -> [4isize: bb2, otherwise: bb1]; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 } bb1: { - StorageLive(_9); // bb1[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 - _9 = const "E"; // bb1[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 + StorageLive(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 + _9 = const "E"; // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [69], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [69], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } - _6 = &(*_9); // bb1[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 - StorageDead(_9); // bb1[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:23: 28:24 - goto -> bb3; // bb1[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 + _6 = &(*_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 + StorageDead(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:28:23: 28:24 + goto -> bb3; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 } bb2: { - _6 = const "D"; // bb2[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:21: 27:24 + _6 = const "D"; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:21: 27:24 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [68], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [68], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } - goto -> bb3; // bb2[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 + goto -> bb3; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 } bb3: { - StorageDead(_7); // bb3[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 - StorageDead(_6); // bb3[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 - _0 = const (); // bb3[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 30:2 + StorageDead(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 + StorageDead(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 + _0 = const (); // scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 30:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:19:11: 30:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb3[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:30:2: 30:2 + return; // scope 0 at $DIR/uninhabited_enum_branching.rs:30:2: 30:2 } } diff --git a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.UninhabitedEnumBranching.diff b/src/test/mir-opt/uninhabited_enum_branching/rustc.main.UninhabitedEnumBranching.diff index 35842fdaa4e7e..da9dd8b096311 100644 --- a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.UninhabitedEnumBranching.diff +++ b/src/test/mir-opt/uninhabited_enum_branching/rustc.main.UninhabitedEnumBranching.diff @@ -14,99 +14,99 @@ let _9: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 - StorageLive(_2); // bb0[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 - _2 = Test1::C; // bb0[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 - _3 = discriminant(_2); // bb0[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 -- switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb1]; // bb0[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 -+ switchInt(move _3) -> bb1; // bb0[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 + StorageLive(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 + StorageLive(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 + _2 = Test1::C; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:11: 20:19 + _3 = discriminant(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 +- switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb1]; // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 ++ switchInt(move _3) -> bb1; // scope 0 at $DIR/uninhabited_enum_branching.rs:21:9: 21:20 } bb1: { - StorageLive(_5); // bb1[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 - _5 = const "C"; // bb1[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 + StorageLive(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 + _5 = const "C"; // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [67], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [67], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } - _1 = &(*_5); // bb1[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 - StorageDead(_5); // bb1[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:23:23: 23:24 - goto -> bb4; // bb1[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 + _1 = &(*_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:21: 23:24 + StorageDead(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:23:23: 23:24 + goto -> bb4; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 } bb2: { - _1 = const "A(Empty)"; // bb2[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:21:24: 21:34 + _1 = const "A(Empty)"; // scope 0 at $DIR/uninhabited_enum_branching.rs:21:24: 21:34 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [65, 40, 69, 109, 112, 116, 121, 41], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 8 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:21:24: 21:34 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [65, 40, 69, 109, 112, 116, 121, 41], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 8 }) } - goto -> bb4; // bb2[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 + goto -> bb4; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 } bb3: { - StorageLive(_4); // bb3[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 - _4 = const "B(Empty)"; // bb3[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 + StorageLive(_4); // scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 + _4 = const "B(Empty)"; // scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [66, 40, 69, 109, 112, 116, 121, 41], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 8 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:22:24: 22:34 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [66, 40, 69, 109, 112, 116, 121, 41], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 8 }) } - _1 = &(*_4); // bb3[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 - StorageDead(_4); // bb3[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:22:33: 22:34 - goto -> bb4; // bb3[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 + _1 = &(*_4); // scope 0 at $DIR/uninhabited_enum_branching.rs:22:24: 22:34 + StorageDead(_4); // scope 0 at $DIR/uninhabited_enum_branching.rs:22:33: 22:34 + goto -> bb4; // scope 0 at $DIR/uninhabited_enum_branching.rs:20:5: 24:6 } bb4: { - StorageDead(_2); // bb4[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 - StorageDead(_1); // bb4[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 - StorageLive(_6); // bb4[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 - StorageLive(_7); // bb4[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 - _7 = Test2::D; // bb4[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 - _8 = discriminant(_7); // bb4[5]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 - switchInt(move _8) -> [4isize: bb6, otherwise: bb5]; // bb4[6]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 + StorageDead(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 + StorageDead(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:24:6: 24:7 + StorageLive(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 + StorageLive(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 + _7 = Test2::D; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:11: 26:19 + _8 = discriminant(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 + switchInt(move _8) -> [4isize: bb6, otherwise: bb5]; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:9: 27:17 } bb5: { - StorageLive(_9); // bb5[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 - _9 = const "E"; // bb5[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 + StorageLive(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 + _9 = const "E"; // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [69], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [69], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } - _6 = &(*_9); // bb5[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 - StorageDead(_9); // bb5[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:28:23: 28:24 - goto -> bb7; // bb5[4]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 + _6 = &(*_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:28:21: 28:24 + StorageDead(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:28:23: 28:24 + goto -> bb7; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 } bb6: { - _6 = const "D"; // bb6[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:27:21: 27:24 + _6 = const "D"; // scope 0 at $DIR/uninhabited_enum_branching.rs:27:21: 27:24 // ty::Const // + ty: &str // + val: Value(Slice { data: Allocation { bytes: [68], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [68], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) } - goto -> bb7; // bb6[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 + goto -> bb7; // scope 0 at $DIR/uninhabited_enum_branching.rs:26:5: 29:6 } bb7: { - StorageDead(_7); // bb7[0]: scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 - StorageDead(_6); // bb7[1]: scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 - _0 = const (); // bb7[2]: scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 30:2 + StorageDead(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 + StorageDead(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:29:6: 29:7 + _0 = const (); // scope 0 at $DIR/uninhabited_enum_branching.rs:19:11: 30:2 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/uninhabited_enum_branching.rs:19:11: 30:2 // + literal: Const { ty: (), val: Value(Scalar()) } - return; // bb7[3]: scope 0 at $DIR/uninhabited_enum_branching.rs:30:2: 30:2 + return; // scope 0 at $DIR/uninhabited_enum_branching.rs:30:2: 30:2 } } diff --git a/src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff index d530a99940983..ccd9612caddd4 100644 --- a/src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff @@ -18,8 +18,8 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/unreachable.rs:9:23: 9:30 - _1 = const empty() -> bb1; // bb0[1]: scope 0 at $DIR/unreachable.rs:9:23: 9:30 + StorageLive(_1); // scope 0 at $DIR/unreachable.rs:9:23: 9:30 + _1 = const empty() -> bb1; // scope 0 at $DIR/unreachable.rs:9:23: 9:30 // ty::Const // + ty: fn() -> std::option::Option {empty} // + val: Value(Scalar()) @@ -29,80 +29,80 @@ } bb1: { - _2 = discriminant(_1); // bb1[0]: scope 0 at $DIR/unreachable.rs:9:12: 9:20 -- switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // bb1[1]: scope 0 at $DIR/unreachable.rs:9:12: 9:20 -+ goto -> bb2; // bb1[1]: scope 0 at $DIR/unreachable.rs:9:12: 9:20 + _2 = discriminant(_1); // scope 0 at $DIR/unreachable.rs:9:12: 9:20 +- switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // scope 0 at $DIR/unreachable.rs:9:12: 9:20 ++ goto -> bb2; // scope 0 at $DIR/unreachable.rs:9:12: 9:20 } bb2: { - _0 = const (); // bb2[0]: scope 0 at $DIR/unreachable.rs:9:5: 19:6 + _0 = const (); // scope 0 at $DIR/unreachable.rs:9:5: 19:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable.rs:9:5: 19:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb2[1]: scope 0 at $DIR/unreachable.rs:20:1: 20:2 - return; // bb2[2]: scope 0 at $DIR/unreachable.rs:20:2: 20:2 + StorageDead(_1); // scope 0 at $DIR/unreachable.rs:20:1: 20:2 + return; // scope 0 at $DIR/unreachable.rs:20:2: 20:2 - } - - bb3: { -- StorageLive(_3); // bb3[0]: scope 0 at $DIR/unreachable.rs:9:17: 9:19 -- _3 = move ((_1 as Some).0: Empty); // bb3[1]: scope 0 at $DIR/unreachable.rs:9:17: 9:19 -- StorageLive(_4); // bb3[2]: scope 1 at $DIR/unreachable.rs:10:13: 10:19 -- StorageLive(_5); // bb3[3]: scope 2 at $DIR/unreachable.rs:12:9: 16:10 -- StorageLive(_6); // bb3[4]: scope 2 at $DIR/unreachable.rs:12:12: 12:16 -- _6 = const true; // bb3[5]: scope 2 at $DIR/unreachable.rs:12:12: 12:16 +- StorageLive(_3); // scope 0 at $DIR/unreachable.rs:9:17: 9:19 +- _3 = move ((_1 as Some).0: Empty); // scope 0 at $DIR/unreachable.rs:9:17: 9:19 +- StorageLive(_4); // scope 1 at $DIR/unreachable.rs:10:13: 10:19 +- StorageLive(_5); // scope 2 at $DIR/unreachable.rs:12:9: 16:10 +- StorageLive(_6); // scope 2 at $DIR/unreachable.rs:12:12: 12:16 +- _6 = const true; // scope 2 at $DIR/unreachable.rs:12:12: 12:16 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/unreachable.rs:12:12: 12:16 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -- switchInt(_6) -> [false: bb4, otherwise: bb5]; // bb3[6]: scope 2 at $DIR/unreachable.rs:12:9: 16:10 +- switchInt(_6) -> [false: bb4, otherwise: bb5]; // scope 2 at $DIR/unreachable.rs:12:9: 16:10 - } - - bb4: { -- _4 = const 42i32; // bb4[0]: scope 2 at $DIR/unreachable.rs:15:13: 15:20 +- _4 = const 42i32; // scope 2 at $DIR/unreachable.rs:15:13: 15:20 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/unreachable.rs:15:18: 15:20 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } -- _5 = const (); // bb4[1]: scope 2 at $DIR/unreachable.rs:14:16: 16:10 +- _5 = const (); // scope 2 at $DIR/unreachable.rs:14:16: 16:10 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/unreachable.rs:14:16: 16:10 - // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb6; // bb4[2]: scope 2 at $DIR/unreachable.rs:12:9: 16:10 +- goto -> bb6; // scope 2 at $DIR/unreachable.rs:12:9: 16:10 - } - - bb5: { -- _4 = const 21i32; // bb5[0]: scope 2 at $DIR/unreachable.rs:13:13: 13:20 +- _4 = const 21i32; // scope 2 at $DIR/unreachable.rs:13:13: 13:20 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000015)) - // mir::Constant - // + span: $DIR/unreachable.rs:13:18: 13:20 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000015)) } -- _5 = const (); // bb5[1]: scope 2 at $DIR/unreachable.rs:12:17: 14:10 +- _5 = const (); // scope 2 at $DIR/unreachable.rs:12:17: 14:10 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/unreachable.rs:12:17: 14:10 - // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb6; // bb5[2]: scope 2 at $DIR/unreachable.rs:12:9: 16:10 +- goto -> bb6; // scope 2 at $DIR/unreachable.rs:12:9: 16:10 - } - - bb6: { -- StorageDead(_6); // bb6[0]: scope 2 at $DIR/unreachable.rs:16:9: 16:10 -- StorageDead(_5); // bb6[1]: scope 2 at $DIR/unreachable.rs:16:9: 16:10 -- StorageLive(_7); // bb6[2]: scope 2 at $DIR/unreachable.rs:18:9: 18:21 -- unreachable; // bb6[3]: scope 2 at $DIR/unreachable.rs:18:15: 18:17 +- StorageDead(_6); // scope 2 at $DIR/unreachable.rs:16:9: 16:10 +- StorageDead(_5); // scope 2 at $DIR/unreachable.rs:16:9: 16:10 +- StorageLive(_7); // scope 2 at $DIR/unreachable.rs:18:9: 18:21 +- unreachable; // scope 2 at $DIR/unreachable.rs:18:15: 18:17 } } diff --git a/src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff index 2b3ab80fa0f81..449bea06207d9 100644 --- a/src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff @@ -21,8 +21,8 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30 - _1 = const empty() -> bb1; // bb0[1]: scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30 + StorageLive(_1); // scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30 + _1 = const empty() -> bb1; // scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30 // ty::Const // + ty: fn() -> std::option::Option {empty} // + val: Value(Scalar()) @@ -32,89 +32,89 @@ } bb1: { - _2 = discriminant(_1); // bb1[0]: scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20 - switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // bb1[1]: scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20 + _2 = discriminant(_1); // scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20 + switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20 } bb2: { - _0 = const (); // bb2[0]: scope 0 at $DIR/unreachable_asm.rs:11:5: 23:6 + _0 = const (); // scope 0 at $DIR/unreachable_asm.rs:11:5: 23:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm.rs:11:5: 23:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb2[1]: scope 0 at $DIR/unreachable_asm.rs:24:1: 24:2 - return; // bb2[2]: scope 0 at $DIR/unreachable_asm.rs:24:2: 24:2 + StorageDead(_1); // scope 0 at $DIR/unreachable_asm.rs:24:1: 24:2 + return; // scope 0 at $DIR/unreachable_asm.rs:24:2: 24:2 } bb3: { - StorageLive(_3); // bb3[0]: scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19 - _3 = move ((_1 as Some).0: Empty); // bb3[1]: scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19 - StorageLive(_4); // bb3[2]: scope 1 at $DIR/unreachable_asm.rs:12:13: 12:19 - StorageLive(_5); // bb3[3]: scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 - StorageLive(_6); // bb3[4]: scope 2 at $DIR/unreachable_asm.rs:14:12: 14:16 - _6 = const true; // bb3[5]: scope 2 at $DIR/unreachable_asm.rs:14:12: 14:16 + StorageLive(_3); // scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19 + _3 = move ((_1 as Some).0: Empty); // scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19 + StorageLive(_4); // scope 1 at $DIR/unreachable_asm.rs:12:13: 12:19 + StorageLive(_5); // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 + StorageLive(_6); // scope 2 at $DIR/unreachable_asm.rs:14:12: 14:16 + _6 = const true; // scope 2 at $DIR/unreachable_asm.rs:14:12: 14:16 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/unreachable_asm.rs:14:12: 14:16 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - switchInt(_6) -> [false: bb4, otherwise: bb5]; // bb3[6]: scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 + switchInt(_6) -> [false: bb4, otherwise: bb5]; // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 } bb4: { - _4 = const 42i32; // bb4[0]: scope 2 at $DIR/unreachable_asm.rs:17:13: 17:20 + _4 = const 42i32; // scope 2 at $DIR/unreachable_asm.rs:17:13: 17:20 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/unreachable_asm.rs:17:18: 17:20 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - _5 = const (); // bb4[1]: scope 2 at $DIR/unreachable_asm.rs:16:16: 18:10 + _5 = const (); // scope 2 at $DIR/unreachable_asm.rs:16:16: 18:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm.rs:16:16: 18:10 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb6; // bb4[2]: scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 + goto -> bb6; // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 } bb5: { - _4 = const 21i32; // bb5[0]: scope 2 at $DIR/unreachable_asm.rs:15:13: 15:20 + _4 = const 21i32; // scope 2 at $DIR/unreachable_asm.rs:15:13: 15:20 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000015)) // mir::Constant // + span: $DIR/unreachable_asm.rs:15:18: 15:20 // + literal: Const { ty: i32, val: Value(Scalar(0x00000015)) } - _5 = const (); // bb5[1]: scope 2 at $DIR/unreachable_asm.rs:14:17: 16:10 + _5 = const (); // scope 2 at $DIR/unreachable_asm.rs:14:17: 16:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm.rs:14:17: 16:10 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb6; // bb5[2]: scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 + goto -> bb6; // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 } bb6: { - StorageDead(_6); // bb6[0]: scope 2 at $DIR/unreachable_asm.rs:18:9: 18:10 - StorageDead(_5); // bb6[1]: scope 2 at $DIR/unreachable_asm.rs:18:9: 18:10 - StorageLive(_7); // bb6[2]: scope 2 at $DIR/unreachable_asm.rs:21:9: 21:37 - llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // bb6[3]: scope 3 at $DIR/unreachable_asm.rs:21:18: 21:35 - _7 = const (); // bb6[4]: scope 3 at $DIR/unreachable_asm.rs:21:9: 21:37 + StorageDead(_6); // scope 2 at $DIR/unreachable_asm.rs:18:9: 18:10 + StorageDead(_5); // scope 2 at $DIR/unreachable_asm.rs:18:9: 18:10 + StorageLive(_7); // scope 2 at $DIR/unreachable_asm.rs:21:9: 21:37 + llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // scope 3 at $DIR/unreachable_asm.rs:21:18: 21:35 + _7 = const (); // scope 3 at $DIR/unreachable_asm.rs:21:9: 21:37 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm.rs:21:9: 21:37 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_7); // bb6[5]: scope 2 at $DIR/unreachable_asm.rs:21:36: 21:37 - StorageLive(_8); // bb6[6]: scope 2 at $DIR/unreachable_asm.rs:22:9: 22:21 - unreachable; // bb6[7]: scope 2 at $DIR/unreachable_asm.rs:22:15: 22:17 + StorageDead(_7); // scope 2 at $DIR/unreachable_asm.rs:21:36: 21:37 + StorageLive(_8); // scope 2 at $DIR/unreachable_asm.rs:22:9: 22:21 + unreachable; // scope 2 at $DIR/unreachable_asm.rs:22:15: 22:17 } } diff --git a/src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff index c3760f6a7fccf..a152e1dbe892f 100644 --- a/src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff @@ -24,8 +24,8 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/unreachable_asm_2.rs:11:23: 11:30 - _1 = const empty() -> bb1; // bb0[1]: scope 0 at $DIR/unreachable_asm_2.rs:11:23: 11:30 + StorageLive(_1); // scope 0 at $DIR/unreachable_asm_2.rs:11:23: 11:30 + _1 = const empty() -> bb1; // scope 0 at $DIR/unreachable_asm_2.rs:11:23: 11:30 // ty::Const // + ty: fn() -> std::option::Option {empty} // + val: Value(Scalar()) @@ -35,101 +35,101 @@ } bb1: { - _2 = discriminant(_1); // bb1[0]: scope 0 at $DIR/unreachable_asm_2.rs:11:12: 11:20 - switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // bb1[1]: scope 0 at $DIR/unreachable_asm_2.rs:11:12: 11:20 + _2 = discriminant(_1); // scope 0 at $DIR/unreachable_asm_2.rs:11:12: 11:20 + switchInt(move _2) -> [1isize: bb3, otherwise: bb2]; // scope 0 at $DIR/unreachable_asm_2.rs:11:12: 11:20 } bb2: { - _0 = const (); // bb2[0]: scope 0 at $DIR/unreachable_asm_2.rs:11:5: 25:6 + _0 = const (); // scope 0 at $DIR/unreachable_asm_2.rs:11:5: 25:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:11:5: 25:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb2[1]: scope 0 at $DIR/unreachable_asm_2.rs:26:1: 26:2 - return; // bb2[2]: scope 0 at $DIR/unreachable_asm_2.rs:26:2: 26:2 + StorageDead(_1); // scope 0 at $DIR/unreachable_asm_2.rs:26:1: 26:2 + return; // scope 0 at $DIR/unreachable_asm_2.rs:26:2: 26:2 } bb3: { - StorageLive(_3); // bb3[0]: scope 0 at $DIR/unreachable_asm_2.rs:11:17: 11:19 - _3 = move ((_1 as Some).0: Empty); // bb3[1]: scope 0 at $DIR/unreachable_asm_2.rs:11:17: 11:19 - StorageLive(_4); // bb3[2]: scope 1 at $DIR/unreachable_asm_2.rs:12:13: 12:19 - StorageLive(_5); // bb3[3]: scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 - StorageLive(_6); // bb3[4]: scope 2 at $DIR/unreachable_asm_2.rs:14:12: 14:16 - _6 = const true; // bb3[5]: scope 2 at $DIR/unreachable_asm_2.rs:14:12: 14:16 + StorageLive(_3); // scope 0 at $DIR/unreachable_asm_2.rs:11:17: 11:19 + _3 = move ((_1 as Some).0: Empty); // scope 0 at $DIR/unreachable_asm_2.rs:11:17: 11:19 + StorageLive(_4); // scope 1 at $DIR/unreachable_asm_2.rs:12:13: 12:19 + StorageLive(_5); // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 + StorageLive(_6); // scope 2 at $DIR/unreachable_asm_2.rs:14:12: 14:16 + _6 = const true; // scope 2 at $DIR/unreachable_asm_2.rs:14:12: 14:16 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:14:12: 14:16 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - switchInt(_6) -> [false: bb4, otherwise: bb5]; // bb3[6]: scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 + switchInt(_6) -> [false: bb4, otherwise: bb5]; // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 } bb4: { - StorageLive(_8); // bb4[0]: scope 2 at $DIR/unreachable_asm_2.rs:20:13: 20:41 - llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // bb4[1]: scope 4 at $DIR/unreachable_asm_2.rs:20:22: 20:39 - _8 = const (); // bb4[2]: scope 4 at $DIR/unreachable_asm_2.rs:20:13: 20:41 + StorageLive(_8); // scope 2 at $DIR/unreachable_asm_2.rs:20:13: 20:41 + llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // scope 4 at $DIR/unreachable_asm_2.rs:20:22: 20:39 + _8 = const (); // scope 4 at $DIR/unreachable_asm_2.rs:20:13: 20:41 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:20:13: 20:41 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_8); // bb4[3]: scope 2 at $DIR/unreachable_asm_2.rs:20:40: 20:41 - _4 = const 42i32; // bb4[4]: scope 2 at $DIR/unreachable_asm_2.rs:21:13: 21:20 + StorageDead(_8); // scope 2 at $DIR/unreachable_asm_2.rs:20:40: 20:41 + _4 = const 42i32; // scope 2 at $DIR/unreachable_asm_2.rs:21:13: 21:20 // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:21:18: 21:20 // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } - _5 = const (); // bb4[5]: scope 2 at $DIR/unreachable_asm_2.rs:18:16: 22:10 + _5 = const (); // scope 2 at $DIR/unreachable_asm_2.rs:18:16: 22:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:18:16: 22:10 // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb6; // bb4[6]: scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 -+ unreachable; // bb4[6]: scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 +- goto -> bb6; // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 ++ unreachable; // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 } bb5: { - StorageLive(_7); // bb5[0]: scope 2 at $DIR/unreachable_asm_2.rs:16:13: 16:41 - llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // bb5[1]: scope 3 at $DIR/unreachable_asm_2.rs:16:22: 16:39 - _7 = const (); // bb5[2]: scope 3 at $DIR/unreachable_asm_2.rs:16:13: 16:41 + StorageLive(_7); // scope 2 at $DIR/unreachable_asm_2.rs:16:13: 16:41 + llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // scope 3 at $DIR/unreachable_asm_2.rs:16:22: 16:39 + _7 = const (); // scope 3 at $DIR/unreachable_asm_2.rs:16:13: 16:41 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:16:13: 16:41 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_7); // bb5[3]: scope 2 at $DIR/unreachable_asm_2.rs:16:40: 16:41 - _4 = const 21i32; // bb5[4]: scope 2 at $DIR/unreachable_asm_2.rs:17:13: 17:20 + StorageDead(_7); // scope 2 at $DIR/unreachable_asm_2.rs:16:40: 16:41 + _4 = const 21i32; // scope 2 at $DIR/unreachable_asm_2.rs:17:13: 17:20 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000015)) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:17:18: 17:20 // + literal: Const { ty: i32, val: Value(Scalar(0x00000015)) } - _5 = const (); // bb5[5]: scope 2 at $DIR/unreachable_asm_2.rs:14:17: 18:10 + _5 = const (); // scope 2 at $DIR/unreachable_asm_2.rs:14:17: 18:10 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_asm_2.rs:14:17: 18:10 // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb6; // bb5[6]: scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 +- goto -> bb6; // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 - } - - bb6: { -- StorageDead(_6); // bb6[0]: scope 2 at $DIR/unreachable_asm_2.rs:22:9: 22:10 -- StorageDead(_5); // bb6[1]: scope 2 at $DIR/unreachable_asm_2.rs:22:9: 22:10 -- StorageLive(_9); // bb6[2]: scope 2 at $DIR/unreachable_asm_2.rs:24:9: 24:21 -- unreachable; // bb6[3]: scope 2 at $DIR/unreachable_asm_2.rs:24:15: 24:17 -+ unreachable; // bb5[6]: scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 +- StorageDead(_6); // scope 2 at $DIR/unreachable_asm_2.rs:22:9: 22:10 +- StorageDead(_5); // scope 2 at $DIR/unreachable_asm_2.rs:22:9: 22:10 +- StorageLive(_9); // scope 2 at $DIR/unreachable_asm_2.rs:24:9: 24:21 +- unreachable; // scope 2 at $DIR/unreachable_asm_2.rs:24:15: 24:17 ++ unreachable; // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 } } diff --git a/src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff index 2fe0c8dc1e785..ff23baf0b4e9f 100644 --- a/src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff @@ -18,16 +18,16 @@ } bb0: { - StorageLive(_1); // bb0[0]: scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10 - _1 = const true; // bb0[1]: scope 0 at $DIR/unreachable_diverging.rs:13:13: 13:17 + StorageLive(_1); // scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10 + _1 = const true; // scope 0 at $DIR/unreachable_diverging.rs:13:13: 13:17 // ty::Const // + ty: bool // + val: Value(Scalar(0x01)) // mir::Constant // + span: $DIR/unreachable_diverging.rs:13:13: 13:17 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - StorageLive(_2); // bb0[2]: scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32 - _2 = const empty() -> bb1; // bb0[3]: scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32 + StorageLive(_2); // scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32 + _2 = const empty() -> bb1; // scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32 // ty::Const // + ty: fn() -> std::option::Option {empty} // + val: Value(Scalar()) @@ -37,47 +37,47 @@ } bb1: { - _3 = discriminant(_2); // bb1[0]: scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22 - switchInt(move _3) -> [1isize: bb3, otherwise: bb2]; // bb1[1]: scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22 + _3 = discriminant(_2); // scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22 + switchInt(move _3) -> [1isize: bb3, otherwise: bb2]; // scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22 } bb2: { - _0 = const (); // bb2[0]: scope 1 at $DIR/unreachable_diverging.rs:14:5: 19:6 + _0 = const (); // scope 1 at $DIR/unreachable_diverging.rs:14:5: 19:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/unreachable_diverging.rs:14:5: 19:6 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // bb2[1]: scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2 - StorageDead(_2); // bb2[2]: scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2 - return; // bb2[3]: scope 0 at $DIR/unreachable_diverging.rs:20:2: 20:2 + StorageDead(_1); // scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2 + StorageDead(_2); // scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2 + return; // scope 0 at $DIR/unreachable_diverging.rs:20:2: 20:2 } bb3: { - StorageLive(_4); // bb3[0]: scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 - _4 = move ((_2 as Some).0: Empty); // bb3[1]: scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 - StorageLive(_5); // bb3[2]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 - StorageLive(_6); // bb3[3]: scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13 - _6 = _1; // bb3[4]: scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13 -- switchInt(_6) -> [false: bb4, otherwise: bb5]; // bb3[5]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 -+ goto -> bb4; // bb3[5]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 + StorageLive(_4); // scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 + _4 = move ((_2 as Some).0: Empty); // scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21 + StorageLive(_5); // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 + StorageLive(_6); // scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13 + _6 = _1; // scope 2 at $DIR/unreachable_diverging.rs:15:12: 15:13 +- switchInt(_6) -> [false: bb4, otherwise: bb5]; // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 ++ goto -> bb4; // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 } bb4: { -- _5 = const (); // bb4[0]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 -+ _5 = const loop_forever() -> bb5; // bb4[0]: scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 +- _5 = const (); // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 ++ _5 = const loop_forever() -> bb5; // scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/unreachable_diverging.rs:15:9: 17:10 - // + literal: Const { ty: (), val: Value(Scalar()) } -- goto -> bb6; // bb4[1]: scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 +- goto -> bb6; // scope 2 at $DIR/unreachable_diverging.rs:15:9: 17:10 - } - - bb5: { -- _5 = const loop_forever() -> bb6; // bb5[0]: scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 +- _5 = const loop_forever() -> bb6; // scope 2 at $DIR/unreachable_diverging.rs:16:13: 16:27 - // ty::Const // + ty: fn() {loop_forever} // + val: Value(Scalar()) @@ -87,15 +87,11 @@ } - bb6: { -- StorageDead(_6); // bb6[0]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 -- StorageDead(_5); // bb6[1]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 -- StorageLive(_7); // bb6[2]: scope 2 at $DIR/unreachable_diverging.rs:18:9: 18:22 -- unreachable; // bb6[3]: scope 2 at $DIR/unreachable_diverging.rs:18:15: 18:19 + bb5: { -+ StorageDead(_6); // bb5[0]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 -+ StorageDead(_5); // bb5[1]: scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 -+ StorageLive(_7); // bb5[2]: scope 2 at $DIR/unreachable_diverging.rs:18:9: 18:22 -+ unreachable; // bb5[3]: scope 2 at $DIR/unreachable_diverging.rs:18:15: 18:19 + StorageDead(_6); // scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 + StorageDead(_5); // scope 2 at $DIR/unreachable_diverging.rs:17:9: 17:10 + StorageLive(_7); // scope 2 at $DIR/unreachable_diverging.rs:18:9: 18:22 + unreachable; // scope 2 at $DIR/unreachable_diverging.rs:18:15: 18:19 } } diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir b/src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir index 3dc8cea1fe8e1..c800ccb1ae51f 100644 --- a/src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir +++ b/src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir @@ -4,17 +4,17 @@ E::V::{{constant}}#0: isize = { let mut _0: isize; // return place in scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 bb0: { - _0 = const 5isize; // bb0[0]: scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 + _0 = const 5isize; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 // ty::Const // + ty: isize // + val: Value(Scalar(0x00000005)) // mir::Constant // + span: $DIR/unusual-item-types.rs:22:9: 22:10 // + literal: Const { ty: isize, val: Value(Scalar(0x00000005)) } - return; // bb0[1]: scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 + return; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 + resume; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 } } diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir b/src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir index d6ce06246a16d..832f18e14c25d 100644 --- a/src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir +++ b/src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir @@ -4,8 +4,8 @@ fn Test::X(_1: usize) -> Test { let mut _0: Test; // return place in scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 bb0: { - ((_0 as X).0: usize) = move _1; // bb0[0]: scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 - discriminant(_0) = 0; // bb0[1]: scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 - return; // bb0[2]: scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 + ((_0 as X).0: usize) = move _1; // scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 + discriminant(_0) = 0; // scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 + return; // scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 } } diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir index b78480e774c65..28f14399a6309 100644 --- a/src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir +++ b/src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir @@ -6,36 +6,36 @@ fn std::intrinsics::drop_in_place(_1: *mut std::vec::Vec) -> () { let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL bb0: { - goto -> bb7; // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb7; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb1: { - return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + return; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb2 (cleanup): { - resume; // bb2[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + resume; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb3: { - goto -> bb1; // bb3[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb1; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb4 (cleanup): { - goto -> bb2; // bb4[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb2; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb5 (cleanup): { - drop(((*_1).0: alloc::raw_vec::RawVec)) -> bb4; // bb5[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop(((*_1).0: alloc::raw_vec::RawVec)) -> bb4; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb6: { - drop(((*_1).0: alloc::raw_vec::RawVec)) -> [return: bb3, unwind: bb4]; // bb6[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop(((*_1).0: alloc::raw_vec::RawVec)) -> [return: bb3, unwind: bb4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb7: { - _2 = &mut (*_1); // bb7[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _3 = const as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // bb7[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _2 = &mut (*_1); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _3 = const as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: for<'r> fn(&'r mut std::vec::Vec) { as std::ops::Drop>::drop} // + val: Value(Scalar()) diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir index 9f65819bcf8d3..f4a5cc0b3279a 100644 --- a/src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir +++ b/src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir @@ -4,17 +4,17 @@ const ::ASSOCIATED_CONSTANT: i32 = let mut _0: i32; // return place in scope 0 at $DIR/unusual-item-types.rs:10:32: 10:35 bb0: { - _0 = const 2i32; // bb0[0]: scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39 + _0 = const 2i32; // scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/unusual-item-types.rs:10:38: 10:39 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - return; // bb0[1]: scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 + return; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 + resume; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 } } diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir b/src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir index 8434ff47f1c64..e635cd2b01bbd 100644 --- a/src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir +++ b/src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir @@ -4,17 +4,17 @@ E::V::{{constant}}#0: isize = { let mut _0: isize; // return place in scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 bb0: { - _0 = const 5isize; // bb0[0]: scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 + _0 = const 5isize; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 // ty::Const // + ty: isize // + val: Value(Scalar(0x0000000000000005)) // mir::Constant // + span: $DIR/unusual-item-types.rs:22:9: 22:10 // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000005)) } - return; // bb0[1]: scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 + return; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 + resume; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 } } diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir b/src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir index d6ce06246a16d..832f18e14c25d 100644 --- a/src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir +++ b/src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir @@ -4,8 +4,8 @@ fn Test::X(_1: usize) -> Test { let mut _0: Test; // return place in scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 bb0: { - ((_0 as X).0: usize) = move _1; // bb0[0]: scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 - discriminant(_0) = 0; // bb0[1]: scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 - return; // bb0[2]: scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 + ((_0 as X).0: usize) = move _1; // scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 + discriminant(_0) = 0; // scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 + return; // scope 0 at $DIR/unusual-item-types.rs:16:5: 16:13 } } diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/unusual-item-types/64bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir index b78480e774c65..28f14399a6309 100644 --- a/src/test/mir-opt/unusual-item-types/64bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir +++ b/src/test/mir-opt/unusual-item-types/64bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir @@ -6,36 +6,36 @@ fn std::intrinsics::drop_in_place(_1: *mut std::vec::Vec) -> () { let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL bb0: { - goto -> bb7; // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb7; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb1: { - return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + return; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb2 (cleanup): { - resume; // bb2[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + resume; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb3: { - goto -> bb1; // bb3[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb1; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb4 (cleanup): { - goto -> bb2; // bb4[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + goto -> bb2; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb5 (cleanup): { - drop(((*_1).0: alloc::raw_vec::RawVec)) -> bb4; // bb5[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop(((*_1).0: alloc::raw_vec::RawVec)) -> bb4; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb6: { - drop(((*_1).0: alloc::raw_vec::RawVec)) -> [return: bb3, unwind: bb4]; // bb6[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + drop(((*_1).0: alloc::raw_vec::RawVec)) -> [return: bb3, unwind: bb4]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL } bb7: { - _2 = &mut (*_1); // bb7[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL - _3 = const as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // bb7[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _2 = &mut (*_1); // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL + _3 = const as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL // ty::Const // + ty: for<'r> fn(&'r mut std::vec::Vec) { as std::ops::Drop>::drop} // + val: Value(Scalar()) diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir index 9f65819bcf8d3..f4a5cc0b3279a 100644 --- a/src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir +++ b/src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir @@ -4,17 +4,17 @@ const ::ASSOCIATED_CONSTANT: i32 = let mut _0: i32; // return place in scope 0 at $DIR/unusual-item-types.rs:10:32: 10:35 bb0: { - _0 = const 2i32; // bb0[0]: scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39 + _0 = const 2i32; // scope 0 at $DIR/unusual-item-types.rs:10:38: 10:39 // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000002)) // mir::Constant // + span: $DIR/unusual-item-types.rs:10:38: 10:39 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - return; // bb0[1]: scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 + return; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 } bb1 (cleanup): { - resume; // bb1[0]: scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 + resume; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 } } diff --git a/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir index 5d9c1f6b230d9..3ddf82c2fb2c9 100644 --- a/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir +++ b/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir @@ -9,10 +9,10 @@ fn while_loop(_1: bool) -> () { let mut _5: bool; // in scope 0 at $DIR/while-storage.rs:11:21: 11:22 bb0: { - StorageLive(_2); // bb0[0]: scope 0 at $DIR/while-storage.rs:10:11: 10:22 - StorageLive(_3); // bb0[1]: scope 0 at $DIR/while-storage.rs:10:20: 10:21 - _3 = _1; // bb0[2]: scope 0 at $DIR/while-storage.rs:10:20: 10:21 - _2 = const get_bool(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/while-storage.rs:10:11: 10:22 + StorageLive(_2); // scope 0 at $DIR/while-storage.rs:10:11: 10:22 + StorageLive(_3); // scope 0 at $DIR/while-storage.rs:10:20: 10:21 + _3 = _1; // scope 0 at $DIR/while-storage.rs:10:20: 10:21 + _2 = const get_bool(move _3) -> bb1; // scope 0 at $DIR/while-storage.rs:10:11: 10:22 // ty::Const // + ty: fn(bool) -> bool {get_bool} // + val: Value(Scalar()) @@ -22,26 +22,26 @@ fn while_loop(_1: bool) -> () { } bb1: { - StorageDead(_3); // bb1[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22 - switchInt(_2) -> [false: bb2, otherwise: bb3]; // bb1[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6 + StorageDead(_3); // scope 0 at $DIR/while-storage.rs:10:21: 10:22 + switchInt(_2) -> [false: bb2, otherwise: bb3]; // scope 0 at $DIR/while-storage.rs:10:5: 14:6 } bb2: { - _0 = const (); // bb2[0]: scope 0 at $DIR/while-storage.rs:10:5: 14:6 + _0 = const (); // scope 0 at $DIR/while-storage.rs:10:5: 14:6 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/while-storage.rs:10:5: 14:6 // + literal: Const { ty: (), val: Value(Scalar()) } - goto -> bb7; // bb2[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6 + goto -> bb7; // scope 0 at $DIR/while-storage.rs:10:5: 14:6 } bb3: { - StorageLive(_4); // bb3[0]: scope 0 at $DIR/while-storage.rs:11:12: 11:23 - StorageLive(_5); // bb3[1]: scope 0 at $DIR/while-storage.rs:11:21: 11:22 - _5 = _1; // bb3[2]: scope 0 at $DIR/while-storage.rs:11:21: 11:22 - _4 = const get_bool(move _5) -> bb4; // bb3[3]: scope 0 at $DIR/while-storage.rs:11:12: 11:23 + StorageLive(_4); // scope 0 at $DIR/while-storage.rs:11:12: 11:23 + StorageLive(_5); // scope 0 at $DIR/while-storage.rs:11:21: 11:22 + _5 = _1; // scope 0 at $DIR/while-storage.rs:11:21: 11:22 + _4 = const get_bool(move _5) -> bb4; // scope 0 at $DIR/while-storage.rs:11:12: 11:23 // ty::Const // + ty: fn(bool) -> bool {get_bool} // + val: Value(Scalar()) @@ -51,30 +51,30 @@ fn while_loop(_1: bool) -> () { } bb4: { - StorageDead(_5); // bb4[0]: scope 0 at $DIR/while-storage.rs:11:22: 11:23 - switchInt(_4) -> [false: bb5, otherwise: bb6]; // bb4[1]: scope 0 at $DIR/while-storage.rs:11:9: 13:10 + StorageDead(_5); // scope 0 at $DIR/while-storage.rs:11:22: 11:23 + switchInt(_4) -> [false: bb5, otherwise: bb6]; // scope 0 at $DIR/while-storage.rs:11:9: 13:10 } bb5: { - StorageDead(_4); // bb5[0]: scope 0 at $DIR/while-storage.rs:14:5: 14:6 - StorageDead(_2); // bb5[1]: scope 0 at $DIR/while-storage.rs:14:5: 14:6 - goto -> bb0; // bb5[2]: scope 0 at $DIR/while-storage.rs:10:5: 14:6 + StorageDead(_4); // scope 0 at $DIR/while-storage.rs:14:5: 14:6 + StorageDead(_2); // scope 0 at $DIR/while-storage.rs:14:5: 14:6 + goto -> bb0; // scope 0 at $DIR/while-storage.rs:10:5: 14:6 } bb6: { - _0 = const (); // bb6[0]: scope 0 at $DIR/while-storage.rs:12:13: 12:18 + _0 = const (); // scope 0 at $DIR/while-storage.rs:12:13: 12:18 // ty::Const // + ty: () // + val: Value(Scalar()) // mir::Constant // + span: $DIR/while-storage.rs:12:13: 12:18 // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_4); // bb6[1]: scope 0 at $DIR/while-storage.rs:14:5: 14:6 - goto -> bb7; // bb6[2]: scope 0 at $DIR/while-storage.rs:12:13: 12:18 + StorageDead(_4); // scope 0 at $DIR/while-storage.rs:14:5: 14:6 + goto -> bb7; // scope 0 at $DIR/while-storage.rs:12:13: 12:18 } bb7: { - StorageDead(_2); // bb7[0]: scope 0 at $DIR/while-storage.rs:14:5: 14:6 - return; // bb7[1]: scope 0 at $DIR/while-storage.rs:15:2: 15:2 + StorageDead(_2); // scope 0 at $DIR/while-storage.rs:14:5: 14:6 + return; // scope 0 at $DIR/while-storage.rs:15:2: 15:2 } }