Bump mir-opt-level from 3 to 4 in tests

This commit is contained in:
Santiago Pastorino 2021-03-04 10:21:13 -03:00
parent 03c1f1762c
commit 705813c84b
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF
29 changed files with 31 additions and 31 deletions

View File

@ -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)]

View File

@ -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 {

View File

@ -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 {

View File

@ -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) {

View File

@ -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 {

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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) {

View File

@ -1,4 +1,4 @@
// compile-flags: -Zmir-opt-level=3
// compile-flags: -Zmir-opt-level=4
// run-pass
#![feature(const_generics)]

View File

@ -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(_: &()) {}

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=3
// compile-flags: -Z mir-opt-level=4
// run-pass
struct X {

View File

@ -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() {

View File

@ -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

View File

@ -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]);

View File

@ -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)]

View File

@ -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>()

View File

@ -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]

View File

@ -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)]

View File

@ -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());

View File

@ -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() {}

View File

@ -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)]

View File

@ -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;

View File

@ -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);

View File

@ -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();

View File

@ -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" {

View File

@ -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" {

View File

@ -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",
]);