Skip to content

Commit 0550a6f

Browse files
committed
Bump mir-opt-level from 2 to 3 in tests
1 parent 0f9fdba commit 0550a6f

39 files changed

+41
-41
lines changed

src/test/codegen/issue-59352.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Once the optimizer can do that, mir-opt/issues/issue-59352.rs will need to be updated and this
66
// test case should be removed as it will become redundant.
77

8-
// mir-opt-level=2 enables inlining and enables LLVM to optimize away the unreachable panic call.
9-
// compile-flags: -O -Z mir-opt-level=2
8+
// mir-opt-level=3 enables inlining and enables LLVM to optimize away the unreachable panic call.
9+
// compile-flags: -O -Z mir-opt-level=3
1010

1111
#![crate_type = "rlib"]
1212

src/test/codegen/naked-noinline.rs

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

src/test/codegen/try_identity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=2 -Zunsound-mir-opts
1+
// compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts
22

33
// Ensure that `x?` has no overhead on `Result<T, E>` due to identity `match`es in lowering.
44
// This requires inlining to trigger the MIR optimizations in `SimplifyArmIdentity`.

src/test/mir-opt/const_prop/issue-66971.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22

33
// Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected
44
// outputs below, after ConstProp this is how _2 would look like with the bug:

src/test/mir-opt/const_prop/issue-67019.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22

33
// This used to ICE in const-prop
44

src/test/mir-opt/issues/issue-59352.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// removed.
88

99
// EMIT_MIR issue_59352.num_to_digit.PreCodegen.after.mir
10-
// compile-flags: -Z mir-opt-level=2 -Z span_free_formats
10+
// compile-flags: -Z mir-opt-level=3 -Z span_free_formats
1111

