Skip to content

Commit 128ccc3

Browse files
committed
Bless mir-opt tests
1 parent 9d5c961 commit 128ccc3

10 files changed

+38
-98
lines changed

tests/mir-opt/pre-codegen/ptr_offset.demo_byte_add_fat.PreCodegen.after.panic-abort.mir

+3-9
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@ fn demo_byte_add_fat(_1: *const [u32], _2: usize) -> *const [u32] {
1010
scope 2 (inlined std::ptr::const_ptr::<impl *const [u32]>::cast::<u8>) {
1111
}
1212
scope 3 (inlined std::ptr::const_ptr::<impl *const u8>::add) {
13-
scope 4 (inlined core::ub_checks::check_language_ub) {
14-
scope 5 (inlined core::ub_checks::check_language_ub::runtime) {
15-
}
16-
}
17-
scope 6 (inlined std::mem::size_of::<u8>) {
18-
}
1913
}
20-
scope 7 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<[u32]>) {
14+
scope 4 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<[u32]>) {
2115
let mut _5: usize;
22-
scope 8 (inlined std::ptr::metadata::<[u32]>) {
16+
scope 5 (inlined std::ptr::metadata::<[u32]>) {
2317
}
24-
scope 9 (inlined std::ptr::from_raw_parts::<[u32], ()>) {
18+
scope 6 (inlined std::ptr::from_raw_parts::<[u32], ()>) {
2519
}
2620
}
2721
}

tests/mir-opt/pre-codegen/ptr_offset.demo_byte_add_fat.PreCodegen.after.panic-unwind.mir

+3-9
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@ fn demo_byte_add_fat(_1: *const [u32], _2: usize) -> *const [u32] {
1010
scope 2 (inlined std::ptr::const_ptr::<impl *const [u32]>::cast::<u8>) {
1111
}
1212
scope 3 (inlined std::ptr::const_ptr::<impl *const u8>::add) {
13-
scope 4 (inlined core::ub_checks::check_language_ub) {
14-
scope 5 (inlined core::ub_checks::check_language_ub::runtime) {
15-
}
16-
}
17-
scope 6 (inlined std::mem::size_of::<u8>) {
18-
}
1913
}
20-
scope 7 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<[u32]>) {
14+
scope 4 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<[u32]>) {
2115
let mut _5: usize;
22-
scope 8 (inlined std::ptr::metadata::<[u32]>) {
16+
scope 5 (inlined std::ptr::metadata::<[u32]>) {
2317
}
24-
scope 9 (inlined std::ptr::from_raw_parts::<[u32], ()>) {
18+
scope 6 (inlined std::ptr::from_raw_parts::<[u32], ()>) {
2519
}
2620
}
2721
}

tests/mir-opt/pre-codegen/ptr_offset.demo_byte_add_thin.PreCodegen.after.panic-abort.mir

+3-9
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@ fn demo_byte_add_thin(_1: *const u32, _2: usize) -> *const u32 {
1010
scope 2 (inlined std::ptr::const_ptr::<impl *const u32>::cast::<u8>) {
1111
}
1212
scope 3 (inlined std::ptr::const_ptr::<impl *const u8>::add) {
13-
scope 4 (inlined core::ub_checks::check_language_ub) {
14-
scope 5 (inlined core::ub_checks::check_language_ub::runtime) {
15-
}
16-
}
17-
scope 6 (inlined std::mem::size_of::<u8>) {
18-
}
1913
}
20-
scope 7 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<u32>) {
21-
scope 8 (inlined std::ptr::metadata::<u32>) {
14+
scope 4 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<u32>) {
15+
scope 5 (inlined std::ptr::metadata::<u32>) {
2216
}
23-
scope 9 (inlined std::ptr::from_raw_parts::<u32, ()>) {
17+
scope 6 (inlined std::ptr::from_raw_parts::<u32, ()>) {
2418
}
2519
}
2620
}

tests/mir-opt/pre-codegen/ptr_offset.demo_byte_add_thin.PreCodegen.after.panic-unwind.mir

+3-9
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@ fn demo_byte_add_thin(_1: *const u32, _2: usize) -> *const u32 {
1010
scope 2 (inlined std::ptr::const_ptr::<impl *const u32>::cast::<u8>) {
1111
}
1212
scope 3 (inlined std::ptr::const_ptr::<impl *const u8>::add) {
13-
scope 4 (inlined core::ub_checks::check_language_ub) {
14-
scope 5 (inlined core::ub_checks::check_language_ub::runtime) {
15-
}
16-
}
17-
scope 6 (inlined std::mem::size_of::<u8>) {
18-
}
1913
}
20-
scope 7 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<u32>) {
21-
scope 8 (inlined std::ptr::metadata::<u32>) {
14+
scope 4 (inlined std::ptr::const_ptr::<impl *const u8>::with_metadata_of::<u32>) {
15+
scope 5 (inlined std::ptr::metadata::<u32>) {
2216
}
23-
scope 9 (inlined std::ptr::from_raw_parts::<u32, ()>) {
17+
scope 6 (inlined std::ptr::from_raw_parts::<u32, ()>) {
2418
}
2519
}
2620
}

tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-abort.mir

+13-19
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,30 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
1919
debug i => _22;
2020
debug x => _23;
2121
}
22-
scope 20 (inlined <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next) {
22+
scope 17 (inlined <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next) {
2323
let mut _14: &mut std::slice::Iter<'_, T>;
2424
let mut _15: std::option::Option<&T>;
2525
let mut _19: (usize, bool);
2626
let mut _20: (usize, &T);
27-
scope 21 {
27+
scope 18 {
2828
let _18: usize;
29-
scope 26 {
29+
scope 23 {
3030
}
3131
}
32-
scope 22 {
33-
scope 23 {
34-
scope 29 (inlined <Option<(usize, &T)> as FromResidual<Option<Infallible>>>::from_residual) {
32+
scope 19 {
33+
scope 20 {
34+
scope 26 (inlined <Option<(usize, &T)> as FromResidual<Option<Infallible>>>::from_residual) {
3535
}
3636
}
3737
}
38-
scope 24 {
39-
scope 25 {
38+
scope 21 {
39+
scope 22 {
4040
}
4141
}
42-
scope 27 (inlined <Option<&T> as Try>::branch) {
42+
scope 24 (inlined <Option<&T> as Try>::branch) {
4343
let mut _16: isize;
4444
let _17: &T;
45-
scope 28 {
45+
scope 25 {
4646
}
4747
}
4848
}
@@ -64,12 +64,6 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
6464
scope 12 (inlined NonNull::<T>::as_ptr) {
6565
}
6666
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
67-
scope 14 (inlined core::ub_checks::check_language_ub) {
68-
scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
69-
}
70-
}
71-
scope 16 (inlined std::mem::size_of::<T>) {
72-
}
7367
}
7468
}
7569
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
@@ -83,11 +77,11 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
8377
}
8478
}
8579
}
86-
scope 17 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
87-
scope 18 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
80+
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
81+
scope 15 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
8882
}
8983
}
90-
scope 19 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
84+
scope 16 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
9185
}
9286

9387
bb0: {

tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.PreCodegen.after.panic-unwind.mir

+3-9
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
3939
scope 12 (inlined NonNull::<T>::as_ptr) {
4040
}
4141
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
42-
scope 14 (inlined core::ub_checks::check_language_ub) {
43-
scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
44-
}
45-
}
46-
scope 16 (inlined std::mem::size_of::<T>) {
47-
}
4842
}
4943
}
5044
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
@@ -58,11 +52,11 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
5852
}
5953
}
6054
}
61-
scope 17 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
62-
scope 18 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
55+
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
56+
scope 15 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
6357
}
6458
}
65-
scope 19 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
59+
scope 16 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
6660
}
6761

