Rollup merge of #121531 - saethlin:ignore-less-debug, r=compiler-errors
Ignore less tests in debug builds Since https://github.com/rust-lang/rust/pull/120594 and https://github.com/rust-lang/rust/pull/120863, nearly all UB-detecting debug assertions get compiled out of code that is monomorphized by a crate built with debug assertions disabled. Which means that if we default all our codegen tests to `-Cdebug-assertions=no`, most of them work just fine against a sysroot built with debug assertions. I also tried to explain a bit better why some tests need to be skipped, for those that still need to be skipped.
This commit is contained in:
commit
d978a1c671
@ -2503,8 +2503,11 @@ fn make_compile_args(
|
||||
// overridden by `compile-flags`.
|
||||
rustc.arg("-Copt-level=2");
|
||||
}
|
||||
RunPassValgrind | Pretty | DebugInfo | Codegen | Rustdoc | RustdocJson | RunMake
|
||||
| CodegenUnits | JsDocTest | Assembly => {
|
||||
Assembly | Codegen => {
|
||||
rustc.arg("-Cdebug-assertions=no");
|
||||
}
|
||||
RunPassValgrind | Pretty | DebugInfo | Rustdoc | RustdocJson | RunMake
|
||||
| CodegenUnits | JsDocTest => {
|
||||
// do not use JSON output
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
|
||||
//@ only-x86_64
|
||||
//@ ignore-sgx
|
||||
//@ ignore-debug
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
|
||||
//@ only-x86_64
|
||||
//@ ignore-sgx
|
||||
//@ ignore-debug
|
||||
|
||||
#![feature(str_internals)]
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
//@ [A64] needs-llvm-components: aarch64
|
||||
//@ [ppc64le] compile-flags: --target powerpc64le-unknown-linux-gnu -Crelocation-model=static
|
||||
//@ [ppc64le] needs-llvm-components: powerpc
|
||||
//@ ignore-debug: alignment checks insert panics that we don't have a lang item for
|
||||
|
||||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug (debug assertions in `slice::from_raw_parts` block optimizations)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -C opt-level=1
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(ascii_char)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Make sure no bounds checks are emitted when slicing or indexing
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -C opt-level=z --edition=2021
|
||||
//@ ignore-debug
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -C opt-level=3
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ min-llvm-version: 17.0.2
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
#![crate_type = "lib"]
|
||||
|
||||
/// Make sure no bounds checks are emitted after a `get_unchecked`.
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O -Zmerge-functions=disabled
|
||||
//@ ignore-32bit LLVM has a bug with them
|
||||
//@ ignore-debug
|
||||
|
||||
// Check that LLVM understands that `Iter` pointer is not null. Issue #37945.
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type="rlib"]
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// prevent optimizing away bounds checks
|
||||
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type="rlib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Make sure no bounds checks are emitted in the loop when upfront slicing
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Make sure no bounds checks are emitted when slicing or indexing
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ ignore-debug: The debug assertions get in the way
|
||||
//@ compile-flags: -O
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(iter_repeat_n)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ compile-flags: -O
|
||||
//@ only-x86_64 (vectorization varies between architectures)
|
||||
#![crate_type = "lib"]
|
||||
|
@ -4,7 +4,7 @@
|
||||
// known to be `1` after inlining).
|
||||
|
||||
//@ compile-flags: -C no-prepopulate-passes -Zinline-mir=no
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ ignore-debug: precondition checks in ptr::read make them a bad candidate for MIR inlining
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ only-x86_64 (to not worry about usize differing)
|
||||
//@ ignore-debug (the debug assertions get in the way)
|
||||
//@ ignore-debug: precondition checks make mem::replace not a candidate for MIR inlining
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ revisions: llvm mir-opt3
|
||||
//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ [mir-opt3]compile-flags: -Zmir-opt-level=3
|
||||
//@ [mir-opt3]build-pass
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O -C target-feature=+avx
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-64bit (because the LLVM type of i64 for usize shows up)
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(slice_as_chunks)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-64bit (because the LLVM type of i64 for usize shows up)
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ compile-flags: -O
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions add extra comparisons
|
||||
#![crate_type = "lib"]
|
||||
|
||||
type Demo = [u8; 3];
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug (these add extra checks that make it hard to verify)
|
||||
#![crate_type = "lib"]
|
||||
#![feature(exact_size_is_empty)]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O -Zmerge-functions=disabled
|
||||
//@ ignore-debug (the extra assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions in from_raw_parts get in the way
|
||||
//@ ignore-debug: debug assertions prevent generating shufflevector
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-64bit (because we're using [ui]size)
|
||||
//@ ignore-debug (because the assertions get in the way)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(slice_from_ptr_range)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ ignore-debug
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug (because unchecked is checked in debug)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(unchecked_shifts)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ min-llvm-version: 17.0.2
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// This test checks that we can inline drop_in_place in
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ only-x86_64
|
||||
//@ ignore-debug
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ ignore-debug: FIXME: checks for call detect scoped noalias metadata
|
||||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ compile-flags: -O
|
||||
#![crate_type="lib"]
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ compile-flags: -O
|
||||
#![crate_type = "lib"]
|
||||
#![feature(exact_size_is_empty)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ compile-flags: -O
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug
|
||||
// (with debug assertions turned on, `assert_unchecked` generates a real assertion)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
//@ [old]ignore-llvm-version: 17 - 99
|
||||
//@ [new]min-llvm-version: 17
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ ignore-debug: plain old debug assertions
|
||||
//@ needs-unwind
|
||||
#![crate_type = "lib"]
|
||||
#![feature(shrink_to)]
|
||||
|
@ -1,6 +1,4 @@
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug
|
||||
// (with debug assertions turned on, `assert_unchecked` generates a real assertion)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Check that draining at the front or back doesn't copy memory.
|
||||
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ ignore-debug: FIXME: checks for call detect scoped noalias metadata
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Guards against regression for optimization discussed in issue #80836
|
||||
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test checks that `VecDeque::front[_mut]()` and `VecDeque::back[_mut]()` can't panic.
|
||||
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-debug: the debug assertions get in the way
|
||||
//@ ignore-debug: plain old debug assertions
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0
|
||||
//@ ignore-32bit
|
||||
//@ ignore-debug
|
||||
|
||||
// CHECK: @vtable.0 = {{.*}}, !type ![[TYPE0:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]]
|
||||
// CHECK: @vtable.1 = {{.*}}, !type ![[TYPE1:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]]
|
||||
|
@ -1,6 +1,5 @@
|
||||
// skip-filecheck
|
||||
//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
|
||||
//@ ignore-debug: standard library debug assertions add a panic that breaks this optimization
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// MIR for `variant_a::{closure#0}` after PreCodegen
|
||||
|
||||
fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:8:25: 8:39}, _2: &&(usize, usize, usize, usize)) -> bool {
|
||||
fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2: &&(usize, usize, usize, usize)) -> bool {
|
||||
let mut _0: bool;
|
||||
let mut _3: &(usize, usize, usize, usize);
|
||||
let _4: &usize;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// MIR for `variant_b::{closure#0}` after PreCodegen
|
||||
|
||||
fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:12:25: 12:41}, _2: &&(usize, usize, usize, usize)) -> bool {
|
||||
fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41}, _2: &&(usize, usize, usize, usize)) -> bool {
|
||||
let mut _0: bool;
|
||||
let mut _3: &(usize, usize, usize, usize);
|
||||
let _4: usize;
|
||||
|
Loading…
Reference in New Issue
Block a user