Skip to content

Commit

Permalink
Update MIR tests with comment verbosity fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alasher committed Aug 17, 2020
1 parent bf1c024 commit 28ac141
Show file tree
Hide file tree
Showing 131 changed files with 30 additions and 3,679 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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: ()
Expand Down
24 changes: 0 additions & 24 deletions src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down
24 changes: 0 additions & 24 deletions src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down
33 changes: 0 additions & 33 deletions src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff
Expand Up @@ -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
Expand Down

0 comments on commit 28ac141

Please sign in to comment.