diff --git a/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs index c3dbac08ed800..0294a7cd7aff1 100644 --- a/src/librustc_mir/util/pretty.rs +++ b/src/librustc_mir/util/pretty.rs @@ -387,20 +387,30 @@ impl Visitor<'tcx> for ExtraComments<'tcx> { fn visit_constant(&mut self, constant: &Constant<'tcx>, location: Location) { self.super_constant(constant, location); let Constant { span, user_ty, literal } = constant; - self.push("mir::Constant"); - self.push(&format!("+ span: {}", self.tcx.sess.source_map().span_to_string(*span))); - if let Some(user_ty) = user_ty { - self.push(&format!("+ user_ty: {:?}", user_ty)); + match literal.ty.kind { + ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {} + _ => { + self.push("mir::Constant"); + self.push(&format!("+ span: {}", self.tcx.sess.source_map().span_to_string(*span))); + if let Some(user_ty) = user_ty { + self.push(&format!("+ user_ty: {:?}", user_ty)); + } + self.push(&format!("+ literal: {:?}", literal)); + } } - self.push(&format!("+ literal: {:?}", literal)); } fn visit_const(&mut self, constant: &&'tcx ty::Const<'tcx>, _: Location) { self.super_const(constant); let ty::Const { ty, val, .. } = constant; - self.push("ty::Const"); - self.push(&format!("+ ty: {:?}", ty)); - self.push(&format!("+ val: {:?}", val)); + match ty.kind { + ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {} + _ => { + self.push("ty::Const"); + self.push(&format!("+ ty: {:?}", ty)); + self.push(&format!("+ val: {:?}", val)); + } + } } fn visit_rvalue(&mut self, rvalue: &Rvalue<'tcx>, location: Location) { diff --git a/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir index 07793b3598f9e..d9b5094f1e198 100644 --- a/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir @@ -129,23 +129,11 @@ fn address_of_reborrow() -> () { 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 0_i32; 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; // 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 0_i32; 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; // 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 diff --git a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit index 2a3a18d6c5b5d..895824947e93d 100644 --- a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit +++ b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit @@ -26,32 +26,8 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 _1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/array-index-is-temporary.rs:13:18: 13:20 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002b)) - // mir::Constant - // + span: $DIR/array-index-is-temporary.rs:13:22: 13:24 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002b)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002c)) - // mir::Constant - // + span: $DIR/array-index-is-temporary.rs:13:26: 13:28 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) } StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 _2 = const 1_usize; // 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); // 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 diff --git a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit index 093c170cf7a3a..895824947e93d 100644 --- a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit +++ b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit @@ -26,32 +26,8 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 _1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/array-index-is-temporary.rs:13:18: 13:20 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002b)) - // mir::Constant - // + span: $DIR/array-index-is-temporary.rs:13:22: 13:24 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002b)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002c)) - // mir::Constant - // + span: $DIR/array-index-is-temporary.rs:13:26: 13:28 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) } StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 _2 = const 1_usize; // 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); // 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 diff --git a/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir index de423cd907afe..4bb91169cb584 100644 --- a/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir @@ -28,12 +28,6 @@ fn main() -> () { bb0: { 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); // 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 diff --git a/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir index 54e01dceb5099..9e3f6cff4b331 100644 --- a/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir @@ -22,18 +22,6 @@ fn main() -> () { // + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc0)) } StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:6:9: 6:10 _2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:6:13: 6:24 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x05)) - // mir::Constant - // + span: $DIR/byte_slice.rs:6:14: 6:17 - // + literal: Const { ty: u8, val: Value(Scalar(0x05)) } - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x78)) - // mir::Constant - // + span: $DIR/byte_slice.rs:6:19: 6:23 - // + literal: Const { ty: u8, val: Value(Scalar(0x78)) } _0 = const (); // scope 0 at $DIR/byte_slice.rs:4:11: 7:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit index 65db967fe5f81..61e987cc68516 100644 --- a/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit +++ b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit @@ -29,20 +29,8 @@ 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 0_usize; // 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); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + _4 = const 2_usize; // 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); // 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 } @@ -53,20 +41,8 @@ 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 1_usize; // 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); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + _8 = const 2_usize; // 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); // 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 } diff --git a/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit index 712c4eb230c7e..61e987cc68516 100644 --- a/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit +++ b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit @@ -29,20 +29,8 @@ 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 0_usize; // 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); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17 + _4 = const 2_usize; // 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); // 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 } @@ -53,20 +41,8 @@ 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 1_usize; // 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); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17 + _8 = const 2_usize; // 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); // 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 } diff --git a/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff b/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff index 6992abae6c2be..f44025bd523b2 100644 --- a/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff @@ -15,45 +15,12 @@ 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.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/aggregate.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } (_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/aggregate.rs:5:17: 5:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } (_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/aggregate.rs:5:20: 5:21 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - _2 = (_3.1: i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:24 - _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:28 + _2 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:24 - // ty::Const - // + ty: i32 -- // + val: Value(Scalar(0x00000000)) -+ // + val: Value(Scalar(0x00000001)) - // mir::Constant -- // + span: $DIR/aggregate.rs:5:27: 5:28 -- // + 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 1_i32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit index bbd6c8042f196..9b456b6529ad1 100644 --- a/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit @@ -16,84 +16,18 @@ 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 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/array_index.rs:5:19: 5:20 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/array_index.rs:5:22: 5:23 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/array_index.rs:5:25: 5:26 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/array_index.rs:5:28: 5:29 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32 _3 = const 2_usize; // 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 4_usize; // 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); // 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 {}", const 4_usize, const 2_usize) -> bb1; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000002)) -+ // mir::Constant -+ // + span: $DIR/array_index.rs:5:18: 5:33 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } } bb1: { - _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + _1 = const 2_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit index d9096e5f3f13e..9b456b6529ad1 100644 --- a/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit @@ -16,84 +16,18 @@ 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 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/array_index.rs:5:19: 5:20 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/array_index.rs:5:22: 5:23 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/array_index.rs:5:25: 5:26 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/array_index.rs:5:28: 5:29 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32 _3 = const 2_usize; // 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 4_usize; // 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); // 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 {}", const 4_usize, const 2_usize) -> bb1; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000002)) -+ // mir::Constant -+ // + span: $DIR/array_index.rs:5:18: 5:33 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } } bb1: { - _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33 + _1 = const 2_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff index 4bd4bb0dd7dd4..cb3951c162378 100644 --- a/src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff @@ -20,119 +20,30 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:4:9: 4:10 _1 = const 0_i32; // scope 0 at $DIR/bad_op_div_by_zero.rs:4:13: 4:14 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/bad_op_div_by_zero.rs:4:13: 4:14 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageLive(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:9: 5:11 StorageLive(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19 - _3 = _1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19 - _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant -- // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + span: $DIR/bad_op_div_by_zero.rs:5:18: 5:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - assert(!move _4, "attempt to divide {} by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 ++ _3 = const 0_i32; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19 + _4 = const true; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } + assert(!const true, "attempt to divide {} by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } } bb1: { - _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ _5 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0xffffffff)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -- // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) } - _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ _6 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0x00000001)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // mir::Constant -- // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15 -- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ _7 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0x80000000)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -- // + literal: Const { ty: i32, val: Value(Scalar(0x80000000)) } - _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - assert(!move _7, "attempt to compute `{} / {}` which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } ++ _5 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 ++ _6 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 ++ _7 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 + assert(!const false, "attempt to compute `{} / {}` which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } } bb2: { - _2 = Div(const 1_i32, move _3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 + _2 = Div(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageDead(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19 _0 = const (); // scope 0 at $DIR/bad_op_div_by_zero.rs:3:11: 6:2 // ty::Const diff --git a/src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff index ecd030e32b4ee..d0757aa8a851b 100644 --- a/src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff @@ -20,119 +20,30 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:4:9: 4:10 _1 = const 0_i32; // scope 0 at $DIR/bad_op_mod_by_zero.rs:4:13: 4:14 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/bad_op_mod_by_zero.rs:4:13: 4:14 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageLive(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:9: 5:11 StorageLive(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19 - _3 = _1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19 - _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant -- // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:18: 5:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - assert(!move _4, "attempt to calculate the remainder of {} with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 ++ _3 = const 0_i32; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19 + _4 = const true; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } + assert(!const true, "attempt to calculate the remainder of {} with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } } bb1: { - _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ _5 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0xffffffff)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -- // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) } - _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ _6 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0x00000001)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // mir::Constant -- // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15 -- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ _7 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0x80000000)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -- // + literal: Const { ty: i32, val: Value(Scalar(0x80000000)) } - _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - assert(!move _7, "attempt to compute the remainder of `{} % {}` which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } ++ _5 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 ++ _6 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 ++ _7 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 + assert(!const false, "attempt to compute the remainder of `{} % {}` which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } } bb2: { - _2 = Rem(const 1_i32, move _3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 + _2 = Rem(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageDead(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19 _0 = const (); // scope 0 at $DIR/bad_op_mod_by_zero.rs:3:11: 6:2 // ty::Const diff --git a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit index 2b5010759d750..6584bcddc47b2 100644 --- a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit @@ -40,29 +40,11 @@ StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15 StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24 _6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } _7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 - _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 - assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 + _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000003)) -+ // mir::Constant -+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } + assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000003)) -+ // mir::Constant -+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } } bb1: { diff --git a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit index 301aaf2924761..6584bcddc47b2 100644 --- a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit @@ -40,29 +40,11 @@ StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15 StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24 _6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000003)) - // mir::Constant - // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } _7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 - _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 - assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 + _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000003)) -+ // mir::Constant -+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } + assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000003)) -+ // mir::Constant -+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } } bb1: { diff --git a/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff b/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff index b8f0ad4d434cb..8a6d16a3a15c1 100644 --- a/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff +++ b/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff @@ -16,35 +16,15 @@ _4 = _2; // scope 0 at $DIR/boolean_identities.rs:5:6: 5:7 - _3 = BitOr(move _4, const true); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15 + _3 = const true; // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant -- // + span: $DIR/boolean_identities.rs:5:10: 5:14 -+ // + span: $DIR/boolean_identities.rs:5:5: 5:15 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } StorageDead(_4); // scope 0 at $DIR/boolean_identities.rs:5:14: 5:15 StorageLive(_5); // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29 StorageLive(_6); // scope 0 at $DIR/boolean_identities.rs:5:19: 5:20 _6 = _1; // scope 0 at $DIR/boolean_identities.rs:5:19: 5:20 - _5 = BitAnd(move _6, const false); // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29 + _5 = const false; // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant -- // + span: $DIR/boolean_identities.rs:5:23: 5:28 -+ // + span: $DIR/boolean_identities.rs:5:18: 5:29 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } StorageDead(_6); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29 - _0 = BitAnd(move _3, move _5); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:29 + _0 = const false; // scope 0 at $DIR/boolean_identities.rs:5:5: 5:29 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/boolean_identities.rs:5:5: 5:29 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } StorageDead(_5); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29 StorageDead(_3); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29 return; // scope 0 at $DIR/boolean_identities.rs:6:2: 6:2 diff --git a/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff index f271188ebfdb0..aa47c645da589 100644 --- a/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff @@ -18,22 +18,10 @@ 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 42_i32; // 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; // 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 0_i32); // 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); // 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 } diff --git a/src/test/mir-opt/const_prop/cast.main.ConstProp.diff b/src/test/mir-opt/const_prop/cast.main.ConstProp.diff index 54af804d19b00..895df6ee4cb39 100644 --- a/src/test/mir-opt/const_prop/cast.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/cast.main.ConstProp.diff @@ -16,29 +16,9 @@ StorageLive(_1); // scope 0 at $DIR/cast.rs:4:9: 4:10 - _1 = const 42_u8 as u32 (Misc); // scope 0 at $DIR/cast.rs:4:13: 4:24 + _1 = const 42_u32; // 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); // scope 1 at $DIR/cast.rs:6:9: 6:10 + StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10 - _2 = const 42_u32 as u8 (Misc); // scope 1 at $DIR/cast.rs:6:13: 6:24 -- // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant -- // + 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); // scope 1 at $DIR/cast.rs:6:9: 6:10 + _2 = const 42_u8; // 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 (); // scope 0 at $DIR/cast.rs:3:11: 7:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff b/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff index e3690d7129497..9510f0dad34e1 100644 --- a/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff @@ -12,57 +12,14 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/checked_add.rs:5:9: 5:10 - _2 = CheckedAdd(const 1_u32, const 1_u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 -+ _2 = (const 2_u32, const false); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 - // ty::Const - // + ty: u32 -- // + val: Value(Scalar(0x00000001)) -+ // + val: Value(Scalar(0x00000002)) - // mir::Constant -- // + span: $DIR/checked_add.rs:5:18: 5:19 -- // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } -+ // + span: $DIR/checked_add.rs:5:18: 5:23 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - // ty::Const -- // + ty: u32 -- // + val: Value(Scalar(0x00000001)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // 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 compute `{} + {}` which would overflow", const 1_u32, const 1_u32) -> 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)) } ++ _2 = (const 2_u32, const false); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 + assert(!const false, "attempt to compute `{} + {}` which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/checked_add.rs:5:18: 5:23 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/checked_add.rs:5:18: 5:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/checked_add.rs:5:22: 5:23 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } } bb1: { - _1 = move (_2.0: u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23 + _1 = const 2_u32; // 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 (); // scope 0 at $DIR/checked_add.rs:4:11: 6:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff index 474b9ffefbadc..e004b29f504f0 100644 --- a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff +++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff @@ -9,23 +9,9 @@ bb0: { 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(WithOptConstParam { did: DefId(0:4 ~ control_flow_simplification[317d]::NeedsDrop[0]::NEEDS[0]), const_param_did: None }, [bool], None) -+ // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/control-flow-simplification.rs:12:8: 12:21 -- // + literal: Const { ty: bool, val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ control_flow_simplification[317d]::NeedsDrop[0]::NEEDS[0]), const_param_did: None }, [bool], None) } - 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)) } ++ _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21 + 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)) -+ // mir::Constant -+ // + span: $DIR/control-flow-simplification.rs:12:5: 14:6 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } } bb1: { diff --git a/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit index be9b24bfde8aa..f114eab1e0f84 100644 --- a/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit @@ -16,39 +16,15 @@ StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64 StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44 ((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:39: 11:43 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44 - _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31 - switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 + _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x00000001)) -+ // mir::Constant -+ // + span: $DIR/discriminant.rs:11:21: 11:31 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) } + switchInt(const 1_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x00000001)) -+ // mir::Constant -+ // + span: $DIR/discriminant.rs:11:21: 11:31 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) } } bb1: { _2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000000a)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:59: 11:61 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64 } @@ -58,23 +34,11 @@ bb3: { _2 = const 42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:47: 11:49 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64 } bb4: { _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:67: 11:68 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68 StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69 _0 = const (); // scope 0 at $DIR/discriminant.rs:10:11: 12:2 diff --git a/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit index 05b57a6c28075..f114eab1e0f84 100644 --- a/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit @@ -16,39 +16,15 @@ StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64 StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44 ((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:39: 11:43 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44 - _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31 - switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 + _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x0000000000000001)) -+ // mir::Constant -+ // + span: $DIR/discriminant.rs:11:21: 11:31 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) } + switchInt(const 1_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x0000000000000001)) -+ // mir::Constant -+ // + span: $DIR/discriminant.rs:11:21: 11:31 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) } } bb1: { _2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000000a)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:59: 11:61 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64 } @@ -58,23 +34,11 @@ bb3: { _2 = const 42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:47: 11:49 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64 } bb4: { _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/discriminant.rs:11:67: 11:68 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68 StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69 _0 = const (); // scope 0 at $DIR/discriminant.rs:10:11: 12:2 diff --git a/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff b/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff index 57906b1cabddb..fde3c1244ea58 100644 --- a/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff @@ -14,65 +14,16 @@ 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 2_u32 as u8 (Misc); // scope 0 at $DIR/indirect.rs:5:13: 5:25 -+ _2 = const 2_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:25 - // ty::Const -- // + ty: u32 -- // + val: Value(Scalar(0x00000002)) -+ // + ty: u8 -+ // + val: Value(Scalar(0x02)) - // mir::Constant -- // + span: $DIR/indirect.rs:5:14: 5:18 -- // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - _3 = CheckedAdd(_2, const 1_u8); // 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 3_u8, const false); // scope 0 at $DIR/indirect.rs:5:13: 5:29 - // ty::Const - // + ty: u8 -- // + val: Value(Scalar(0x01)) -+ // + val: Value(Scalar(0x03)) - // 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 compute `{} + {}` which would overflow", move _2, const 1_u8) -> 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 -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/indirect.rs:5:13: 5:29 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } ++ _2 = const 2_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:25 ++ _3 = (const 3_u8, const false); // scope 0 at $DIR/indirect.rs:5:13: 5:29 + assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_u8, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/indirect.rs:5:13: 5:29 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: u8 -+ // + val: Value(Scalar(0x02)) -+ // mir::Constant -+ // + span: $DIR/indirect.rs:5:13: 5:29 -+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } -+ // ty::Const -+ // + ty: u8 - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/indirect.rs:5:28: 5:29 - // + literal: Const { ty: u8, val: Value(Scalar(0x01)) } } bb1: { - _1 = move (_3.0: u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29 + _1 = const 3_u8; // 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); // scope 0 at $DIR/indirect.rs:5:28: 5:29 _0 = const (); // scope 0 at $DIR/indirect.rs:4:11: 6:2 // ty::Const diff --git a/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff index 59e5b207f120c..236cbfe63036d 100644 --- a/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff @@ -20,19 +20,7 @@ + // + span: $DIR/issue-66971.rs:16:12: 16:22 + // + literal: Const { ty: (), val: Value(Scalar()) } (_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/issue-66971.rs:16:17: 16:18 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } (_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/issue-66971.rs:16:20: 16:21 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } 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 diff --git a/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff index d3e5e9fe5b422..8b47f66a1178b 100644 --- a/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff @@ -12,33 +12,9 @@ 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.0: u8) = const 1_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/issue-67019.rs:11:12: 11:13 - // + literal: Const { ty: u8, val: Value(Scalar(0x01)) } (_3.1: u8) = const 2_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x02)) - // mir::Constant - // + span: $DIR/issue-67019.rs:11:15: 11:16 - // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } - (_2.0: (u8, u8)) = move _3; // scope 0 at $DIR/issue-67019.rs:11:10: 11:19 + (_2.0: (u8, u8)) = (const 1_u8, const 2_u8); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19 -+ // ty::Const -+ // + ty: u8 -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/issue-67019.rs:11:10: 11:19 -+ // + literal: Const { ty: u8, val: Value(Scalar(0x01)) } -+ // ty::Const -+ // + ty: u8 -+ // + val: Value(Scalar(0x02)) -+ // mir::Constant -+ // + span: $DIR/issue-67019.rs:11:10: 11:19 -+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) } 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 diff --git a/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.32bit index 721766f984971..cb55efe20784d 100644 --- a/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.32bit @@ -16,55 +16,13 @@ StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:6:9: 6:10 StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:6:17: 6:29 _2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:29 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/large_array_index.rs:6:18: 6:22 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:6:30: 6:31 _3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:6:30: 6:31 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/large_array_index.rs:6:30: 6:31 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } _4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00001388)) - // mir::Constant - // + span: $DIR/large_array_index.rs:6:17: 6:32 - // + literal: Const { ty: usize, val: Value(Scalar(0x00001388)) } - _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 - assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 + _5 = const true; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } + assert(const true, "index out of bounds: the len is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00001388)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00001388)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000002)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } } bb1: { diff --git a/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.64bit index eae2ce6671cc1..cb55efe20784d 100644 --- a/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/large_array_index.main.ConstProp.diff.64bit @@ -16,55 +16,13 @@ StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:6:9: 6:10 StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:6:17: 6:29 _2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:29 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/large_array_index.rs:6:18: 6:22 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:6:30: 6:31 _3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:6:30: 6:31 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000002)) - // mir::Constant - // + span: $DIR/large_array_index.rs:6:30: 6:31 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } _4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000001388)) - // mir::Constant - // + span: $DIR/large_array_index.rs:6:17: 6:32 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000001388)) } - _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 - assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 + _5 = const true; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } + assert(const true, "index out of bounds: the len is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000001388)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000001388)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000002)) -+ // mir::Constant -+ // + span: $DIR/large_array_index.rs:6:17: 6:32 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } } bb1: { diff --git a/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff b/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff index 7b36669bf15b2..84ae8cc7477e3 100644 --- a/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff @@ -11,13 +11,6 @@ _2 = _1; // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:4 - _0 = Mul(move _2, const 0_i32); // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:8 + _0 = const 0_i32; // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:8 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant -- // + span: $DIR/mult_by_zero.rs:5:7: 5:8 -+ // + span: $DIR/mult_by_zero.rs:5:3: 5:8 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageDead(_2); // scope 0 at $DIR/mult_by_zero.rs:5:7: 5:8 return; // scope 0 at $DIR/mult_by_zero.rs:6:2: 6:2 } diff --git a/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff index 3d4309a8aec54..edbb1e57c7d37 100644 --- a/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff @@ -15,28 +15,10 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/mutable_variable.rs:5:9: 5:14 _1 = const 42_i32; // scope 0 at $DIR/mutable_variable.rs:5:17: 5:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/mutable_variable.rs:5:17: 5:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } _1 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:6:5: 6:11 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000063)) - // mir::Constant - // + span: $DIR/mutable_variable.rs:6:9: 6:11 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } StorageLive(_2); // scope 1 at $DIR/mutable_variable.rs:7:9: 7:10 - _2 = _1; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14 + _2 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000063)) -+ // mir::Constant -+ // + span: $DIR/mutable_variable.rs:7:13: 7:14 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } _0 = const (); // scope 0 at $DIR/mutable_variable.rs:4:11: 8:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff index 617702a520912..05c618b3a1279 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff @@ -15,41 +15,11 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14 (_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate.rs:5:18: 5:20 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } (_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002b)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate.rs:5:22: 5:24 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002b)) } (_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:6:5: 6:13 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000063)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate.rs:6:11: 6:13 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:7:9: 7:10 - _2 = _1; // scope 1 at $DIR/mutable_variable_aggregate.rs:7:13: 7:14 + _2 = (const 42_i32, const 99_i32); // scope 1 at $DIR/mutable_variable_aggregate.rs:7:13: 7:14 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x0000002a)) -+ // mir::Constant -+ // + span: $DIR/mutable_variable_aggregate.rs:7:13: 7:14 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000063)) -+ // mir::Constant -+ // + span: $DIR/mutable_variable_aggregate.rs:7:13: 7:14 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } _0 = const (); // scope 0 at $DIR/mutable_variable_aggregate.rs:4:11: 8:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff index dbf77cf6b378b..d8f066c7b9b17 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff @@ -19,28 +19,10 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14 (_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate_mut_ref.rs:5:18: 5:20 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } (_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002b)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate_mut_ref.rs:5:22: 5:24 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002b)) } StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:9: 6:10 _2 = &mut _1; // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:13: 6:19 ((*_2).1: i32) = const 99_i32; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:7:5: 7:13 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000063)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate_mut_ref.rs:7:11: 7:13 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } StorageLive(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:9: 8:10 _3 = _1; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:13: 8:14 _0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:4:11: 9:2 diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff index b1a0ab88fccd5..59a43bda35ade 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff @@ -25,28 +25,10 @@ bb1: { (_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:6:5: 6:13 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000063)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate_partial_read.rs:6:11: 6:13 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } (_1.0: i32) = const 42_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:7:5: 7:13 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/mutable_variable_aggregate_partial_read.rs:7:11: 7:13 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:9: 8:10 - _2 = (_1.1: i32); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16 + _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000063)) -+ // mir::Constant -+ // + span: $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) } _0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:4:11: 9:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff index 3b72af2d0b9c5..945aeaf1e88b0 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff @@ -20,12 +20,6 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:7:9: 7:14 _1 = const 42_u32; // scope 0 at $DIR/mutable_variable_no_prop.rs:7:17: 7:19 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/mutable_variable_no_prop.rs:7:17: 7:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } StorageLive(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6 StorageLive(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19 StorageLive(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19 diff --git a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff index 84e858debddc0..5812814a0ec4f 100644 --- a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff @@ -35,19 +35,7 @@ bb1: { StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14 (_2.0: i32) = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/mutable_variable_unprop_assign.rs:6:30: 6:31 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } (_2.1: i32) = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/mutable_variable_unprop_assign.rs:6:33: 6:34 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12 _3 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12 (_2.1: i32) = move _3; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:5: 7:12 diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit index c2381f3da90dd..3bdf9e753c044 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit @@ -25,176 +25,37 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 - _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 - // ty::Const - // + ty: i32 -- // + val: Value(Scalar(0x00000002)) -+ // + val: Value(Scalar(0x00000004)) - // mir::Constant -- // + span: $DIR/optimizes_into_variable.rs:12:13: 12:14 -- // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } -+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0x00000002)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // 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 compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> 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)) } ++ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:12:13: 12:14 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:12:17: 12:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } } bb1: { - _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + _1 = const 4_i32; // 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); // 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 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:14: 13:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:17: 13:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:20: 13:21 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:23: 13:24 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000004)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:26: 13:27 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:29: 13:30 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 _5 = const 3_usize; // 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 6_usize; // 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); // 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 {}", const 6_usize, const 3_usize) -> bb2; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000003)) -+ // mir::Constant -+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } } bb2: { - _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + _3 = const 3_i32; // 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); // 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.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000000c)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:14:25: 14:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000000c)) } (_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:14:32: 14:34 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 + _8 = const 42_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit index bc965b4ade730..3bdf9e753c044 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit @@ -25,176 +25,37 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 - _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 - // ty::Const - // + ty: i32 -- // + val: Value(Scalar(0x00000002)) -+ // + val: Value(Scalar(0x00000004)) - // mir::Constant -- // + span: $DIR/optimizes_into_variable.rs:12:13: 12:14 -- // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } -+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - // ty::Const -- // + ty: i32 -- // + val: Value(Scalar(0x00000002)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // 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 compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> 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)) } ++ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:12:13: 12:14 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:12:17: 12:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } } bb1: { - _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18 + _1 = const 4_i32; // 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); // 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 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:14: 13:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:17: 13:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:20: 13:21 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:23: 13:24 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000004)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:26: 13:27 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:13:29: 13:30 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33 _5 = const 3_usize; // 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 6_usize; // 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); // 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 {}", const 6_usize, const 3_usize) -> bb2; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000003)) -+ // mir::Constant -+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } } bb2: { - _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34 + _3 = const 3_i32; // 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); // 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.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000000c)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:14:25: 14:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000000c)) } (_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x0000002a)) - // mir::Constant - // + span: $DIR/optimizes_into_variable.rs:14:32: 14:34 - // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) } - _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38 + _8 = const 42_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit index 7b74bf81d96fe..91d9c9aa0836c 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit +++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit @@ -18,28 +18,10 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 _1 = const 4_i32; // 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); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 _2 = const 3_i32; // 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); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 _3 = const 42_u32; // 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 (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit index 7b74bf81d96fe..91d9c9aa0836c 100644 --- a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit +++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit @@ -18,28 +18,10 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10 _1 = const 4_i32; // 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); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10 _2 = const 3_i32; // 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); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10 _3 = const 42_u32; // 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 (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff b/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff index 36edfc42b9a76..53d10f01eac7f 100644 --- a/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff @@ -25,12 +25,6 @@ // + literal: Const { ty: &u8, val: Value(Scalar(alloc0)) } - _2 = (*_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16 + _2 = const 2_u8; // 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); // 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: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22 @@ -43,19 +37,7 @@ - _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 2_u8; // 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 4_u8; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff index ba5ac8d3ddf87..f8f9b5ce59c82 100644 --- a/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff @@ -21,12 +21,6 @@ _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 4_i32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff index fa68eb348185a..019bb63a02081 100644 --- a/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff +++ b/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff @@ -13,16 +13,12 @@ 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 4_i32; // scope 0 at $DIR/ref_deref.rs:5:8: 5:9 +- _2 = &_3; // 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: Value(Scalar(0x00000004)) ++ // ty::Const + // + ty: &i32 + // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) - // mir::Constant -- // + span: $DIR/ref_deref.rs:5:8: 5:9 -- // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } -- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 ++ // mir::Constant + // + span: $DIR/ref_deref.rs:5:6: 5:10 + // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) } + _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10 diff --git a/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff index 86e6aacab45a7..d7b3ff7d0c22b 100644 --- a/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff +++ b/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff @@ -13,22 +13,12 @@ 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 4_i32, const 5_i32); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14 +- _2 = &(_3.1: i32); // 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 -- // + val: Value(Scalar(0x00000004)) ++ // ty::Const + // + ty: &(i32, i32) + // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) - // mir::Constant -- // + span: $DIR/ref_deref_project.rs:5:9: 5:10 -- // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } -- // 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); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 ++ // mir::Constant + // + span: $DIR/ref_deref_project.rs:5:6: 5:17 + // + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) } + _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17 diff --git a/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit index c30075bbb05fd..61e3606ef8329 100644 --- a/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit @@ -18,77 +18,20 @@ 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 42_u32; 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); // scope 0 at $DIR/repeat.rs:6:26: 6:27 _4 = const 2_usize; // 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 8_usize; // 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); // 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 {}", const 8_usize, const 2_usize) -> bb1; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000002)) -+ // mir::Constant -+ // + span: $DIR/repeat.rs:6:18: 6:28 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } } bb1: { - _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28 - _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32 + _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28 - // ty::Const - // + ty: u32 -- // + val: Value(Scalar(0x00000000)) -+ // + val: Value(Scalar(0x0000002a)) - // mir::Constant -- // + span: $DIR/repeat.rs:6:31: 6:32 -- // + 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 42_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit index cadce59cf954d..61e3606ef8329 100644 --- a/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit @@ -18,77 +18,20 @@ 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 42_u32; 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); // scope 0 at $DIR/repeat.rs:6:26: 6:27 _4 = const 2_usize; // 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 8_usize; // 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); // 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 {}", const 8_usize, const 2_usize) -> bb1; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000002)) -+ // mir::Constant -+ // + span: $DIR/repeat.rs:6:18: 6:28 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } } bb1: { - _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28 - _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32 + _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28 - // ty::Const - // + ty: u32 -- // + val: Value(Scalar(0x00000000)) -+ // + val: Value(Scalar(0x0000002a)) - // mir::Constant -- // + span: $DIR/repeat.rs:6:31: 6:32 -- // + 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 42_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff b/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff index 5e39c8e6d523e..99893aa19cff3 100644 --- a/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff +++ b/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff @@ -7,57 +7,14 @@ bb0: { - _1 = CheckedAdd(const 2_u32, const 2_u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10 -+ _1 = (const 4_u32, const false); // scope 0 at $DIR/return_place.rs:6:5: 6:10 - // ty::Const - // + ty: u32 -- // + val: Value(Scalar(0x00000002)) -+ // + val: Value(Scalar(0x00000004)) - // mir::Constant -- // + span: $DIR/return_place.rs:6:5: 6:6 -- // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } -+ // + span: $DIR/return_place.rs:6:5: 6:10 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000004)) } - // ty::Const -- // + ty: u32 -- // + val: Value(Scalar(0x00000002)) -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) - // 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 compute `{} + {}` which would overflow", const 2_u32, const 2_u32) -> 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)) } ++ _1 = (const 4_u32, const false); // scope 0 at $DIR/return_place.rs:6:5: 6:10 + assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10 - // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/return_place.rs:6:5: 6:10 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } -+ // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/return_place.rs:6:5: 6:6 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/return_place.rs:6:9: 6:10 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } } bb1: { - _0 = move (_1.0: u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10 + _0 = const 4_u32; // 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; // scope 0 at $DIR/return_place.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir b/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir index 23ad8d057ba8d..e6dd096e1c0e3 100644 --- a/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir +++ b/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir @@ -5,12 +5,6 @@ fn add() -> u32 { bb0: { _0 = const 4_u32; // 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; // scope 0 at $DIR/return_place.rs:7:2: 7:2 } } diff --git a/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff index 43e0eb09a2e5f..569e2f8ec2efe 100644 --- a/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff @@ -13,36 +13,18 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:3:9: 3:10 _1 = const 1_u32; // scope 0 at $DIR/scalar_literal_propagation.rs:3:13: 3:14 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/scalar_literal_propagation.rs:3:13: 3:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15 StorageLive(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14 - _3 = _1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14 - _2 = const consume(move _3) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15 + _3 = const 1_u32; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14 - // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000001)) -+ // mir::Constant -+ // + span: $DIR/scalar_literal_propagation.rs:4:13: 4:14 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } + _2 = const consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15 -+ // ty::Const + // ty::Const // + ty: fn(u32) {consume} // + val: Value(Scalar()) // mir::Constant // + span: $DIR/scalar_literal_propagation.rs:4:5: 4:12 // + literal: Const { ty: fn(u32) {consume}, val: Value(Scalar()) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000001)) -+ // mir::Constant -+ // + span: $DIR/scalar_literal_propagation.rs:4:5: 4:15 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } } bb1: { diff --git a/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit index 0a07a1a11f275..100e37d368186 100644 --- a/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit +++ b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit @@ -31,59 +31,17 @@ 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 1_usize; // 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)); // 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 3_usize; // 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; // 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 {}", const 3_usize, const 1_usize) -> bb1; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000001)) -+ // mir::Constant -+ // + span: $DIR/slice_len.rs:5:5: 5:33 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } } bb1: { - _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + _1 = const 2_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit index f8c6f29e854df..100e37d368186 100644 --- a/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit +++ b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit @@ -31,59 +31,17 @@ 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 1_usize; // 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)); // 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 3_usize; // 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; // 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 {}", const 3_usize, const 1_usize) -> bb1; // 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)) } -+ // 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)) } -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000001)) -+ // mir::Constant -+ // + span: $DIR/slice_len.rs:5:5: 5:33 -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } } bb1: { - _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33 + _1 = const 2_u32; // 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); // 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 diff --git a/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff index 9580b99da9e40..5fcf830479e24 100644 --- a/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff @@ -8,20 +8,8 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12 _1 = const 1_i32; // 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) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10 + switchInt(const 1_i32) -> [1_i32: 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)) } } bb1: { @@ -32,12 +20,6 @@ // mir::Constant // + span: $DIR/switch_int.rs:9:14: 9:17 // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0xffffffff)) - // mir::Constant - // + span: $DIR/switch_int.rs:9:18: 9:20 - // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) } } bb2: { @@ -48,12 +30,6 @@ // mir::Constant // + span: $DIR/switch_int.rs:8:14: 8:17 // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/switch_int.rs:8:18: 8:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } } bb3: { diff --git a/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff index 54f37e609ec13..0337d0e061b08 100644 --- a/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff +++ b/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff @@ -8,19 +8,7 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12 _1 = const 1_i32; // 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 1_i32) -> [1_i32: 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; // scope 0 at $DIR/switch_int.rs:8:9: 8:10 } @@ -32,12 +20,6 @@ // mir::Constant // + span: $DIR/switch_int.rs:9:14: 9:17 // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0xffffffff)) - // mir::Constant - // + span: $DIR/switch_int.rs:9:18: 9:20 - // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) } } bb2: { @@ -48,12 +30,6 @@ // mir::Constant // + span: $DIR/switch_int.rs:8:14: 8:17 // + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar()) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/switch_int.rs:8:18: 8:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } } bb3: { diff --git a/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff index e4a0ef27b24ed..83cdd6b5836ae 100644 --- a/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff @@ -13,35 +13,11 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:9: 3:10 (_1.0: u32) = const 1_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/tuple_literal_propagation.rs:3:14: 3:15 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } (_1.1: u32) = const 2_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/tuple_literal_propagation.rs:3:17: 3:18 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15 StorageLive(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14 - _3 = _1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14 + _3 = (const 1_u32, const 2_u32); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14 -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000001)) -+ // mir::Constant -+ // + span: $DIR/tuple_literal_propagation.rs:5:13: 5:14 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000002)) -+ // mir::Constant -+ // + span: $DIR/tuple_literal_propagation.rs:5:13: 5:14 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } _2 = const consume(move _3) -> bb1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15 // ty::Const // + ty: fn((u32, u32)) {consume} diff --git a/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff b/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff index b4733b5ed39f9..666ab74e72f6e 100644 --- a/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff +++ b/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff @@ -20,22 +20,10 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:9: 12:14 (_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/const_prop_miscompile.rs:12:18: 12:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:13:5: 15:6 StorageLive(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22 _3 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22 (*_3) = const 5_i32; // scope 2 at $DIR/const_prop_miscompile.rs:14:9: 14:26 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/const_prop_miscompile.rs:14:25: 14:26 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } StorageDead(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:26: 14:27 _2 = const (); // scope 2 at $DIR/const_prop_miscompile.rs:13:5: 15:6 // ty::Const @@ -49,12 +37,6 @@ StorageLive(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:20 _5 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:15: 16:18 _4 = Eq(move _5, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:25 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/const_prop_miscompile.rs:16:24: 16:25 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } StorageDead(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:24: 16:25 _0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:11:10: 17:2 // ty::Const diff --git a/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff b/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff index b54fc41d0b496..ef458c50741cd 100644 --- a/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff +++ b/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff @@ -17,32 +17,14 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:9: 5:14 (_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/const_prop_miscompile.rs:5:18: 5:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14 _2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14 (*_2) = const 5_i32; // scope 1 at $DIR/const_prop_miscompile.rs:6:5: 6:18 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/const_prop_miscompile.rs:6:17: 6:18 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:18: 6:19 StorageLive(_3); // scope 1 at $DIR/const_prop_miscompile.rs:7:9: 7:10 StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:20 _4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:15: 7:18 _3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:25 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000005)) - // mir::Constant - // + span: $DIR/const_prop_miscompile.rs:7:24: 7:25 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) } StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:24: 7:25 _0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:4:10: 8:2 // ty::Const diff --git a/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff index 22fbf4e836ba4..a4d60ae25d0c4 100644 --- a/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff @@ -13,12 +13,6 @@ 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 123_i32; // 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:9: 29:12 - // + literal: Const { ty: i32, val: Value(Scalar(0x0000007b)) } _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.bar.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff index 6953a80a5f08a..fccb5bb16c07e 100644 --- a/src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff +++ b/src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff @@ -24,12 +24,6 @@ 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 5_u8; // 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:9: 17:10 - // + literal: Const { ty: u8, val: Value(Scalar(0x05)) } _0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff index 524156e0b929d..ebe76e8e270cd 100644 --- a/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff +++ b/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff @@ -19,12 +19,6 @@ // + span: $DIR/deaggregator_test.rs:9:20: 9:23 // + literal: Const { ty: f32, val: Value(Scalar(0x00000000)) } + (_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); // 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/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir index 00942cd12b42c..28364d4fbfb40 100644 --- a/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir @@ -24,12 +24,6 @@ fn match_tuple(_1: (u32, bool, std::option::Option, u32)) -> u32 { bb1: { _0 = const 0_u32; // 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; // scope 0 at $DIR/exponential-or.rs:7:5: 10:6 } @@ -44,45 +38,21 @@ fn match_tuple(_1: (u32, bool, std::option::Option, u32)) -> u32 { bb4: { _5 = Le(const 6_u32, (_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]; // scope 0 at $DIR/exponential-or.rs:8:62: 8:67 } bb5: { _6 = Le((_1.3: u32), const 9_u32); // 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]; // scope 0 at $DIR/exponential-or.rs:8:62: 8:67 } bb6: { _3 = Le(const 13_u32, (_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]; // scope 0 at $DIR/exponential-or.rs:8:70: 8:77 } bb7: { _4 = Le((_1.3: u32), const 16_u32); // 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]; // scope 0 at $DIR/exponential-or.rs:8:70: 8:77 } diff --git a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff index 5f928ea2a1629..4291e580bbfa6 100644 --- a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff +++ b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff @@ -116,12 +116,6 @@ _15 = move _16 as u32 (Misc); // scope 3 at $DIR/funky_arms.rs:26:59: 26:75 StorageDead(_16); // scope 3 at $DIR/funky_arms.rs:26:74: 26:75 _14 = Add(move _15, const 1_u32); // scope 3 at $DIR/funky_arms.rs:26:59: 26:79 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/funky_arms.rs:26:78: 26:79 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageDead(_15); // scope 3 at $DIR/funky_arms.rs:26:78: 26:79 StorageLive(_17); // scope 3 at $DIR/funky_arms.rs:26:81: 26:86 _17 = _3; // scope 3 at $DIR/funky_arms.rs:26:81: 26:86 diff --git a/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir b/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir index 356470f8fec87..6d7e7b6a62746 100644 --- a/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir +++ b/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir @@ -22,20 +22,8 @@ yields () bb0: { StorageLive(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14 (_3.0: i32) = const 5_i32; // 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); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14 (_4.0: i32) = const 6_i32; // 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); // 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 _5 = yield(move _6) -> [resume: bb2, drop: bb4]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14 diff --git a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir index c9ff1fe29f5ed..a31e7aaf27271 100644 --- a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir +++ b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir @@ -26,19 +26,7 @@ fn bar() -> bool { 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 1_i32; // 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 -1_i32; // 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); // 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 diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit index 855811964b1ef..73ce79992202b 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit @@ -40,12 +40,6 @@ + // + 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: [] }), init_mask: InitMask { 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 0_usize; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $SRC_DIR/alloc/src/vec.rs:LL:COL -+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } _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 diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit index 507e45a445be3..27ecaefd87574 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit @@ -40,12 +40,6 @@ + // + 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: [] }), init_mask: InitMask { 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 0_usize; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL -+ // ty::Const -+ // + ty: usize -+ // + val: Value(Scalar(0x0000000000000000)) -+ // mir::Constant -+ // + span: $SRC_DIR/alloc/src/vec.rs:LL:COL -+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } _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 diff --git a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff index c273c43c4297d..fc0b40a84511d 100644 --- a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff @@ -13,20 +13,16 @@ bb0: { 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 123_u32; // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34 - // ty::Const +- // ty::Const - // + ty: fn() -> u32 { as Foo>::bar} - // + val: Value(Scalar()) -+ // + ty: u32 -+ // + val: Value(Scalar(0x0000007b)) - // mir::Constant +- // mir::Constant - // + span: $DIR/inline-specialization.rs:5:13: 5:36 - // + literal: Const { ty: fn() -> u32 { as Foo>::bar}, val: Value(Scalar()) } - } - - bb1: { -+ // + span: $DIR/inline-specialization.rs:14:31: 14:34 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000007b)) } ++ _1 = const 123_u32; // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34 _0 = const (); // scope 0 at $DIR/inline-specialization.rs:4:11: 6:2 // ty::Const // + ty: () diff --git a/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff b/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff index 9ca6f93c9bc08..f048757ad861e 100644 --- a/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff +++ b/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff @@ -15,47 +15,11 @@ + // + span: /the/src/instrument_coverage.rs:19:18: 19:18 + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u64, u32, &'static str, u32, u32, u32, u32) {std::intrinsics::count_code_region}, val: Value(Scalar()) } + // ty::Const -+ // + ty: u64 -+ // + val: Value(Scalar(0x8dabe565aaa2aefd)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18 -+ // + literal: Const { ty: u64, val: Value(Scalar(0x8dabe565aaa2aefd)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } -+ // ty::Const + // + ty: &str + // + val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 }) + // mir::Constant + // + span: /the/src/instrument_coverage.rs:19:18: 19:18 + // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 }) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000013)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000013)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000012)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000012)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000015)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000015)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000002)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } + } + + bb1 (cleanup): { @@ -65,12 +29,6 @@ + bb2: { + StorageDead(_1); // scope 0 at /the/src/instrument_coverage.rs:20:5: 20:9 _0 = const true; // scope 0 at /the/src/instrument_coverage.rs:20:5: 20:9 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: /the/src/instrument_coverage.rs:20:5: 20:9 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } return; // scope 0 at /the/src/instrument_coverage.rs:21:2: 21:2 } } diff --git a/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff b/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff index 3f47aa13bf91f..931ebf5e1404e 100644 --- a/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff +++ b/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff @@ -19,47 +19,11 @@ + // + span: /the/src/instrument_coverage.rs:10:11: 10:11 + // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u64, u32, &'static str, u32, u32, u32, u32) {std::intrinsics::count_code_region}, val: Value(Scalar()) } + // ty::Const -+ // + ty: u64 -+ // + val: Value(Scalar(0xde1b3f75a72fc7f7)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11 -+ // + literal: Const { ty: u64, val: Value(Scalar(0xde1b3f75a72fc7f7)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } -+ // ty::Const + // + ty: &str + // + val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 }) + // mir::Constant + // + span: /the/src/instrument_coverage.rs:10:11: 10:11 + // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 }) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x0000000a)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000000a)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x0000000b)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000000b)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000010)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000010)) } -+ // ty::Const -+ // + ty: u32 -+ // + val: Value(Scalar(0x00000002)) -+ // mir::Constant -+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } } bb1: { diff --git a/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir index 7b58dc1f624a5..3dabc41f19520 100644 --- a/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir @@ -14,12 +14,6 @@ fn main() -> () { bb0: { 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); // scope 0 at $DIR/issue-38669.rs:5:9: 5:25 goto -> bb2; // scope 1 at $DIR/issue-38669.rs:6:5: 11:6 } @@ -55,12 +49,6 @@ fn main() -> () { 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 (); // scope 1 at $DIR/issue-38669.rs:6:10: 11:6 // ty::Const // + ty: () diff --git a/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir index 77763f2d3a0d1..70eaf81702162 100644 --- a/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir @@ -13,21 +13,9 @@ fn main() -> () { bb0: { _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); // 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; // 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 @@ -48,12 +36,6 @@ fn main() -> () { bb2: { 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]; // scope 0 at $DIR/issue-41110.rs:8:13: 8:28 // ty::Const // + ty: fn(S, S) {S::other} @@ -78,12 +60,6 @@ fn main() -> () { bb6: { 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); // 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 @@ -102,12 +78,6 @@ fn main() -> () { bb8 (cleanup): { _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; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28 } diff --git a/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir index a99846bd15daf..6b4f641b1f0bc 100644 --- a/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir @@ -17,20 +17,8 @@ fn test() -> () { bb0: { _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); // 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; // 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 @@ -55,12 +43,6 @@ fn test() -> () { 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; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10 goto -> bb12; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6 } @@ -104,12 +86,6 @@ fn test() -> () { bb10: { _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); // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 return; // scope 0 at $DIR/issue-41110.rs:19:2: 19:2 } @@ -130,12 +106,6 @@ fn test() -> () { bb14 (cleanup): { _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; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2 } diff --git a/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit index 403555964ca15..14ece035f34af 100644 --- a/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit +++ b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit @@ -6,31 +6,7 @@ bb0: { _1 = CheckedAdd(const 1_usize, const 1_usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-41697.rs:18:19: 18:20 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // 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 compute `{} + {}` which would overflow", const 1_usize, const 1_usize) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-41697.rs:18:19: 18:20 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-41697.rs:18:21: 18:22 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } } bb1 (cleanup): { diff --git a/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit index df933d3ac251f..14ece035f34af 100644 --- a/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit +++ b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit @@ -6,31 +6,7 @@ bb0: { _1 = CheckedAdd(const 1_usize, const 1_usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $DIR/issue-41697.rs:18:19: 18:20 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // 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 compute `{} + {}` which would overflow", const 1_usize, const 1_usize) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $DIR/issue-41697.rs:18:19: 18:20 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $DIR/issue-41697.rs:18:21: 18:22 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } } bb1 (cleanup): { diff --git a/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir index 76ad865bcc842..cb8057eb75b52 100644 --- a/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir +++ b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir @@ -22,26 +22,8 @@ fn main() -> () { bb0: { _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; // 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; // 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); // 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 @@ -113,12 +95,6 @@ fn main() -> () { bb10: { 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); // 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 @@ -137,26 +113,8 @@ fn main() -> () { bb12: { _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; // 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; // 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); // 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 @@ -164,75 +122,27 @@ fn main() -> () { bb13 (cleanup): { _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; // 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; // 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; // 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; // 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; // 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; // 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; // 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; // 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; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } bb16 (cleanup): { _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; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2 } diff --git a/src/test/mir-opt/issue_49232.main.mir_map.0.mir b/src/test/mir-opt/issue_49232.main.mir_map.0.mir index 918dc5ec38701..4b6cdbf264497 100644 --- a/src/test/mir-opt/issue_49232.main.mir_map.0.mir +++ b/src/test/mir-opt/issue_49232.main.mir_map.0.mir @@ -28,12 +28,6 @@ fn main() -> () { 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); // 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 } @@ -59,12 +53,6 @@ fn main() -> () { bb7: { _2 = const 4_i32; // 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; // scope 0 at $DIR/issue-49232.rs:8:13: 11:14 } diff --git a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit index 9f8810e752cb3..972a36a30a127 100644 --- a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit +++ b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit @@ -10,12 +10,6 @@ fn foo(_1: [(Never, u32); 1]) -> u32 { bb0: { StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:16:43: 16:44 _2 = const 0_usize; // scope 0 at $DIR/issue-72181.rs:16:43: 16:44 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/issue-72181.rs:16:43: 16:44 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } _3 = Len(_1); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45 _4 = Lt(_2, _3); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45 assert(move _4, "index out of bounds: the len is {} but the index is {}", move _3, _2) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:16:40: 16:45 diff --git a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit index aab8efb415c69..972a36a30a127 100644 --- a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit +++ b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit @@ -10,12 +10,6 @@ fn foo(_1: [(Never, u32); 1]) -> u32 { bb0: { StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:16:43: 16:44 _2 = const 0_usize; // scope 0 at $DIR/issue-72181.rs:16:43: 16:44 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $DIR/issue-72181.rs:16:43: 16:44 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } _3 = Len(_1); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45 _4 = Lt(_2, _3); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45 assert(move _4, "index out of bounds: the len is {} but the index is {}", move _3, _2) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:16:40: 16:45 diff --git a/src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit index e3fb5eb193ae9..71a70d2d21137 100644 --- a/src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit +++ b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit @@ -40,20 +40,8 @@ fn main() -> () { StorageLive(_2); // scope 1 at $DIR/issue-72181.rs:26:9: 26:10 StorageLive(_3); // scope 1 at $DIR/issue-72181.rs:26:14: 26:27 _3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue-72181.rs:26:14: 26:27 - // ty::Const - // + ty: u64 - // + val: Value(Scalar(0x000000000000002a)) - // mir::Constant - // + span: $DIR/issue-72181.rs:26:23: 26:25 - // + literal: Const { ty: u64, val: Value(Scalar(0x000000000000002a)) } StorageLive(_4); // scope 1 at $DIR/issue-72181.rs:26:29: 26:42 _4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue-72181.rs:26:29: 26:42 - // ty::Const - // + ty: u64 - // + val: Value(Scalar(0x000000000000000a)) - // mir::Constant - // + span: $DIR/issue-72181.rs:26:38: 26:40 - // + literal: Const { ty: u64, val: Value(Scalar(0x000000000000000a)) } _2 = [move _3, move _4]; // scope 1 at $DIR/issue-72181.rs:26:13: 26:43 StorageDead(_4); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43 StorageDead(_3); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43 @@ -61,12 +49,6 @@ fn main() -> () { StorageLive(_5); // scope 2 at $DIR/issue-72181.rs:27:13: 27:30 StorageLive(_6); // scope 4 at $DIR/issue-72181.rs:27:24: 27:25 _6 = const 0_usize; // scope 4 at $DIR/issue-72181.rs:27:24: 27:25 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/issue-72181.rs:27:24: 27:25 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } _7 = Len(_2); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26 _8 = Lt(_6, _7); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26 assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> [success: bb3, unwind: bb1]; // scope 4 at $DIR/issue-72181.rs:27:22: 27:26 diff --git a/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit index d9e791b86bc2b..71a70d2d21137 100644 --- a/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit +++ b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit @@ -40,20 +40,8 @@ fn main() -> () { StorageLive(_2); // scope 1 at $DIR/issue-72181.rs:26:9: 26:10 StorageLive(_3); // scope 1 at $DIR/issue-72181.rs:26:14: 26:27 _3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue-72181.rs:26:14: 26:27 - // ty::Const - // + ty: u64 - // + val: Value(Scalar(0x000000000000002a)) - // mir::Constant - // + span: $DIR/issue-72181.rs:26:23: 26:25 - // + literal: Const { ty: u64, val: Value(Scalar(0x000000000000002a)) } StorageLive(_4); // scope 1 at $DIR/issue-72181.rs:26:29: 26:42 _4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue-72181.rs:26:29: 26:42 - // ty::Const - // + ty: u64 - // + val: Value(Scalar(0x000000000000000a)) - // mir::Constant - // + span: $DIR/issue-72181.rs:26:38: 26:40 - // + literal: Const { ty: u64, val: Value(Scalar(0x000000000000000a)) } _2 = [move _3, move _4]; // scope 1 at $DIR/issue-72181.rs:26:13: 26:43 StorageDead(_4); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43 StorageDead(_3); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43 @@ -61,12 +49,6 @@ fn main() -> () { StorageLive(_5); // scope 2 at $DIR/issue-72181.rs:27:13: 27:30 StorageLive(_6); // scope 4 at $DIR/issue-72181.rs:27:24: 27:25 _6 = const 0_usize; // scope 4 at $DIR/issue-72181.rs:27:24: 27:25 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $DIR/issue-72181.rs:27:24: 27:25 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } _7 = Len(_2); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26 _8 = Lt(_6, _7); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26 assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> [success: bb3, unwind: bb1]; // scope 4 at $DIR/issue-72181.rs:27:22: 27:26 diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit index 919c37a5fc341..f7db1626016c4 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit @@ -72,12 +72,6 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 ((_1 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-73223.rs:2:28: 2:29 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } discriminant(_1) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 _2 = ((_1 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15 StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7 @@ -107,12 +101,6 @@ StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _11 = (*_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _9 = Not(move _10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit index 919c37a5fc341..f7db1626016c4 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit @@ -72,12 +72,6 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 ((_1 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-73223.rs:2:28: 2:29 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } discriminant(_1) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 _2 = ((_1 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15 StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7 @@ -107,12 +101,6 @@ StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _11 = (*_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _9 = Not(move _10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit index 28d949be271e8..957d33e2461f3 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit @@ -97,20 +97,8 @@ StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14 StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 ((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-73223.rs:2:28: 2:29 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 _3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16 - // ty::Const - // + ty: isize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-73223.rs:3:9: 3:16 - // + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) } goto -> bb2; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16 } @@ -166,19 +154,7 @@ _17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } _16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit index 2b854850deaf1..957d33e2461f3 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit @@ -97,20 +97,8 @@ StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14 StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 ((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/issue-73223.rs:2:28: 2:29 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30 _3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16 - // ty::Const - // + ty: isize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $DIR/issue-73223.rs:3:9: 3:16 - // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) } goto -> bb2; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16 } @@ -166,19 +154,7 @@ _17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } _16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL diff --git a/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir index e699abf421d60..77bd884681272 100644 --- a/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir +++ b/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir @@ -16,12 +16,6 @@ fn main() -> () { 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); // 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 } @@ -68,12 +62,6 @@ fn main() -> () { bb6: { StorageLive(_6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14 _6 = const 1_i32; // 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); // 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.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff index 58847e1bceee6..7a7d86f98ac26 100644 --- a/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff +++ b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff @@ -74,12 +74,6 @@ - bb8: { + bb5: { _0 = const 1_i32; // scope 1 at $DIR/match-arm-scopes.rs:15:77: 15:78 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/match-arm-scopes.rs:15:77: 15:78 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - drop(_7) -> [return: bb24, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78 + drop(_7) -> [return: bb19, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78 } @@ -115,12 +109,6 @@ - bb12: { + bb8: { _0 = const 3_i32; // scope 0 at $DIR/match-arm-scopes.rs:15:59: 15:60 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/match-arm-scopes.rs:15:59: 15:60 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73 StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78 StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78 @@ -201,12 +189,6 @@ - bb21: { + bb16: { _0 = const 3_i32; // scope 0 at $DIR/match-arm-scopes.rs:15:59: 15:60 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/match-arm-scopes.rs:15:59: 15:60 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73 StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78 StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78 @@ -252,12 +234,6 @@ - bb25: { + bb20: { _0 = const 2_i32; // scope 2 at $DIR/match-arm-scopes.rs:16:41: 16:42 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/match-arm-scopes.rs:16:41: 16:42 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - drop(_16) -> [return: bb27, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42 + drop(_16) -> [return: bb22, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42 } diff --git a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir index c53c9cf1db7cc..dbf1f1ead2cdb 100644 --- a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir +++ b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir @@ -27,12 +27,6 @@ fn full_tested_match() -> () { 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 42_i32); // 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); // 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) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 @@ -44,18 +38,6 @@ fn full_tested_match() -> () { bb2: { _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:18:17: 18:23 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/match_false_edges.rs:18:18: 18:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/match_false_edges.rs:18:21: 18:22 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 } @@ -105,12 +87,6 @@ fn full_tested_match() -> () { 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 1_i32, 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); // scope 2 at $DIR/match_false_edges.rs:16:36: 16:37 StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 @@ -129,12 +105,6 @@ fn full_tested_match() -> () { 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 2_i32, 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); // scope 3 at $DIR/match_false_edges.rs:17:25: 17:26 StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:17:25: 17:26 goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 diff --git a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir index b79416fe31a41..c2805968029c8 100644 --- a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir @@ -26,12 +26,6 @@ fn full_tested_match2() -> () { 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 42_i32); // 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); // 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) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 @@ -55,12 +49,6 @@ fn full_tested_match2() -> () { 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 2_i32, 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); // scope 3 at $DIR/match_false_edges.rs:29:25: 29:26 StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:29:25: 29:26 goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 @@ -97,12 +85,6 @@ fn full_tested_match2() -> () { 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 1_i32, 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); // scope 2 at $DIR/match_false_edges.rs:27:36: 27:37 StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 @@ -117,18 +99,6 @@ fn full_tested_match2() -> () { bb10: { _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:28:17: 28:23 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/match_false_edges.rs:28:18: 28:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/match_false_edges.rs:28:21: 28:22 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 } diff --git a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir index 5b449da93d493..66cac95b7e87f 100644 --- a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir @@ -37,12 +37,6 @@ fn main() -> () { 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 1_i32); // 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); // 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) -> [1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 @@ -64,12 +58,6 @@ fn main() -> () { 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 4_i32; // 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); // scope 0 at $DIR/match_false_edges.rs:39:15: 39:16 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } @@ -103,12 +91,6 @@ fn main() -> () { 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 1_i32; // 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); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 @@ -124,12 +106,6 @@ fn main() -> () { 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 2_i32; // 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); // scope 0 at $DIR/match_false_edges.rs:37:15: 37:16 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } @@ -162,12 +138,6 @@ fn main() -> () { 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 3_i32; // 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); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 diff --git a/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir index 16895942cb81b..c72e6542470cf 100644 --- a/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir @@ -21,42 +21,18 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/match_test.rs:7:9: 7:10 _1 = const 3_i32; // 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); // 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); // 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 0_i32, _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]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 } bb1: { _7 = Lt(_1, const 10_i32); // 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]; // scope 2 at $DIR/match_test.rs:13:9: 13:14 } @@ -66,34 +42,16 @@ fn main() -> () { bb3: { _3 = const 3_i32; // 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; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } bb4: { _4 = Le(const 10_i32, _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]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 } bb5: { _5 = Le(_1, const 20_i32); // 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]; // scope 2 at $DIR/match_test.rs:14:9: 14:16 } @@ -120,12 +78,6 @@ fn main() -> () { StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:23: 13:24 FakeRead(ForMatchGuard, _8); // scope 2 at $DIR/match_test.rs:13:18: 13:19 _3 = const 0_i32; // 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; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } @@ -136,23 +88,11 @@ fn main() -> () { bb12: { _3 = const 1_i32; // 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; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } bb13: { _3 = const 2_i32; // 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; // scope 2 at $DIR/match_test.rs:12:5: 17:6 } diff --git a/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.32bit b/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.32bit index 968890e3a298c..3f01719e01bfc 100644 --- a/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.32bit +++ b/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.32bit @@ -34,97 +34,25 @@ StorageLive(_6); // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 - switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10 + _2 = Ne(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000007)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) } + _3 = Eq(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000007)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) } + _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } + _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } + goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10 } bb1: { _2 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:26:13: 26:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:26:17: 26:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } _3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:27:17: 27:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:28:17: 28:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:29:17: 29:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 } bb2: { _2 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:19:17: 19:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _3 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:20:17: 20:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 } diff --git a/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.64bit b/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.64bit index 968890e3a298c..3f01719e01bfc 100644 --- a/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.64bit +++ b/src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.64bit @@ -34,97 +34,25 @@ StorageLive(_6); // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 - switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10 + _2 = Ne(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000007)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) } + _3 = Eq(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21 -+ // ty::Const -+ // + ty: i32 -+ // + val: Value(Scalar(0x00000007)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1 -+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) } + _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } + _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x01)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } + goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10 } bb1: { _2 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:26:13: 26:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:26:17: 26:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } _3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:27:17: 27:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:28:17: 28:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:29:17: 29:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 } bb2: { _2 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:19:17: 19:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _3 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:20:17: 20:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22 - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6 } diff --git a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit index a33db001f4438..cff899bcb5671 100644 --- a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit +++ b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit @@ -12,34 +12,16 @@ _3 = discriminant(_1); // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26 - switchInt(move _3) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26 + _2 = Eq(_3, const 0_isize); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) } + goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26 } bb1: { _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } bb2: { _2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } diff --git a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit index 3eb5b01fbf496..cff899bcb5671 100644 --- a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit +++ b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit @@ -12,34 +12,16 @@ _3 = discriminant(_1); // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26 - switchInt(move _3) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26 + _2 = Eq(_3, const 0_isize); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x0000000000000000)) -+ // mir::Constant -+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) } + goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26 } bb1: { _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } bb2: { _2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } diff --git a/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.32bit b/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.32bit index c41bd999dc9fc..9fde4888809d1 100644 --- a/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.32bit +++ b/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.32bit @@ -13,23 +13,11 @@ bb1: { _0 = const 1_u8; // scope 0 at $DIR/matches_u8.rs:14:17: 14:18 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_u8.rs:14:17: 14:18 - // + literal: Const { ty: u8, val: Value(Scalar(0x01)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6 } bb2: { _0 = const 0_u8; // scope 0 at $DIR/matches_u8.rs:13:17: 13:18 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_u8.rs:13:17: 13:18 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6 } diff --git a/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.64bit b/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.64bit index c41bd999dc9fc..9fde4888809d1 100644 --- a/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.64bit +++ b/src/test/mir-opt/matches_u8.exhaustive_match.MatchBranchSimplification.diff.64bit @@ -13,23 +13,11 @@ bb1: { _0 = const 1_u8; // scope 0 at $DIR/matches_u8.rs:14:17: 14:18 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_u8.rs:14:17: 14:18 - // + literal: Const { ty: u8, val: Value(Scalar(0x01)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6 } bb2: { _0 = const 0_u8; // scope 0 at $DIR/matches_u8.rs:13:17: 13:18 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_u8.rs:13:17: 13:18 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6 } diff --git a/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.32bit b/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.32bit index 2c4bbc8095e9a..2dd0a3edb479a 100644 --- a/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.32bit +++ b/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.32bit @@ -13,23 +13,11 @@ bb1: { _0 = const 1_i8; // scope 0 at $DIR/matches_u8.rs:22:17: 22:18 - // ty::Const - // + ty: i8 - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_u8.rs:22:17: 22:18 - // + literal: Const { ty: i8, val: Value(Scalar(0x01)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6 } bb2: { _0 = const 0_i8; // scope 0 at $DIR/matches_u8.rs:21:17: 21:18 - // ty::Const - // + ty: i8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_u8.rs:21:17: 21:18 - // + literal: Const { ty: i8, val: Value(Scalar(0x00)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6 } diff --git a/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.64bit b/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.64bit index 2c4bbc8095e9a..2dd0a3edb479a 100644 --- a/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.64bit +++ b/src/test/mir-opt/matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff.64bit @@ -13,23 +13,11 @@ bb1: { _0 = const 1_i8; // scope 0 at $DIR/matches_u8.rs:22:17: 22:18 - // ty::Const - // + ty: i8 - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/matches_u8.rs:22:17: 22:18 - // + literal: Const { ty: i8, val: Value(Scalar(0x01)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6 } bb2: { _0 = const 0_i8; // scope 0 at $DIR/matches_u8.rs:21:17: 21:18 - // ty::Const - // + ty: i8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/matches_u8.rs:21:17: 21:18 - // + literal: Const { ty: i8, val: Value(Scalar(0x00)) } goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6 } diff --git a/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir index dcfb069b84aad..bfc85e98786b8 100644 --- a/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir +++ b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir @@ -43,12 +43,6 @@ fn use_x(_1: &'_#6r mut i32, _2: &'_#7r u32, _3: &'_#8r u32, _4: &'_#9r u32) -> bb0: { _0 = const Const(Value(Scalar(0x01)): bool); // bb0[0]: scope 0 at $DIR/named-lifetimes-basic.rs:12:88: 12:92 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/named-lifetimes-basic.rs:12:88: 12:92 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } return; // bb0[1]: scope 0 at $DIR/named-lifetimes-basic.rs:12:94: 12:94 } } diff --git a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit index e3f113fea2851..3a8426a41a34f 100644 --- a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit +++ b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit @@ -46,34 +46,10 @@ fn main() -> () { bb0: { StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 _1 = [const Const(Value(Scalar(0x00000001)): usize), const Const(Value(Scalar(0x00000002)): usize), const Const(Value(Scalar(0x00000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:17:18: 17:19 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:17:21: 17:22 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:17:24: 17:25 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) } FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10 StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17 _3 = const Const(Value(Scalar(0x00000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:18:16: 18:17 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } _4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 _5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 @@ -91,12 +67,6 @@ fn main() -> () { FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10 StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 _7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:20:8: 20:12 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 } @@ -114,12 +84,6 @@ fn main() -> () { // mir::Constant // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14 // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar()) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000016)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:23:15: 23:17 - // + literal: Const { ty: usize, val: Value(Scalar(0x00000016)) } } bb5: { diff --git a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit index a69952ff07f34..5220ab4cae8f1 100644 --- a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit +++ b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit @@ -46,34 +46,10 @@ fn main() -> () { bb0: { StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 _1 = [const Const(Value(Scalar(0x0000000000000001)): usize), const Const(Value(Scalar(0x0000000000000002)): usize), const Const(Value(Scalar(0x0000000000000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:17:18: 17:19 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000002)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:17:21: 17:22 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000003)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:17:24: 17:25 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) } FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10 StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17 _3 = const Const(Value(Scalar(0x0000000000000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:18:16: 18:17 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } _4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 _5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 @@ -91,12 +67,6 @@ fn main() -> () { FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10 StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 _7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 - // ty::Const - // + ty: bool - // + val: Value(Scalar(0x01)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:20:8: 20:12 - // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 } @@ -114,12 +84,6 @@ fn main() -> () { // mir::Constant // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14 // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar()) } - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000016)) - // mir::Constant - // + span: $DIR/region-subtyping-basic.rs:23:15: 23:17 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000016)) } } bb5: { diff --git a/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff index 18fbffb463067..924e87ea8c0ad 100644 --- a/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff +++ b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff @@ -19,12 +19,6 @@ - StorageLive(_2); // scope 0 at $DIR/nrvo-simple.rs:3:9: 3:16 - _2 = [const 0_u8; 1024]; // scope 0 at $DIR/nrvo-simple.rs:3:19: 3:28 + _0 = [const 0_u8; 1024]; // scope 0 at $DIR/nrvo-simple.rs:3:19: 3:28 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/nrvo-simple.rs:3:20: 3:21 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } StorageLive(_3); // scope 1 at $DIR/nrvo-simple.rs:4:5: 4:19 StorageLive(_5); // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18 StorageLive(_6); // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18 diff --git a/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit index 075c7647c671f..a0214e5b9c501 100644 --- a/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit +++ b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit @@ -17,12 +17,6 @@ fn main() -> () { 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 0_usize); // 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); // 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 @@ -30,12 +24,6 @@ fn main() -> () { 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 0_usize); // 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); // 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 diff --git a/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit index 99a74b6b24f7f..a0214e5b9c501 100644 --- a/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit +++ b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit @@ -17,12 +17,6 @@ fn main() -> () { 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 0_usize); // 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); // 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 @@ -30,12 +24,6 @@ fn main() -> () { 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 0_usize); // 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); // 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 diff --git a/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff index 0822d8cc03c60..2b7e4bbffe9e0 100644 --- a/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff +++ b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff @@ -21,12 +21,6 @@ bb1: { _0 = const 1_i32; // 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; // scope 0 at $DIR/remove_fake_borrows.rs:7:5: 10:6 } @@ -63,12 +57,6 @@ + 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 0_i32; // 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; // scope 0 at $DIR/remove_fake_borrows.rs:7:5: 10:6 } diff --git a/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir index b61d936837512..5521ead29dbe8 100644 --- a/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir @@ -57,23 +57,11 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/retag.rs:30:9: 30:14 _1 = const 0_i32; // 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); // 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 0_i32); // 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; // 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 @@ -171,12 +159,6 @@ fn main() -> () { 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 0_i32); // 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; // 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 diff --git a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit index da3191554f0e0..64ca4b578036d 100644 --- a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit +++ b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit @@ -19,23 +19,11 @@ fn match_bool(_1: bool) -> usize { bb3: { _0 = const 20_usize; // 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; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } bb4: { _0 = const 10_usize; // 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; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } diff --git a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit index 55b51a899bc50..64ca4b578036d 100644 --- a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit +++ b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit @@ -19,23 +19,11 @@ fn match_bool(_1: bool) -> usize { bb3: { _0 = const 20_usize; // 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; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } bb4: { _0 = const 10_usize; // 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; // scope 0 at $DIR/simple-match.rs:6:5: 9:6 } diff --git a/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit index b7b239ea414d6..db42c5ad8ba8a 100644 --- a/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit +++ b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit @@ -20,32 +20,14 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/simplify-arm-identity.rs:18:9: 18:10 ((_1 as Foo).0: u8) = const 0_u8; // scope 0 at $DIR/simplify-arm-identity.rs:18:18: 18:29 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:18:27: 18:28 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } discriminant(_1) = 0; // scope 0 at $DIR/simplify-arm-identity.rs:18:18: 18:29 StorageLive(_2); // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6 _3 = const 0_isize; // scope 1 at $DIR/simplify-arm-identity.rs:20:9: 20:20 - // ty::Const - // + ty: isize - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:20:9: 20:20 - // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) } goto -> bb3; // scope 1 at $DIR/simplify-arm-identity.rs:20:9: 20:20 } bb1: { ((_2 as Foo).0: u8) = const 0_u8; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:21:30: 21:31 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } discriminant(_2) = 0; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32 goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6 } diff --git a/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit index 34282526da0fa..db42c5ad8ba8a 100644 --- a/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit +++ b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit @@ -20,32 +20,14 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/simplify-arm-identity.rs:18:9: 18:10 ((_1 as Foo).0: u8) = const 0_u8; // scope 0 at $DIR/simplify-arm-identity.rs:18:18: 18:29 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:18:27: 18:28 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } discriminant(_1) = 0; // scope 0 at $DIR/simplify-arm-identity.rs:18:18: 18:29 StorageLive(_2); // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6 _3 = const 0_isize; // scope 1 at $DIR/simplify-arm-identity.rs:20:9: 20:20 - // ty::Const - // + ty: isize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:20:9: 20:20 - // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) } goto -> bb3; // scope 1 at $DIR/simplify-arm-identity.rs:20:9: 20:20 } bb1: { ((_2 as Foo).0: u8) = const 0_u8; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:21:30: 21:31 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } discriminant(_2) = 0; // scope 1 at $DIR/simplify-arm-identity.rs:21:21: 21:32 goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6 } diff --git a/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff index e94e49bf0cb4f..44bf4400e159e 100644 --- a/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff +++ b/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff @@ -9,19 +9,7 @@ bb0: { 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]; // 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; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 } diff --git a/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff index 720296a2c66b0..8a3fd7d970944 100644 --- a/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff +++ b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff @@ -52,12 +52,6 @@ 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 42_u8); // 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); // 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 } diff --git a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff index 8b5936116b3a7..99b38f3c57a99 100644 --- a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff +++ b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff @@ -85,43 +85,19 @@ - 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.0: u8) = const 40_u8; // 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 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 - // ty::Const -- // + ty: u8 -- // + val: Value(Scalar(0x28)) -- // mir::Constant -- // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:23: 16:25 -- // + literal: Const { ty: u8, val: Value(Scalar(0x28)) } - _10 = const 40_u8; // 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)) } - _9 = const 42_u8; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34 -- // ty::Const -- // + ty: u8 -- // + val: Value(Scalar(0x2a)) -- // mir::Constant -- // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34 -- // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) } - StorageDead(_10); // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34 - _8 = const use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 -- // ty::Const ++ 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 42_u8) -> 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()) // mir::Constant // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:11 // + literal: Const { ty: fn(u8) {use_u8}, val: Value(Scalar()) } - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x2a)) - // mir::Constant - // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35 - // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) } } bb2: { diff --git a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit index 9e840553ecabd..4418c9f12b392 100644 --- a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit +++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit @@ -16,19 +16,7 @@ bb0: { - _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // ty::Const -- // + ty: bool -- // + val: Value(Scalar(0x00)) -- // mir::Constant -- // + span: $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // ty::Const -- // + ty: bool -- // + val: Value(Scalar(0x01)) -- // mir::Constant -- // + span: $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 _0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27 - _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2 diff --git a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit index 9e840553ecabd..4418c9f12b392 100644 --- a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit +++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit @@ -16,19 +16,7 @@ bb0: { - _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // ty::Const -- // + ty: bool -- // + val: Value(Scalar(0x00)) -- // mir::Constant -- // + span: $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } - _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // ty::Const -- // + ty: bool -- // + val: Value(Scalar(0x01)) -- // mir::Constant -- // + span: $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 -- // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } - _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 _0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27 - _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2 diff --git a/src/test/mir-opt/simplify_match.main.ConstProp.diff b/src/test/mir-opt/simplify_match.main.ConstProp.diff index 8003112c46c4b..aba5fafa3a476 100644 --- a/src/test/mir-opt/simplify_match.main.ConstProp.diff +++ b/src/test/mir-opt/simplify_match.main.ConstProp.diff @@ -13,29 +13,11 @@ StorageLive(_1); // scope 0 at $DIR/simplify_match.rs:6:11: 6:31 StorageLive(_2); // scope 0 at $DIR/simplify_match.rs:6:17: 6:18 _2 = const false; // scope 0 at $DIR/simplify_match.rs:6:21: 6:26 - // 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)) } - _1 = _2; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29 + _1 = const false; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29 -+ // ty::Const -+ // + ty: bool -+ // + val: Value(Scalar(0x00)) -+ // mir::Constant -+ // + span: $DIR/simplify_match.rs:6:28: 6:29 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } StorageDead(_2); // scope 0 at $DIR/simplify_match.rs:6:30: 6:31 - switchInt(_1) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13 + 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:7:9: 7:13 -+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) } } bb1: { diff --git a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit index b3ee08c3e033e..50cfe19974a7c 100644 --- a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit +++ b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit @@ -32,12 +32,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb3 (cleanup): { _5 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _4 = Add(move _4, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } drop((*_5)) -> bb4; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -49,12 +43,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb5: { _7 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _4 = Add(move _4, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } drop((*_7)) -> [return: bb6, unwind: bb4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -65,12 +53,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb7: { _4 = const 0_usize; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) } goto -> bb6; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -81,12 +63,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb9 (cleanup): { _11 = _9; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _9 = Offset(move _9, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } drop((*_11)) -> bb10; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -98,12 +74,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb11: { _13 = _9; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _9 = Offset(move _9, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) } drop((*_13)) -> [return: bb12, unwind: bb10]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } diff --git a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit index ea22af65dda4f..50cfe19974a7c 100644 --- a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit +++ b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit @@ -32,12 +32,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb3 (cleanup): { _5 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _4 = Add(move _4, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } drop((*_5)) -> bb4; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -49,12 +43,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb5: { _7 = &raw mut (*_1)[_4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _4 = Add(move _4, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } drop((*_7)) -> [return: bb6, unwind: bb4]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -65,12 +53,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb7: { _4 = const 0_usize; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } goto -> bb6; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -81,12 +63,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb9 (cleanup): { _11 = _9; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _9 = Offset(move _9, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } drop((*_11)) -> bb10; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } @@ -98,12 +74,6 @@ fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { bb11: { _13 = _9; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _9 = Offset(move _9, const 1_usize); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000001)) - // mir::Constant - // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) } drop((*_13)) -> [return: bb12, unwind: bb10]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL } diff --git a/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir b/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir index d7f73a22c26fd..09ce2bdc95da1 100644 --- a/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir +++ b/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir @@ -60,592 +60,88 @@ static XXX: &Foo = { 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 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:9: 8:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:8:10: 8:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:8:13: 8:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_8); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:17: 8:23 _8 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:17: 8:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:8:18: 8:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:8:21: 8:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_9); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:25: 8:31 _9 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:8:25: 8:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:8:26: 8:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:8:29: 8:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_10); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:9: 9:15 _10 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:9: 9:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:9:10: 9:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:9:13: 9:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_11); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:17: 9:23 _11 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:17: 9:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:9:18: 9:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:9:21: 9:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_12); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:25: 9:31 _12 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:9:25: 9:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:9:26: 9:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:9:29: 9:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_13); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:9: 10:15 _13 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:9: 10:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:10:10: 10:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:10:13: 10:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_14); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:17: 10:23 _14 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:17: 10:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:10:18: 10:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:10:21: 10:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_15); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:25: 10:31 _15 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:10:25: 10:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:10:26: 10:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:10:29: 10:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_16); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:9: 11:15 _16 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:9: 11:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:11:10: 11:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:11:13: 11:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_17); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:17: 11:23 _17 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:17: 11:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:11:18: 11:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:11:21: 11:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_18); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:25: 11:31 _18 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:11:25: 11:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:11:26: 11:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:11:29: 11:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_19); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:9: 12:15 _19 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:9: 12:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:12:10: 12:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:12:13: 12:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_20); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:17: 12:23 _20 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:17: 12:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:12:18: 12:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:12:21: 12:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_21); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:25: 12:31 _21 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:12:25: 12:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:12:26: 12:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:12:29: 12:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_22); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:9: 13:15 _22 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:9: 13:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:13:10: 13:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:13:13: 13:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_23); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:17: 13:23 _23 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:17: 13:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:13:18: 13:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:13:21: 13:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_24); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:25: 13:31 _24 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:13:25: 13:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:13:26: 13:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:13:29: 13:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_25); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:9: 14:15 _25 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:9: 14:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:14:10: 14:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:14:13: 14:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_26); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:17: 14:23 _26 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:17: 14:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:14:18: 14:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:14:21: 14:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_27); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:25: 14:31 _27 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:14:25: 14:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:14:26: 14:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:14:29: 14:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_28); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:9: 15:15 _28 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:9: 15:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:15:10: 15:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:15:13: 15:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_29); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:17: 15:23 _29 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:17: 15:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:15:18: 15:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:15:21: 15:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_30); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:25: 15:31 _30 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:15:25: 15:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:15:26: 15:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:15:29: 15:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_31); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:9: 16:15 _31 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:9: 16:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:16:10: 16:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:16:13: 16:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:17: 16:23 _32 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:17: 16:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:16:18: 16:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:16:21: 16:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_33); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:25: 16:31 _33 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:16:25: 16:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:16:26: 16:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:16:29: 16:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_34); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:9: 17:15 _34 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:9: 17:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:17:10: 17:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:17:13: 17:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_35); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:17: 17:23 _35 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:17: 17:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:17:18: 17:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:17:21: 17:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_36); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:25: 17:31 _36 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:17:25: 17:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:17:26: 17:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:17:29: 17:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_37); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:9: 18:15 _37 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:9: 18:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:18:10: 18:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:18:13: 18:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_38); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:17: 18:23 _38 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:17: 18:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:18:18: 18:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:18:21: 18:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_39); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:25: 18:31 _39 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:18:25: 18:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:18:26: 18:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:18:29: 18:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_40); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:9: 19:15 _40 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:9: 19:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:19:10: 19:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:19:13: 19:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_41); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:17: 19:23 _41 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:17: 19:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:19:18: 19:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:19:21: 19:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_42); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:25: 19:31 _42 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:19:25: 19:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:19:26: 19:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:19:29: 19:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_43); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:9: 20:15 _43 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:9: 20:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:20:10: 20:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:20:13: 20:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_44); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:17: 20:23 _44 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:17: 20:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:20:18: 20:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:20:21: 20:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_45); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:25: 20:31 _45 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:20:25: 20:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:20:26: 20:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:20:29: 20:30 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) } StorageLive(_46); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:9: 21:15 _46 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:9: 21:15 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:21:10: 21:11 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:21:13: 21:14 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) } StorageLive(_47); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:17: 21:23 _47 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:17: 21:23 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:21:18: 21:19 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000002)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:21:21: 21:22 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) } StorageLive(_48); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 _48 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:21:25: 21:31 - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/storage_live_dead_in_statics.rs:21:26: 21:27 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } - // ty::Const - // + ty: u32 - // + val: Value(Scalar(0x00000003)) - // 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]; // 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 diff --git a/src/test/mir-opt/storage_ranges.main.nll.0.mir b/src/test/mir-opt/storage_ranges.main.nll.0.mir index 099535c0ad279..d51afe3d90307 100644 --- a/src/test/mir-opt/storage_ranges.main.nll.0.mir +++ b/src/test/mir-opt/storage_ranges.main.nll.0.mir @@ -39,12 +39,6 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/storage_ranges.rs:4:9: 4:10 _1 = const 0_i32; // 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); // 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 @@ -67,12 +61,6 @@ fn main() -> () { 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 1_i32; // 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); // 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 diff --git a/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir b/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir index 5ceca2d091e30..6591328423f5a 100644 --- a/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir +++ b/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir @@ -19,12 +19,6 @@ fn main() -> () { StorageLive(_3); // scope 2 at $DIR/tls-access.rs:9:9: 9:12 _3 = &/*tls*/ mut FOO; // scope 2 at $DIR/tls-access.rs:9:9: 9:12 (*_3) = const 42_u8; // scope 2 at $DIR/tls-access.rs:9:9: 9:17 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x2a)) - // mir::Constant - // + span: $DIR/tls-access.rs:9:15: 9:17 - // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) } StorageDead(_3); // scope 2 at $DIR/tls-access.rs:9:17: 9:18 _0 = const (); // scope 1 at $DIR/tls-access.rs:7:5: 10:6 // ty::Const diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir index eb40baa2000f8..41d4f75bd3aad 100644 --- a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir +++ b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir @@ -21,12 +21,6 @@ fn move_out_by_subslice() -> () { 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 1_i32; // 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; // 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 } @@ -49,12 +43,6 @@ fn move_out_by_subslice() -> () { 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 2_i32; // 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; // 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 } diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir index 7beceb66577fe..1f29ea152b03f 100644 --- a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir +++ b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir @@ -21,12 +21,6 @@ fn move_out_from_end() -> () { 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 1_i32; // 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; // 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 } @@ -49,12 +43,6 @@ fn move_out_from_end() -> () { 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 2_i32; // 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; // 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 } diff --git a/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff index e7abf57880047..16c27fff7e62f 100644 --- a/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff @@ -53,23 +53,11 @@ - 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]; // scope 2 at $DIR/unreachable.rs:12:9: 16:10 - } - - bb4: { - _4 = const 42_i32; // 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 (); // scope 2 at $DIR/unreachable.rs:14:16: 16:10 - // ty::Const - // + ty: () @@ -82,12 +70,6 @@ - - bb5: { - _4 = const 21_i32; // 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 (); // scope 2 at $DIR/unreachable.rs:12:17: 14:10 - // ty::Const - // + ty: () diff --git a/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff index 50694900024a0..bd5346f663fe9 100644 --- a/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff @@ -55,23 +55,11 @@ 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]; // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10 } bb4: { _4 = const 42_i32; // 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 (); // scope 2 at $DIR/unreachable_asm.rs:16:16: 18:10 // ty::Const // + ty: () @@ -84,12 +72,6 @@ bb5: { _4 = const 21_i32; // 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 (); // scope 2 at $DIR/unreachable_asm.rs:14:17: 16:10 // ty::Const // + ty: () diff --git a/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff index 9be05aefcf69e..41c60b9c95784 100644 --- a/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff @@ -58,12 +58,6 @@ 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]; // scope 2 at $DIR/unreachable_asm_2.rs:14:9: 22:10 } @@ -79,12 +73,6 @@ // + literal: Const { ty: (), val: Value(Scalar()) } StorageDead(_8); // scope 2 at $DIR/unreachable_asm_2.rs:20:40: 20:41 _4 = const 42_i32; // 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 (); // scope 2 at $DIR/unreachable_asm_2.rs:18:16: 22:10 // ty::Const // + ty: () @@ -108,12 +96,6 @@ // + literal: Const { ty: (), val: Value(Scalar()) } StorageDead(_7); // scope 2 at $DIR/unreachable_asm_2.rs:16:40: 16:41 _4 = const 21_i32; // 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 (); // scope 2 at $DIR/unreachable_asm_2.rs:14:17: 18:10 // ty::Const // + ty: () diff --git a/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff index e7886f683c07e..e1c195ad303e4 100644 --- a/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff +++ b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff @@ -20,12 +20,6 @@ bb0: { 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); // 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 diff --git a/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit index 7f0266d658992..315525e08c21c 100644 --- a/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit +++ b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit @@ -5,12 +5,6 @@ E::V::{{constant}}#0: isize = { bb0: { _0 = const 5_isize; // 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; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 } diff --git a/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit index f2c1e9c97ddfe..315525e08c21c 100644 --- a/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit +++ b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit @@ -5,12 +5,6 @@ E::V::{{constant}}#0: isize = { bb0: { _0 = const 5_isize; // 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; // scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10 } diff --git a/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit index 4af856c654eed..fd3d707d53969 100644 --- a/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit +++ b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit @@ -5,12 +5,6 @@ const ::ASSOCIATED_CONSTANT: i32 = bb0: { _0 = const 2_i32; // 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; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 } diff --git a/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit index 4af856c654eed..fd3d707d53969 100644 --- a/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit +++ b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit @@ -5,12 +5,6 @@ const ::ASSOCIATED_CONSTANT: i32 = bb0: { _0 = const 2_i32; // 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; // scope 0 at $DIR/unusual-item-types.rs:10:5: 10:40 } diff --git a/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.32bit b/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.32bit index ff98b0e32268a..4705309e74624 100644 --- a/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.32bit +++ b/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.32bit @@ -16,30 +16,12 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15 _1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/while_let_loops.rs:6:18: 6:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageLive(_3); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 discriminant(_3) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 - _4 = discriminant(_3); // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 - switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 + _4 = const 0_isize; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/while_let_loops.rs:7:15: 7:25 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) } + switchInt(const 0_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x00000000)) -+ // mir::Constant -+ // + span: $DIR/while_let_loops.rs:7:15: 7:25 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) } } bb1: { @@ -59,12 +41,6 @@ bb3: { _1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/while_let_loops.rs:8:14: 8:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } _0 = const (); // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14 // ty::Const // + ty: () diff --git a/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.64bit b/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.64bit index 612d44f413fe7..4705309e74624 100644 --- a/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.64bit +++ b/src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.diff.64bit @@ -16,30 +16,12 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15 _1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/while_let_loops.rs:6:18: 6:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageLive(_3); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 discriminant(_3) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 - _4 = discriminant(_3); // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 - switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 + _4 = const 0_isize; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x0000000000000000)) -+ // mir::Constant -+ // + span: $DIR/while_let_loops.rs:7:15: 7:25 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) } + switchInt(const 0_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25 -+ // ty::Const -+ // + ty: isize -+ // + val: Value(Scalar(0x0000000000000000)) -+ // mir::Constant -+ // + span: $DIR/while_let_loops.rs:7:15: 7:25 -+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) } } bb1: { @@ -59,12 +41,6 @@ bb3: { _1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000001)) - // mir::Constant - // + span: $DIR/while_let_loops.rs:8:14: 8:15 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } _0 = const (); // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14 // ty::Const // + ty: () diff --git a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.32bit b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.32bit index f6fe12489199d..5c4b18e6f522f 100644 --- a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.32bit +++ b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.32bit @@ -11,12 +11,6 @@ fn change_loop_body() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15 _1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/while_let_loops.rs:6:18: 6:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageLive(_2); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 discriminant(_2) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 _0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6 diff --git a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.64bit b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.64bit index f6fe12489199d..5c4b18e6f522f 100644 --- a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.64bit +++ b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir.64bit @@ -11,12 +11,6 @@ fn change_loop_body() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15 _1 = const 0_i32; // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19 - // ty::Const - // + ty: i32 - // + val: Value(Scalar(0x00000000)) - // mir::Constant - // + span: $DIR/while_let_loops.rs:6:18: 6:19 - // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } StorageLive(_2); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 discriminant(_2) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32 _0 = const (); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6