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

This commit is contained in:
Santiago Pastorino 2021-03-04 10:35:11 -03:00
parent 705813c84b
commit af63afc09a
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF
39 changed files with 41 additions and 41 deletions

View File

@ -5,8 +5,8 @@
// Once the optimizer can do that, mir-opt/issues/issue-59352.rs will need to be updated and this
// test case should be removed as it will become redundant.
// mir-opt-level=2 enables inlining and enables LLVM to optimize away the unreachable panic call.
// compile-flags: -O -Z mir-opt-level=2
// mir-opt-level=3 enables inlining and enables LLVM to optimize away the unreachable panic call.
// compile-flags: -O -Z mir-opt-level=3
#![crate_type = "rlib"]

View File

@ -1,5 +1,5 @@
// Checks that naked functions are never inlined.
// compile-flags: -O -Zmir-opt-level=2
// compile-flags: -O -Zmir-opt-level=3
// ignore-wasm32
#![crate_type = "lib"]
#![feature(asm)]

View File

@ -1,4 +1,4 @@
// compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=2 -Zunsound-mir-opts
// compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts
// Ensure that `x?` has no overhead on `Result<T, E>` due to identity `match`es in lowering.
// This requires inlining to trigger the MIR optimizations in `SimplifyArmIdentity`.

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected
// outputs below, after ConstProp this is how _2 would look like with the bug:

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// This used to ICE in const-prop

View File

@ -7,7 +7,7 @@
// removed.
// EMIT_MIR issue_59352.num_to_digit.PreCodegen.after.mir
// compile-flags: -Z mir-opt-level=2 -Z span_free_formats
// compile-flags: -Z mir-opt-level=3 -Z span_free_formats
pub fn num_to_digit(num: char) -> u32 {
// CHECK-NOT: panic

View File

@ -1,7 +1,7 @@
// Checks that `SimplifyArmIdentity` is not applied if enums have incompatible layouts.
// Regression test for issue #66856.
//
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
// EMIT_MIR_FOR_EACH_BIT_WIDTH
enum Src {

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2 -Zunsound-mir-opts
// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
// EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff
// EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff
// EMIT_MIR simplify_arm.id_result.SimplifyArmIdentity.diff

View File

@ -1,5 +1,5 @@
// build-fail
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
#![deny(warnings)]

View File

@ -1,6 +1,6 @@
// Must be build-pass, because check-pass will not run const prop and thus not emit the lint anyway.
// build-pass
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
#![deny(warnings)]

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// run-pass
struct Baz<T: ?Sized> {

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// run-pass
use std::cell::Cell;

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// run-pass
fn e220() -> (i64, i64) {

View File

@ -1,5 +1,5 @@
// ignore-wasm32-bare which doesn't support `std::process:exit()`
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
// run-pass
// Tests that specialization does not cause optimizations running on polymorphic MIR to resolve

View File

@ -1,6 +1,6 @@
// run-pass
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
trait IterExt: Iterator {
fn fold_ex<B, F>(mut self, init: B, mut f: F) -> B

View File

@ -1,5 +1,5 @@
// revisions: default miropt
//[miropt]compile-flags: -Z mir-opt-level=2
//[miropt]compile-flags: -Z mir-opt-level=3
// ~^ This flag is for #77668, it used to be ICE.
#![crate_type = "lib"]

View File

@ -1,4 +1,4 @@
// compile-flags: -Zmir-opt-level=2 -Copt-level=0
// compile-flags: -Zmir-opt-level=3 -Copt-level=0
// run-pass
type M = [i64; 2];

View File

@ -1,5 +1,5 @@
// edition:2018
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
#[inline(always)]
pub fn copy_prop(s: bool) -> String {

View File

@ -2,7 +2,7 @@
// did not check that the types matched up in the `Ok(r)` branch.
//
// run-pass
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
#[derive(Debug, PartialEq, Eq)]
enum SpecialsRes { Res(u64) }

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// build-pass
// This used to ICE due to the inling pass not examining projections

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// edition:2018
// build-pass

View File

@ -4,7 +4,7 @@
//
// check-pass
// edition:2018
// compile-args: -Zmir-opt-level=2
// compile-args: -Zmir-opt-level=3
#![crate_type = "lib"]

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// build-pass
#![feature(type_alias_impl_trait)]

View File

@ -3,7 +3,7 @@
// Regression test for #76248.
//
// build-pass
// compile-flags: -Zmir-opt-level=2
// compile-flags: -Zmir-opt-level=3
const N: usize = 1;

View File

@ -2,7 +2,7 @@
//
// edition:2018
// build-pass
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// aux-build:issue_76375_aux.rs
#![crate_type = "lib"]

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// build-pass
use std::fs::File;

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags: -Z mir-opt-level=2 -C opt-level=0
// compile-flags: -Z mir-opt-level=3 -C opt-level=0
// example from #78496
pub enum E<'a> {

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// build-pass
// This used to ICE in const-prop

View File

@ -2,7 +2,7 @@
// Regression test for issue #79269.
//
// build-pass
// compile-flags: -Zmir-opt-level=2 -Zvalidate-mir
// compile-flags: -Zmir-opt-level=3 -Zvalidate-mir
#[derive(Clone)]
struct Array<T, const N: usize>([T; N]);

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
trait Array {
type Item;

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
pub enum Enum {
A,

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
pub fn main() {
let _x: fn() = handle_debug_column;
}

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
// Previously ICEd because we did not normalize during inlining,
// see https://github.com/rust-lang/rust/pull/77306 for more discussion.

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
struct Cursor {}
struct TokenTree {}

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
use std::mem::MaybeUninit;
const N: usize = 2;

View File

@ -1,9 +1,9 @@
// Ensures -Zmir-opt-level=2 (specifically, inlining) is not allowed with -Zinstrument-coverage.
// Ensures -Zmir-opt-level=3 (specifically, inlining) is not allowed with -Zinstrument-coverage.
// Regression test for issue #80060.
//
// needs-profiler-support
// build-pass
// compile-flags: -Zmir-opt-level=2 -Zinstrument-coverage
// compile-flags: -Zmir-opt-level=3 -Zinstrument-coverage
#[inline(never)]
fn foo() {}

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags:-Zmir-opt-level=2
// compile-flags:-Zmir-opt-level=3
pub trait Foo {
fn bar(&self) -> usize { 2 }
}

View File

@ -1,5 +1,5 @@
// run-pass
// compile-flags: -Z mir-opt-level=2 -C opt-level=0 -C debuginfo=2
// compile-flags: -Z mir-opt-level=3 -C opt-level=0 -C debuginfo=2
#[inline(never)]
pub fn foo(bar: usize) -> usize {

View File

@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=2
// compile-flags: -Z mir-opt-level=3
// build-pass
#![crate_type="lib"]