1212
pub fn num_to_digit(num: char) -> u32 {
1313
// CHECK-NOT: panic

src/test/mir-opt/simplify-arm-identity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Checks that `SimplifyArmIdentity` is not applied if enums have incompatible layouts.
22
// Regression test for issue #66856.
33
//
4-
// compile-flags: -Zmir-opt-level=2
4+
// compile-flags: -Zmir-opt-level=3
55
// EMIT_MIR_FOR_EACH_BIT_WIDTH
66

77
enum Src {

src/test/mir-opt/simplify-arm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2 -Zunsound-mir-opts
1+
// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
22
// EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff
33
// EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff
44
// EMIT_MIR simplify_arm.id_result.SimplifyArmIdentity.diff

src/test/ui/const_prop/inline_spans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// build-fail
2-
// compile-flags: -Zmir-opt-level=2
2+
// compile-flags: -Zmir-opt-level=3
33

44
#![deny(warnings)]
55

src/test/ui/const_prop/inline_spans_lint_attribute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Must be build-pass, because check-pass will not run const prop and thus not emit the lint anyway.
22
// build-pass
3-
// compile-flags: -Zmir-opt-level=2
3+
// compile-flags: -Zmir-opt-level=3
44

55
#![deny(warnings)]
66

src/test/ui/consts/issue-67529.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// run-pass
33

44
struct Baz<T: ?Sized> {

src/test/ui/consts/issue-67641.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// run-pass
33

44
use std::cell::Cell;

src/test/ui/consts/issue-67862.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// run-pass
33

44
fn e220() -> (i64, i64) {

src/test/ui/consts/trait_specialization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-wasm32-bare which doesn't support `std::process:exit()`
2-
// compile-flags: -Zmir-opt-level=2
2+
// compile-flags: -Zmir-opt-level=3
33
// run-pass
44

55
// Tests that specialization does not cause optimizations running on polymorphic MIR to resolve

src/test/ui/dest-prop/skeptic-miscompile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22

3-
// compile-flags: -Zmir-opt-level=2
3+
// compile-flags: -Zmir-opt-level=3
44

55
trait IterExt: Iterator {
66
fn fold_ex<B, F>(mut self, init: B, mut f: F) -> B

src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// revisions: default miropt
2-
//[miropt]compile-flags: -Z mir-opt-level=2
2+
//[miropt]compile-flags: -Z mir-opt-level=3
33
// ~^ This flag is for #77668, it used to be ICE.
44

55
#![crate_type = "lib"]

src/test/ui/issues/issue-77002.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Zmir-opt-level=2 -Copt-level=0
1+
// compile-flags: -Zmir-opt-level=3 -Copt-level=0
22
// run-pass
33

44
type M = [i64; 2];

src/test/ui/mir/auxiliary/issue_76375_aux.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// edition:2018
2-
// compile-flags: -Z mir-opt-level=2
2+
// compile-flags: -Z mir-opt-level=3
33

44
#[inline(always)]
55
pub fn copy_prop(s: bool) -> String {

src/test/ui/mir/issue-66851.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// did not check that the types matched up in the `Ok(r)` branch.
33
//
44
// run-pass
5-
// compile-flags: -Zmir-opt-level=2
5+
// compile-flags: -Zmir-opt-level=3
66

77
#[derive(Debug, PartialEq, Eq)]
88
enum SpecialsRes { Res(u64) }

src/test/ui/mir/issue-67710-inline-projection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// build-pass
33

44
// This used to ICE due to the inling pass not examining projections

src/test/ui/mir/issue-68841.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// edition:2018
33
// build-pass
44

src/test/ui/mir/issue-71793-inline-args-storage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// check-pass
66
// edition:2018
7-
// compile-args: -Zmir-opt-level=2
7+
// compile-args: -Zmir-opt-level=3
88

99
#![crate_type = "lib"]
1010

src/test/ui/mir/issue-75053.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// build-pass
33

44
#![feature(type_alias_impl_trait)]

src/test/ui/mir/issue-76248.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Regression test for #76248.
44
//
55
// build-pass
6-
// compile-flags: -Zmir-opt-level=2
6+
// compile-flags: -Zmir-opt-level=3
77

88
const N: usize = 1;
99

src/test/ui/mir/issue-76375.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// edition:2018
44
// build-pass
5-
// compile-flags: -Z mir-opt-level=2
5+
// compile-flags: -Z mir-opt-level=3
66
// aux-build:issue_76375_aux.rs
77

88
#![crate_type = "lib"]

src/test/ui/mir/issue-77911.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// build-pass
33

44
use std::fs::File;

src/test/ui/mir/issue-78496.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags: -Z mir-opt-level=2 -C opt-level=0
2+
// compile-flags: -Z mir-opt-level=3 -C opt-level=0
33

44
// example from #78496
55
pub enum E<'a> {

src/test/ui/mir/issue66339.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// build-pass
33

44
// This used to ICE in const-prop

src/test/ui/mir/mir-inlining/array-clone-with-generic-size.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Regression test for issue #79269.
33
//
44
// build-pass
5-
// compile-flags: -Zmir-opt-level=2 -Zvalidate-mir
5+
// compile-flags: -Zmir-opt-level=3 -Zvalidate-mir
66
#[derive(Clone)]
77
struct Array<T, const N: usize>([T; N]);
88

src/test/ui/mir/mir-inlining/ice-issue-45493.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33

44
trait Array {
55
type Item;

src/test/ui/mir/mir-inlining/ice-issue-45885.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33

44
pub enum Enum {
55
A,

src/test/ui/mir/mir-inlining/ice-issue-68347.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33
pub fn main() {
44
let _x: fn() = handle_debug_column;
55
}

src/test/ui/mir/mir-inlining/ice-issue-77306-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33

44
// Previously ICEd because we did not normalize during inlining,
55
// see https://github.com/rust-lang/rust/pull/77306 for more discussion.

src/test/ui/mir/mir-inlining/ice-issue-77306-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33

44
struct Cursor {}
55
struct TokenTree {}

src/test/ui/mir/mir-inlining/ice-issue-77564.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33

44
use std::mem::MaybeUninit;
55
const N: usize = 2;

src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Ensures -Zmir-opt-level=2 (specifically, inlining) is not allowed with -Zinstrument-coverage.
1+
// Ensures -Zmir-opt-level=3 (specifically, inlining) is not allowed with -Zinstrument-coverage.
22
// Regression test for issue #80060.
33
//
44
// needs-profiler-support
55
// build-pass
6-
// compile-flags: -Zmir-opt-level=2 -Zinstrument-coverage
6+
// compile-flags: -Zmir-opt-level=3 -Zinstrument-coverage
77
#[inline(never)]
88
fn foo() {}
99

src/test/ui/mir/mir-inlining/no-trait-method-issue-40473.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags:-Zmir-opt-level=2
2+
// compile-flags:-Zmir-opt-level=3
33
pub trait Foo {
44
fn bar(&self) -> usize { 2 }
55
}

src/test/ui/mir/mir-inlining/var-debuginfo-issue-67586.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// compile-flags: -Z mir-opt-level=2 -C opt-level=0 -C debuginfo=2
2+
// compile-flags: -Z mir-opt-level=3 -C opt-level=0 -C debuginfo=2
33

44
#[inline(never)]
55
pub fn foo(bar: usize) -> usize {

src/test/ui/mir/mir_const_prop_tuple_field_reorder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=2
1+
// compile-flags: -Z mir-opt-level=3
22
// build-pass
33
#![crate_type="lib"]
44

0 commit comments

Comments
 (0)