Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable more mir-opt tests in debug builds #122921

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ unit-test: DataflowConstProp
//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline
//@ ignore-debug assertions change the output MIR
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/funky_arms.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ compile-flags: --crate-type lib -Cdebug-assertions=no
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove --crate-type lib?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mir-opt tests are --crate-type=rlib by default since #120060. codegen tests should probably get the same treatment; it's a much better default.


#![feature(flt2dec)]

Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/inline/unchecked_shifts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#![crate_type = "lib"]
#![feature(unchecked_shifts)]

//@ ignore-debug: the debug assertions prevent the inlining we are testing for
//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir

// EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff
Expand Down
3 changes: 1 addition & 2 deletions tests/mir-opt/inline/unwrap_unchecked.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#![crate_type = "lib"]

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ ignore-debug: the debug assertions prevent the inlining we are testing for
//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir -Cdebug-assertions=no
//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir

// EMIT_MIR unwrap_unchecked.unwrap_unchecked.Inline.diff
// EMIT_MIR unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0
//@ ignore-debug: standard library debug assertions add a panic that breaks this optimization

#![crate_type = "lib"]

Expand Down
2 changes: 1 addition & 1 deletion tests/mir-opt/pre-codegen/mem_replace.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir
//@ ignore-debug the standard library debug assertions leak into this test
//@ ignore-debug: precondition checks on ptr::read/write are under cfg(debug_assertions)
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/pre-codegen/slice_index.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ ignore-debug the standard library debug assertions leak into this test
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

#![crate_type = "lib"]
Expand Down
1 change: 0 additions & 1 deletion tests/mir-opt/pre-codegen/slice_iter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ ignore-debug the standard library debug assertions leak into this test
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

#![crate_type = "lib"]
Expand Down
Loading