Bump mir-opt-level from 3 to 4 in tests
This commit is contained in:
parent
03c1f1762c
commit
705813c84b
@ -4,8 +4,8 @@
|
||||
// needs-sanitizer-address
|
||||
// needs-sanitizer-leak
|
||||
// revisions: ASAN LSAN
|
||||
//[ASAN] compile-flags: -Zsanitizer=address -C opt-level=3 -Z mir-opt-level=3
|
||||
//[LSAN] compile-flags: -Zsanitizer=leak -C opt-level=3 -Z mir-opt-level=3
|
||||
//[ASAN] compile-flags: -Zsanitizer=address -C opt-level=3 -Z mir-opt-level=4
|
||||
//[LSAN] compile-flags: -Zsanitizer=leak -C opt-level=3 -Z mir-opt-level=4
|
||||
|
||||
#![crate_type="lib"]
|
||||
#![feature(no_sanitize)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -O -Zmir-opt-level=3
|
||||
// compile-flags: -O -Zmir-opt-level=4
|
||||
|
||||
// EMIT_MIR boolean_identities.test.ConstProp.diff
|
||||
pub fn test(x: bool, y: bool) -> bool {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -O -Zmir-opt-level=3
|
||||
// compile-flags: -O -Zmir-opt-level=4
|
||||
|
||||
// EMIT_MIR mult_by_zero.test.ConstProp.diff
|
||||
fn test(x : i32) -> i32 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
// EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
|
||||
fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
|
||||
match (x, y) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
|
||||
// EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff
|
||||
fn opt1(x: Option<u32>, y: Option<u32>, z: Option<u32>) -> u32 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
|
||||
// compile-flags: -Z mir-opt-level=4 -Zunsound-mir-opts
|
||||
|
||||
// example from #68867
|
||||
type CSSFloat = f32;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
|
||||
// must not optimize as it does not follow the pattern of
|
||||
// left and right hand side being the same variant
|
||||
|
@ -1,6 +1,6 @@
|
||||
// ignore-endian-big
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
#![feature(box_syntax)]
|
||||
// EMIT_MIR inline_into_box_place.main.Inline.diff
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z span_free_formats -Z mir-opt-level=3
|
||||
// compile-flags: -Z span_free_formats -Z mir-opt-level=4
|
||||
|
||||
// EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
|
||||
fn test2(x: &dyn X) -> bool {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
// EMIT_MIR multiple_return_terminators.test.MultipleReturnTerminators.diff
|
||||
|
||||
fn test(x: bool) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmir-opt-level=3
|
||||
// compile-flags: -Zmir-opt-level=4
|
||||
// run-pass
|
||||
|
||||
#![feature(const_generics)]
|
||||
|
@ -1,8 +1,8 @@
|
||||
// run-pass
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
|
||||
// Checks that the compiler does not ICE when passing references to field of by-value struct
|
||||
// with -Z mir-opt-level=3
|
||||
// with -Z mir-opt-level=4
|
||||
|
||||
fn do_nothing(_: &()) {}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
// run-pass
|
||||
|
||||
struct X {
|
||||
|
@ -3,7 +3,7 @@
|
||||
// elaborate-drops invoked on it) and then try to elaboate drops a
|
||||
// second time. Uncool.
|
||||
|
||||
// compile-flags:-Zmir-opt-level=3
|
||||
// compile-flags:-Zmir-opt-level=4
|
||||
// build-pass
|
||||
|
||||
fn main() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
// build-pass
|
||||
|
||||
// This used to ICE in const-prop due
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Regression test for issue #76740.
|
||||
// run-pass
|
||||
// compile-flags: -Zmir-opt-level=3
|
||||
// compile-flags: -Zmir-opt-level=4
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct V([usize; 4]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
// build-pass
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=4
|
||||
|
||||
#![crate_type="lib"]
|
||||
#![feature(lang_items)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// run-pass
|
||||
// compile-flags: -Zpolymorphize=on -Zmir-opt-level=3
|
||||
// compile-flags: -Zpolymorphize=on -Zmir-opt-level=4
|
||||
|
||||
fn caller<T, U>() -> &'static usize {
|
||||
callee::<U>()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
#[inline(never)]
|
||||
#[track_caller]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
#![feature(const_caller_location, const_fn)]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
macro_rules! caller_location_from_macro {
|
||||
() => (core::panic::Location::caller());
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
#[track_caller]
|
||||
fn f() {}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// run-pass
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
#![feature(option_expect_none, option_unwrap_none)]
|
||||
#![allow(unconditional_panic)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
use std::panic::Location;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
fn pass_to_ptr_call<T>(f: fn(T), x: T) {
|
||||
f(x);
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-pass
|
||||
// revisions: default mir-opt
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=3
|
||||
//[mir-opt] compile-flags: -Zmir-opt-level=4
|
||||
|
||||
fn ptr_call(f: fn()) {
|
||||
f();
|
||||
|
@ -2,7 +2,7 @@
|
||||
// passed the wrong Instance, causing issues with inlining. See #67557.
|
||||
//
|
||||
// run-pass
|
||||
// compile-flags: -Zmir-opt-level=3
|
||||
// compile-flags: -Zmir-opt-level=4
|
||||
#![feature(platform_intrinsics, repr_simd)]
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// the wrong Instance, causing issues with inlining. See #67557.
|
||||
//
|
||||
// run-pass
|
||||
// compile-flags: -Zmir-opt-level=3
|
||||
// compile-flags: -Zmir-opt-level=4
|
||||
#![feature(platform_intrinsics, repr_simd)]
|
||||
|
||||
extern "platform-intrinsic" {
|
||||
|
@ -1960,7 +1960,7 @@ impl<'test> TestCx<'test> {
|
||||
rustc.args(&[
|
||||
"-Copt-level=1",
|
||||
"-Zdump-mir=all",
|
||||
"-Zmir-opt-level=3",
|
||||
"-Zmir-opt-level=4",
|
||||
"-Zvalidate-mir",
|
||||
"-Zdump-mir-exclude-pass-number",
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user