6862
bb0: {

tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-abort.mir

+1-7
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
3636
scope 12 (inlined NonNull::<T>::as_ptr) {
3737
}
3838
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
39-
scope 14 (inlined core::ub_checks::check_language_ub) {
40-
scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
41-
}
42-
}
43-
scope 16 (inlined std::mem::size_of::<T>) {
44-
}
4539
}
4640
}
4741
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
@@ -55,7 +49,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
5549
}
5650
}
5751
}
58-
scope 17 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
52+
scope 14 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
5953
}
6054

6155
bb0: {

tests/mir-opt/pre-codegen/slice_iter.forward_loop.PreCodegen.after.panic-unwind.mir

+1-7
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
3636
scope 12 (inlined NonNull::<T>::as_ptr) {
3737
}
3838
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
39-
scope 14 (inlined core::ub_checks::check_language_ub) {
40-
scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
41-
}
42-
}
43-
scope 16 (inlined std::mem::size_of::<T>) {
44-
}
4539
}
4640
}
4741
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
@@ -55,7 +49,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
5549
}
5650
}
5751
}
58-
scope 17 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
52+
scope 14 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
5953
}
6054

6155
bb0: {

tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-abort.mir

+4-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
1818
scope 2 {
1919
debug x => _17;
2020
}
21-
scope 20 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
21+
scope 17 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
2222
let mut _14: &mut std::slice::Iter<'_, T>;
2323
}
2424
}
@@ -39,12 +39,6 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
3939
scope 12 (inlined NonNull::<T>::as_ptr) {
4040
}
4141
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
42-
scope 14 (inlined core::ub_checks::check_language_ub) {
43-
scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
44-
}
45-
}
46-
scope 16 (inlined std::mem::size_of::<T>) {
47-
}
4842
}
4943
}
5044
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
@@ -58,11 +52,11 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
5852
}
5953
}
6054
}
61-
scope 17 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
62-
scope 18 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
55+
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
56+
scope 15 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
6357
}
6458
}
65-
scope 19 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
59+
scope 16 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
6660
}
6761

6862
bb0: {

tests/mir-opt/pre-codegen/slice_iter.reverse_loop.PreCodegen.after.panic-unwind.mir

+4-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
1818
scope 2 {
1919
debug x => _17;
2020
}
21-
scope 20 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
21+
scope 17 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
2222
let mut _14: &mut std::slice::Iter<'_, T>;
2323
}
2424
}
@@ -39,12 +39,6 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
3939
scope 12 (inlined NonNull::<T>::as_ptr) {
4040
}
4141
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
42-
scope 14 (inlined core::ub_checks::check_language_ub) {
43-
scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
44-
}
45-
}
46-
scope 16 (inlined std::mem::size_of::<T>) {
47-
}
4842
}
4943
}
5044
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
@@ -58,11 +52,11 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
5852
}
5953
}
6054
}
61-
scope 17 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
62-
scope 18 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
55+
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
56+
scope 15 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
6357
}
6458
}
65-
scope 19 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
59+
scope 16 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
6660
}
6761

6862
bb0: {

0 commit comments

Comments
 (0)