Rollup merge of #136761 - workingjubilee:specify-opt-level-for-codegen-tests, r=saethlin
tests: `-Copt-level=3` instead of `-O` in codegen tests An effective blocker for redefining the meaning of `-O` is to stop reusing this somewhat ambiguous alias in our own codegen test suite. The choice between `-Copt-level=2` and `-Copt-level=3` is arbitrary for most of our tests. In most cases it makes no difference, so I set most of them to `-Copt-level=3`, as it will lead to slightly more "normalized" codegen. try-job: test-various try-job: arm-android try-job: armhf-gnu try-job: i686-gnu-1 try-job: i686-gnu-2 try-job: i686-mingw try-job: i686-msvc-1 try-job: i686-msvc-2 try-job: aarch64-apple try-job: aarch64-gnu
This commit is contained in:
commit
f0af030ee4
235 changed files with 271 additions and 291 deletions
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
//@ revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[no_mangle]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
|
||||
//@ only-x86_64
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(array_repeat)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64
|
||||
|
||||
#![crate_type = "rlib"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Code generation of atomic operations.
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
use std::sync::atomic::AtomicI32;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
// ensures that we do not have such a round-trip for AtomicPtr::swap, because LLVM supports pointer
|
||||
// arguments to `atomicrmw xchg`.
|
||||
|
||||
//@ compile-flags: -O -Cno-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes
|
||||
#![crate_type = "lib"]
|
||||
#![feature(strict_provenance_atomic_ptr)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib -C panic=abort
|
||||
//@ compile-flags: -Copt-level=3 --target=avr-unknown-gnu-atmega328 --crate-type=rlib -C panic=abort
|
||||
//@ needs-llvm-components: avr
|
||||
|
||||
// This test validates that function pointers can be stored in global variables
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ ignore-std-debug-assertions
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Make sure no bounds checks are emitted when slicing or indexing
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
use std::mem::MaybeUninit;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Checks that range metadata gets emitted on calls to functions returning a
|
||||
// scalar value.
|
||||
|
||||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
//@ max-llvm-major-version: 18
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// This tests that LLVM can optimize based on the niches in the source or
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// ignore-tidy-linelength
|
||||
//@ revisions:aarch64 loongarch64 powerpc64 sparc64 x86_64
|
||||
//@ min-llvm-version: 19
|
||||
//@ compile-flags: -O -Cno-prepopulate-passes -Zlint-llvm-ir -Cllvm-args=-lint-abort-on-error
|
||||
//@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes -Zlint-llvm-ir -Cllvm-args=-lint-abort-on-error
|
||||
|
||||
//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
|
||||
//@[aarch64] needs-llvm-components: arm
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
// On x86 the closure is inlined in foo() producing something like
|
||||
// define i32 @foo() [...] {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Checks that these functions are branchless.
|
||||
//
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(unchecked_shifts)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//@ revisions: DEBUGINFO NODEBUGINFO
|
||||
//@ compile-flags: -Zunsound-mir-opts
|
||||
// FIXME: see <https://github.com/rust-lang/rust/issues/132353>
|
||||
//@ compile-flags: -O -Cno-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes
|
||||
//@ [DEBUGINFO] compile-flags: -Cdebuginfo=full
|
||||
|
||||
// From https://github.com/rust-lang/rust/issues/128081.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ aux-build:always.rs
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Zcross-crate-inline-threshold=always
|
||||
//@ compile-flags: -Copt-level=3 -Zcross-crate-inline-threshold=always
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Zcross-crate-inline-threshold=never
|
||||
//@ compile-flags: -Copt-level=3 -Zcross-crate-inline-threshold=never
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Zcross-crate-inline-threshold=yes
|
||||
//@ compile-flags: -Copt-level=3 -Zcross-crate-inline-threshold=yes
|
||||
//@ aux-build:leaf.rs
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ aux-build:never.rs
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Verify that `i32::cmp` FnDef type is declared with a size of 0 and an
|
||||
// alignment of 8 bits (1 byte) in LLVM debuginfo.
|
||||
|
||||
//@ compile-flags: -O -g -Cno-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -g -Cno-prepopulate-passes
|
||||
//@ ignore-msvc the types are mangled differently
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -g -O
|
||||
//@ compile-flags: -g -Copt-level=3
|
||||
|
||||
// Check that simple constant values are preserved in debuginfo across both MIR opts and LLVM opts
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -g -O -C panic=abort
|
||||
//@ compile-flags: -g -Copt-level=3 -C panic=abort
|
||||
|
||||
// Check that each inline call site for the same function uses the same "sub-program" so that LLVM
|
||||
// can correctly merge the debug info if it merges the inlined code (e.g., for merging of tail
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![allow(incomplete_features)]
|
||||
|
|
|
|||
38
tests/codegen/dont-shuffle-bswaps.rs
Normal file
38
tests/codegen/dont-shuffle-bswaps.rs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
//@ revisions: OPT2 OPT3
|
||||
//@[OPT2] compile-flags: -Copt-level=2
|
||||
//@[OPT3] compile-flags: -C opt-level=3
|
||||
// some targets don't do the opt we are looking for
|
||||
//@[OPT3] only-64bit
|
||||
//@ min-llvm-version: 18.1.3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![no_std]
|
||||
|
||||
// The code is from https://github.com/rust-lang/rust/issues/122805.
|
||||
// Ensure we do not generate the shufflevector instruction
|
||||
// to avoid complicating the code.
|
||||
// CHECK-LABEL: define{{.*}}void @convert(
|
||||
// CHECK-NOT: shufflevector
|
||||
// On higher opt levels, this should just be a bswap:
|
||||
// OPT3: load <8 x i16>
|
||||
// OPT3-NEXT: call <8 x i16> @llvm.bswap
|
||||
// OPT3-NEXT: store <8 x i16>
|
||||
// OPT3-NEXT: ret void
|
||||
#[no_mangle]
|
||||
pub fn convert(value: [u16; 8]) -> [u8; 16] {
|
||||
#[cfg(target_endian = "little")]
|
||||
let bswap = u16::to_be;
|
||||
#[cfg(target_endian = "big")]
|
||||
let bswap = u16::to_le;
|
||||
let addr16 = [
|
||||
bswap(value[0]),
|
||||
bswap(value[1]),
|
||||
bswap(value[2]),
|
||||
bswap(value[3]),
|
||||
bswap(value[4]),
|
||||
bswap(value[5]),
|
||||
bswap(value[6]),
|
||||
bswap(value[7]),
|
||||
];
|
||||
unsafe { core::mem::transmute::<_, [u8; 16]>(addr16) }
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
|
||||
// Tests that the compiler can apply `noalias` and other &mut attributes to `drop_in_place`.
|
||||
// Note that non-Unpin types should not get `noalias`, matching &mut behavior.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Z merge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O --target wasm32-unknown-emscripten
|
||||
//@ compile-flags: -Copt-level=3 --target wasm32-unknown-emscripten
|
||||
//@ needs-llvm-components: webassembly
|
||||
|
||||
// Emscripten has its own unique implementation of catch_unwind (in `codegen_emcc_try`),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O --target wasm32-unknown-emscripten -Z emscripten-wasm-eh
|
||||
//@ compile-flags: -Copt-level=3 --target wasm32-unknown-emscripten -Z emscripten-wasm-eh
|
||||
//@ needs-llvm-components: webassembly
|
||||
|
||||
// Emscripten catch_unwind using wasm exceptions
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// This test checks an optimization that is not guaranteed to work. This test case should not block
|
||||
// a future LLVM update.
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// This test checks an optimization that is not guaranteed to work. This test case should not block
|
||||
// a future LLVM update.
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Codegen test for #126242
|
||||
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(error_generic_member_access)]
|
||||
use std::error::Request;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//@ revisions: lib staticlib
|
||||
//@ ignore-emscripten default visibility is hidden
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ [lib] compile-flags: --crate-type lib
|
||||
//@ [staticlib] compile-flags: --crate-type staticlib
|
||||
// `#[no_mangle]`d static variables always have external linkage, i.e., no `internal` in their
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! Verify that Rust implements the expected calling convention for `f128`
|
||||
|
||||
//@ add-core-stubs
|
||||
//@ compile-flags: -O --target wasm32-wasip1
|
||||
//@ compile-flags: -Copt-level=3 --target wasm32-wasip1
|
||||
//@ needs-llvm-components: webassembly
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// as "inreg" like the C/C++ compilers for the platforms.
|
||||
// x86 only.
|
||||
|
||||
//@ compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes
|
||||
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3
|
||||
//@ needs-llvm-components: x86
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -Coverflow-checks=no -O
|
||||
//@ compile-flags: -Coverflow-checks=no -Copt-level=3
|
||||
//@ revisions: YES NO
|
||||
//@ [YES]compile-flags: -Zfewer-names=yes
|
||||
//@ [NO] compile-flags: -Zfewer-names=no
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
#![crate_type = "lib"]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(dyn_star)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(cold_path)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(likely_unlikely)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(likely_unlikely)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! Verify that Rust implements the expected calling convention for `i128`/`u128`.
|
||||
|
||||
//@ add-core-stubs
|
||||
//@ compile-flags: -O --target wasm32-wasip1
|
||||
//@ compile-flags: -Copt-level=3 --target wasm32-wasip1
|
||||
//@ needs-llvm-components: webassembly
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//@ only-x86_64
|
||||
//@ compile-flags: -O -C no-prepopulate-passes --crate-type=lib
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes --crate-type=lib
|
||||
|
||||
// On LLVM 17 and earlier LLVM's own data layout specifies that i128 has 8 byte alignment,
|
||||
// while rustc wants it to have 16 byte alignment. This test checks that we handle this
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C overflow-checks=on
|
||||
//@ compile-flags: -Copt-level=3 -C overflow-checks=on
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes -Z mir-enable-passes=-InstSimplify
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes -Z mir-enable-passes=-InstSimplify
|
||||
//@ only-64bit (so I don't need to worry about usize)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//@ revisions: INT32 INT16
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ [INT32] ignore-16bit
|
||||
//@ [INT16] only-16bit
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[no_mangle]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@revisions: with_nontemporal without_nontemporal
|
||||
//@[with_nontemporal] compile-flags: --target aarch64-unknown-linux-gnu
|
||||
//@[with_nontemporal] needs-llvm-components: aarch64
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes -Z inline-mir
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes -Z inline-mir
|
||||
//@ only-64bit (so I don't need to worry about usize)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Zmerge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
|
||||
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(select_unpredictable)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
//@ only-x86_64 (it's using arch-specific types)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C no-prepopulate-passes
|
||||
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
|
||||
//@ only-64bit (so I don't need to worry about usize)
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
#![feature(core_intrinsics)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: --crate-type=lib -Zmerge-functions=disabled -O
|
||||
//@ compile-flags: --crate-type=lib -Zmerge-functions=disabled -Copt-level=3
|
||||
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(f16, f128)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ revisions: host x86-64-v3
|
||||
|
||||
// This particular CPU regressed in #131563
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C overflow-checks
|
||||
//@ compile-flags: -Copt-level=3 -C overflow-checks
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -C debug-assertions=yes
|
||||
//@ compile-flags: -Copt-level=3 -C debug-assertions=yes
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
pub fn foo(t: &mut Vec<usize>) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates
|
||||
//@ compile-flags: --crate-type=lib -Copt-level=3 -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates
|
||||
// MIR SROA will decompose the closure
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ min-llvm-version: 19
|
||||
|
||||
// Test for #107681.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Zmerge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
|
||||
//! Test for <https://github.com/rust-lang/rust/issues/108395>. Check that
|
||||
//! matching on two bools with wildcards does not produce branches.
|
||||
#![crate_type = "lib"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(get_mut_unchecked, new_uninit)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// CHECK-LABEL: @write_u8_variant_a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ only-x86_64-unknown-linux-gnu
|
||||
|
||||
// We want to check that this function does not mis-optimize to loop jumping.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O -Ccodegen-units=1
|
||||
//@ compile-flags: -Copt-level=3 -Ccodegen-units=1
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
/// Make sure no bounds checks are emitted after a `get_unchecked`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
//@ min-llvm-version: 19
|
||||
//@ only-x86_64
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// CHECK-LABEL: @div2
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! This test checks that compiler don't generate useless compares to zeros
|
||||
//! for `NonZero` integer types.
|
||||
//!
|
||||
//@ compile-flags: -O --edition=2021 -Zmerge-functions=disabled
|
||||
//@ compile-flags: -Copt-level=3 --edition=2021 -Zmerge-functions=disabled
|
||||
//@ only-64bit (because the LLVM type of i64 for usize shows up)
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! This test checks that match branches which all access a field
|
||||
//! at the same offset are merged together.
|
||||
//!
|
||||
//@ compile-flags: -O
|
||||
//@ compile-flags: -Copt-level=3
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[repr(C)]
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue