Skip to content

Commit

Permalink
Bump mir-opt-level from 3 to 4 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Mar 5, 2021
1 parent 03c1f17 commit 705813c
Show file tree
Hide file tree
Showing 29 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/test/codegen/sanitizer-no-sanitize-inlining.rs
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/const_prop/boolean_identities.rs
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/const_prop/mult_by_zero.rs
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/early_otherwise_branch.rs
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/early_otherwise_branch_68867.rs
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/early_otherwise_branch_noopt.rs
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/inline/inline-into-box-place.rs
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/inline/inline-trait-method_2.rs
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/multiple_return_terminators.rs
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/issues/issue-75299.rs
@@ -1,4 +1,4 @@
// compile-flags: -Zmir-opt-level=3
// compile-flags: -Zmir-opt-level=4
// run-pass

#![feature(const_generics)]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/consts/issue-66345.rs
@@ -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(_: &()) {}

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/issue-67640.rs
@@ -1,4 +1,4 @@
// compile-flags: -Z mir-opt-level=3
// compile-flags: -Z mir-opt-level=4
// run-pass

struct X {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-50411.rs
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/mir/issue-67639-normalization-ice.rs
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/mir/issue-76740-copy-propagation.rs
@@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/mir/ssa-analysis-regression-50041.rs
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/polymorphization/promoted-function-3.rs
@@ -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>()
Expand Down
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rfc-2091-track-caller/const-caller-location.rs
@@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rfc-2091-track-caller/intrinsic-wrapper.rs
@@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rfc-2091-track-caller/pass.rs
@@ -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() {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rfc-2091-track-caller/std-panic-locations.rs
@@ -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)]
Expand Down
@@ -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;

Expand Down
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rfc-2091-track-caller/tracked-fn-ptr.rs
@@ -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();
Expand Down
Expand Up @@ -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" {
Expand Down
Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest.rs
Expand Up @@ -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",
]);
Expand Down

0 comments on commit 705813c

Please sign in to comment.