Skip to content

Commit 0f9fdba

Browse files
committed
Bump mir-opt-level from 3 to 4 in tests
1 parent 38ec6be commit 0f9fdba

29 files changed

+31
-31
lines changed

src/test/codegen/sanitizer-no-sanitize-inlining.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// needs-sanitizer-address
55
// needs-sanitizer-leak
66
// revisions: ASAN LSAN
7-
//[ASAN] compile-flags: -Zsanitizer=address -C opt-level=3 -Z mir-opt-level=3
8-
//[LSAN] compile-flags: -Zsanitizer=leak -C opt-level=3 -Z mir-opt-level=3
7+
//[ASAN] compile-flags: -Zsanitizer=address -C opt-level=3 -Z mir-opt-level=4
8+
//[LSAN] compile-flags: -Zsanitizer=leak -C opt-level=3 -Z mir-opt-level=4
99

1010
#![crate_type="lib"]
1111
#![feature(no_sanitize)]

src/test/mir-opt/const_prop/boolean_identities.rs

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

33
// EMIT_MIR boolean_identities.test.ConstProp.diff
44
pub fn test(x: bool, y: bool) -> bool {

src/test/mir-opt/const_prop/mult_by_zero.rs

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

33
// EMIT_MIR mult_by_zero.test.ConstProp.diff
44
fn test(x : i32) -> i32 {

src/test/mir-opt/early_otherwise_branch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=3
1+
// compile-flags: -Z mir-opt-level=4
22
// EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
33
fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
44
match (x, y) {

src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs

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

33
// EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff
44
fn opt1(x: Option<u32>, y: Option<u32>, z: Option<u32>) -> u32 {

src/test/mir-opt/early_otherwise_branch_68867.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ignore-tidy-linelength
2-
// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
2+
// compile-flags: -Z mir-opt-level=4 -Zunsound-mir-opts
33

44
// example from #68867
55
type CSSFloat = f32;

src/test/mir-opt/early_otherwise_branch_noopt.rs

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

33
// must not optimize as it does not follow the pattern of
44
// left and right hand side being the same variant

src/test/mir-opt/inline/inline-into-box-place.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ignore-endian-big
22
// ignore-wasm32-bare compiled with panic=abort by default
3-
// compile-flags: -Z mir-opt-level=3
3+
// compile-flags: -Z mir-opt-level=4
44
// EMIT_MIR_FOR_EACH_BIT_WIDTH
55
#![feature(box_syntax)]
66
// EMIT_MIR inline_into_box_place.main.Inline.diff

src/test/mir-opt/inline/inline-trait-method_2.rs

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

33
// EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
44
fn test2(x: &dyn X) -> bool {

src/test/mir-opt/multiple_return_terminators.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z mir-opt-level=3
1+
// compile-flags: -Z mir-opt-level=4
22
// EMIT_MIR multiple_return_terminators.test.MultipleReturnTerminators.diff
33

44
fn test(x: bool) {

src/test/ui/const-generics/issues/issue-75299.rs

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

44
#![feature(const_generics)]

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

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

44
// Checks that the compiler does not ICE when passing references to field of by-value struct
5-
// with -Z mir-opt-level=3
5+
// with -Z mir-opt-level=4
66

77
fn do_nothing(_: &()) {}
88

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

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

44
struct X {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// elaborate-drops invoked on it) and then try to elaboate drops a
44
// second time. Uncool.
55

6-
// compile-flags:-Zmir-opt-level=3
6+
// compile-flags:-Zmir-opt-level=4
77
// build-pass
88

99
fn main() {

src/test/ui/mir/issue-67639-normalization-ice.rs

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

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

src/test/ui/mir/issue-76740-copy-propagation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Regression test for issue #76740.
22
// run-pass
3-
// compile-flags: -Zmir-opt-level=3
3+
// compile-flags: -Zmir-opt-level=4
44

55
#[derive(Copy, Clone)]
66
pub struct V([usize; 4]);

src/test/ui/mir/ssa-analysis-regression-50041.rs

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

44
#![crate_type="lib"]
55
#![feature(lang_items)]

src/test/ui/polymorphization/promoted-function-3.rs

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

44
fn caller<T, U>() -> &'static usize {
55
callee::<U>()

src/test/ui/rfc-2091-track-caller/caller-location-intrinsic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
#[inline(never)]
66
#[track_caller]

src/test/ui/rfc-2091-track-caller/const-caller-location.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
#![feature(const_caller_location, const_fn)]
66

src/test/ui/rfc-2091-track-caller/intrinsic-wrapper.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
macro_rules! caller_location_from_macro {
66
() => (core::panic::Location::caller());

src/test/ui/rfc-2091-track-caller/pass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
#[track_caller]
66
fn f() {}

src/test/ui/rfc-2091-track-caller/std-panic-locations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-pass
22
// ignore-wasm32-bare compiled with panic=abort by default
33
// revisions: default mir-opt
4-
//[mir-opt] compile-flags: -Zmir-opt-level=3
4+
//[mir-opt] compile-flags: -Zmir-opt-level=4
55

66
#![feature(option_expect_none, option_unwrap_none)]
77
#![allow(unconditional_panic)]

src/test/ui/rfc-2091-track-caller/track-caller-attribute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
use std::panic::Location;
66

src/test/ui/rfc-2091-track-caller/tracked-fn-ptr-with-arg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
fn pass_to_ptr_call<T>(f: fn(T), x: T) {
66
f(x);

src/test/ui/rfc-2091-track-caller/tracked-fn-ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-pass
22
// revisions: default mir-opt
3-
//[mir-opt] compile-flags: -Zmir-opt-level=3
3+
//[mir-opt] compile-flags: -Zmir-opt-level=4
44

55
fn ptr_call(f: fn()) {
66
f();

src/test/ui/simd-intrinsic/simd-intrinsic-inlining-issue67557-ice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// passed the wrong Instance, causing issues with inlining. See #67557.
33
//
44
// run-pass
5-
// compile-flags: -Zmir-opt-level=3
5+
// compile-flags: -Zmir-opt-level=4
66
#![feature(platform_intrinsics, repr_simd)]
77

88
extern "platform-intrinsic" {

src/test/ui/simd-intrinsic/simd-intrinsic-inlining-issue67557.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// the wrong Instance, causing issues with inlining. See #67557.
33
//
44
// run-pass
5-
// compile-flags: -Zmir-opt-level=3
5+
// compile-flags: -Zmir-opt-level=4
66
#![feature(platform_intrinsics, repr_simd)]
77

88
extern "platform-intrinsic" {

src/tools/compiletest/src/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ impl<'test> TestCx<'test> {
19601960
rustc.args(&[
19611961
"-Copt-level=1",
19621962
"-Zdump-mir=all",
1963-
"-Zmir-opt-level=3",
1963+
"-Zmir-opt-level=4",
19641964
"-Zvalidate-mir",
19651965
"-Zdump-mir-exclude-pass-number",
19661966
]);

0 commit comments

Comments
 (0)