Skip to content

Commit dd27a59

Browse files
committed
Bless or tweak the mir-opt tests
1 parent 6ddbf3b commit dd27a59

19 files changed

+48
-50
lines changed

tests/mir-opt/const_debuginfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ test-mir-pass: SingleUseConsts
2-
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
2+
//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN -C debuginfo=full
33

44
#![allow(unused)]
55

tests/mir-opt/issue_76432.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// skip-filecheck
2+
//@ compile-flags: -C debuginfo=full
23
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
34
// Check that we do not insert StorageDead at each target if StorageDead was never seen
45

tests/mir-opt/pre-codegen/derived_ord.{impl#0}-partial_cmp.PreCodegen.after.mir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ fn <impl at $DIR/derived_ord.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &M
77
let mut _6: std::option::Option<std::cmp::Ordering>;
88
let mut _7: i8;
99
scope 1 {
10-
debug cmp => _6;
1110
}
1211
scope 2 (inlined std::cmp::impls::<impl PartialOrd for char>::partial_cmp) {
1312
let mut _3: char;

tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,34 @@
1818
debug ptr => _3;
1919
}
2020
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
21+
debug self => _9;
22+
debug layout => _8;
2123
}
2224
scope 6 (inlined #[track_caller] Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap) {
25+
debug self => _6;
2326
let mut _12: isize;
2427
let _13: std::alloc::AllocError;
2528
let mut _14: !;
2629
let mut _15: &dyn std::fmt::Debug;
2730
let mut _16: &std::alloc::AllocError;
2831
scope 7 {
32+
debug t => _5;
2933
}
3034
scope 8 {
35+
debug e => const std::alloc::AllocError;
3136
}
3237
}
3338
scope 9 (inlined NonNull::<[u8]>::as_ptr) {
39+
debug self => _5;
3440
let mut _17: *const [u8];
3541
}
3642
}
3743
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
44+
debug self => _2;
3845
let mut _10: isize;
3946
let mut _11: !;
4047
scope 4 {
48+
debug val => _1;
4149
}
4250
}
4351

tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@
1818
debug ptr => _3;
1919
}
2020
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
21+
debug self => _9;
22+
debug layout => _8;
2123
}
2224
scope 6 (inlined NonNull::<[u8]>::as_ptr) {
25+
debug self => _5;
2326
let mut _12: *const [u8];
2427
}
2528
}
2629
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
30+
debug self => _2;
2731
let mut _10: isize;
2832
let mut _11: !;
2933
scope 4 {
34+
debug val => _1;
3035
}
3136
}
3237

tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,34 @@
1818
debug ptr => _3;
1919
}
2020
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
21+
debug self => _9;
22+
debug layout => _8;
2123
}
2224
scope 6 (inlined #[track_caller] Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap) {
25+
debug self => _6;
2326
let mut _12: isize;
2427
let _13: std::alloc::AllocError;
2528
let mut _14: !;
2629
let mut _15: &dyn std::fmt::Debug;
2730
let mut _16: &std::alloc::AllocError;
2831
scope 7 {
32+
debug t => _5;
2933
}
3034
scope 8 {
35+
debug e => const std::alloc::AllocError;
3136
}
3237
}
3338
scope 9 (inlined NonNull::<[u8]>::as_ptr) {
39+
debug self => _5;
3440
let mut _17: *const [u8];
3541
}
3642
}
3743
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
44+
debug self => _2;
3845
let mut _10: isize;
3946
let mut _11: !;
4047
scope 4 {
48+
debug val => _1;
4149
}
4250
}
4351

tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@
1818
debug ptr => _3;
1919
}
2020
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
21+
debug self => _9;
22+
debug layout => _8;
2123
}
2224
scope 6 (inlined NonNull::<[u8]>::as_ptr) {
25+
debug self => _5;
2326
let mut _12: *const [u8];
2427
}
2528
}
2629
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
30+
debug self => _2;
2731
let mut _10: isize;
2832
let mut _11: !;
2933
scope 4 {
34+
debug val => _1;
3035
}
3136
}
3237

tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Verify that we do not ICE when printing an invalid constant.
22
// EMIT_MIR_FOR_EACH_BIT_WIDTH
33
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
4+
//@ compile-flags: -C debuginfo=full
45

56
#![feature(allocator_api)]
67

tests/mir-opt/pre-codegen/optimizes_into_variable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// skip-filecheck
22
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3-
//@ compile-flags: -C overflow-checks=on
3+
//@ compile-flags: -C overflow-checks=on -C debuginfo=2
44

55
struct Point {
66
x: u32,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
1212
let _13: ();
1313
scope 1 {
1414
debug ((iter: std::ops::Range<u32>).0: u32) => _4;
15-
debug ((iter: std::ops::Range<u32>).1: u32) => _2;
1615
let _10: u32;
1716
scope 2 {
1817
debug x => _10;

0 commit comments

Comments
 (0)