Skip to content

Commit 15c148b

Browse files
Rollup merge of #82736 - spastorino:mir-opt-level-perf-changes, r=oli-obk
Bump optimization from mir_opt_level 2 to 3 and 3 to 4 and make "release" be level 2 by default r? `@oli-obk`
2 parents 34b2caa + 11d9390 commit 15c148b

File tree

85 files changed

+117
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+117
-109
lines changed

compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ fn test_debugging_options_tracking_hash() {
566566
tracked!(link_only, true);
567567
tracked!(merge_functions, Some(MergeFunctions::Disabled));
568568
tracked!(mir_emit_retag, true);
569-
tracked!(mir_opt_level, 3);
569+
tracked!(mir_opt_level, Some(4));
570570
tracked!(mutable_noalias, true);
571571
tracked!(new_llvm_pass_manager, true);
572572
tracked!(no_codegen, true);

compiler/rustc_mir/src/transform/const_goto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct ConstGoto;
2828

2929
impl<'tcx> MirPass<'tcx> for ConstGoto {
3030
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
31-
if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
31+
if tcx.sess.mir_opt_level() < 4 {
3232
return;
3333
}
3434
trace!("Running ConstGoto on {:?}", body.source);

compiler/rustc_mir/src/transform/const_prop.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
725725
return None;
726726
}
727727

728-
if self.tcx.sess.opts.debugging_opts.mir_opt_level >= 3 {
728+
if self.tcx.sess.mir_opt_level() >= 4 {
729729
self.eval_rvalue_with_identities(rvalue, place)
730730
} else {
731731
self.use_ecx(|this| this.ecx.eval_rvalue_into_place(rvalue, place))
@@ -903,7 +903,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
903903

904904
/// Returns `true` if and only if this `op` should be const-propagated into.
905905
fn should_const_prop(&mut self, op: &OpTy<'tcx>) -> bool {
906-
let mir_opt_level = self.tcx.sess.opts.debugging_opts.mir_opt_level;
906+
let mir_opt_level = self.tcx.sess.mir_opt_level();
907907

908908
if mir_opt_level == 0 {
909909
return false;
@@ -1071,9 +1071,9 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
10711071
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, location: Location) {
10721072
self.super_operand(operand, location);
10731073

1074-
// Only const prop copies and moves on `mir_opt_level=2` as doing so
1074+
// Only const prop copies and moves on `mir_opt_level=3` as doing so
10751075
// currently slightly increases compile time in some cases.
1076-
if self.tcx.sess.opts.debugging_opts.mir_opt_level >= 2 {
1076+
if self.tcx.sess.mir_opt_level() >= 3 {
10771077
self.propagate_operand(operand)
10781078
}
10791079
}
@@ -1253,7 +1253,7 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
12531253
TerminatorKind::SwitchInt { ref mut discr, .. } => {
12541254
// FIXME: This is currently redundant with `visit_operand`, but sadly
12551255
// always visiting operands currently causes a perf regression in LLVM codegen, so
1256-
// `visit_operand` currently only runs for propagates places for `mir_opt_level=3`.
1256+
// `visit_operand` currently only runs for propagates places for `mir_opt_level=4`.
12571257
self.propagate_operand(discr)
12581258
}
12591259
// None of these have Operands to const-propagate.
@@ -1272,7 +1272,7 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
12721272
// Every argument in our function calls have already been propagated in `visit_operand`.
12731273
//
12741274
// NOTE: because LLVM codegen gives slight performance regressions with it, so this is
1275-
// gated on `mir_opt_level=2`.
1275+
// gated on `mir_opt_level=3`.
12761276
TerminatorKind::Call { .. } => {}
12771277
}
12781278

compiler/rustc_mir/src/transform/deduplicate_blocks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct DeduplicateBlocks;
1616

1717
impl<'tcx> MirPass<'tcx> for DeduplicateBlocks {
1818
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
19-
if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
19+
if tcx.sess.mir_opt_level() < 4 {
2020
return;
2121
}
2222
debug!("Running DeduplicateBlocks on `{:?}`", body.source);

compiler/rustc_mir/src/transform/dest_prop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ pub struct DestinationPropagation;
127127

128128
impl<'tcx> MirPass<'tcx> for DestinationPropagation {
129129
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
130-
// Only run at mir-opt-level=2 or higher for now (we don't fix up debuginfo and remove
130+
// Only run at mir-opt-level=3 or higher for now (we don't fix up debuginfo and remove
131131
// storage statements at the moment).
132-
if tcx.sess.opts.debugging_opts.mir_opt_level <= 1 {
132+
if tcx.sess.mir_opt_level() < 3 {
133133
return;
134134
}
135135

compiler/rustc_mir/src/transform/early_otherwise_branch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct EarlyOtherwiseBranch;
2626

2727
impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
2828
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
29-
if tcx.sess.opts.debugging_opts.mir_opt_level < 2 {
29+
if tcx.sess.mir_opt_level() < 3 {
3030
return;
3131
}
3232
trace!("running EarlyOtherwiseBranch on {:?}", body.source);

compiler/rustc_mir/src/transform/inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ crate fn is_enabled(tcx: TyCtxt<'_>) -> bool {
5252
return enabled;
5353
}
5454

55-
tcx.sess.opts.debugging_opts.mir_opt_level >= 2
55+
tcx.sess.mir_opt_level() >= 3
5656
}
5757

5858
impl<'tcx> MirPass<'tcx> for Inline {

compiler/rustc_mir/src/transform/match_branches.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub struct MatchBranchSimplification;
4040
4141
impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
4242
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
43-
if tcx.sess.opts.debugging_opts.mir_opt_level <= 1 {
43+
if tcx.sess.mir_opt_level() < 3 {
4444
return;
4545
}
4646

compiler/rustc_mir/src/transform/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ fn run_post_borrowck_cleanup_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tc
475475
}
476476

477477
fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
478-
let mir_opt_level = tcx.sess.opts.debugging_opts.mir_opt_level;
478+
let mir_opt_level = tcx.sess.mir_opt_level();
479479

480480
// Lowering generator control-flow and variables has to happen before we do anything else
481481
// to them. We run some optimizations before that, because they may be harder to do on the state

compiler/rustc_mir/src/transform/multiple_return_terminators.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub struct MultipleReturnTerminators;
1010

1111
impl<'tcx> MirPass<'tcx> for MultipleReturnTerminators {
1212
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
13-
if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
13+
if tcx.sess.mir_opt_level() < 4 {
1414
return;
1515
}
1616

compiler/rustc_mir/src/transform/nrvo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct RenameReturnPlace;
3434

3535
impl<'tcx> MirPass<'tcx> for RenameReturnPlace {
3636
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut mir::Body<'tcx>) {
37-
if tcx.sess.opts.debugging_opts.mir_opt_level == 0 {
37+
if tcx.sess.mir_opt_level() == 0 {
3838
return;
3939
}
4040

compiler/rustc_mir/src/transform/unreachable_prop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub struct UnreachablePropagation;
1212

1313
impl MirPass<'_> for UnreachablePropagation {
1414
fn run_pass<'tcx>(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
15-
if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
16-
// Enable only under -Zmir-opt-level=3 as in some cases (check the deeply-nested-opt
15+
if tcx.sess.mir_opt_level() < 4 {
16+
// Enable only under -Zmir-opt-level=4 as in some cases (check the deeply-nested-opt
1717
// perf benchmark) LLVM may spend quite a lot of time optimizing the generated code.
1818
return;
1919
}

compiler/rustc_session/src/config.rs

+16-14
Original file line numberDiff line numberDiff line change
@@ -1938,21 +1938,23 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
19381938
Some(SymbolManglingVersion::V0) => {}
19391939
}
19401940

1941-
if debugging_opts.mir_opt_level > 1 {
1942-
// Functions inlined during MIR transform can, at best, make it impossible to
1943-
// effectively cover inlined functions, and, at worst, break coverage map generation
1944-
// during LLVM codegen. For example, function counter IDs are only unique within a
1945-
// function. Inlining after these counters are injected can produce duplicate counters,
1946-
// resulting in an invalid coverage map (and ICE); so this option combination is not
1947-
// allowed.
1948-
early_warn(
1949-
error_format,
1950-
&format!(
1951-
"`-Z mir-opt-level={}` (or any level > 1) enables function inlining, which \
1941+
if let Some(mir_opt_level) = debugging_opts.mir_opt_level {
1942+
if mir_opt_level > 1 {
1943+
// Functions inlined during MIR transform can, at best, make it impossible to
1944+
// effectively cover inlined functions, and, at worst, break coverage map generation
1945+
// during LLVM codegen. For example, function counter IDs are only unique within a
1946+
// function. Inlining after these counters are injected can produce duplicate counters,
1947+
// resulting in an invalid coverage map (and ICE); so this option combination is not
1948+
// allowed.
1949+
early_warn(
1950+
error_format,
1951+
&format!(
1952+
"`-Z mir-opt-level={}` (or any level > 1) enables function inlining, which \
19521953
is incompatible with `-Z instrument-coverage`. Inlining will be disabled.",
1953-
debugging_opts.mir_opt_level,
1954-
),
1955-
);
1954+
mir_opt_level,
1955+
),
1956+
);
1957+
}
19561958
}
19571959
}
19581960

compiler/rustc_session/src/options.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
999999
mir_emit_retag: bool = (false, parse_bool, [TRACKED],
10001000
"emit Retagging MIR statements, interpreted e.g., by miri; implies -Zmir-opt-level=0 \
10011001
(default: no)"),
1002-
mir_opt_level: usize = (1, parse_uint, [TRACKED],
1003-
"MIR optimization level (0-3; default: 1)"),
1002+
mir_opt_level: Option<usize> = (None, parse_opt_uint, [TRACKED],
1003+
"MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"),
10041004
mutable_noalias: bool = (false, parse_bool, [TRACKED],
10051005
"emit noalias metadata for mutable references (default: no)"),
10061006
new_llvm_pass_manager: bool = (false, parse_bool, [TRACKED],

compiler/rustc_session/src/session.rs

+6
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,12 @@ impl Session {
640640
pub fn binary_dep_depinfo(&self) -> bool {
641641
self.opts.debugging_opts.binary_dep_depinfo
642642
}
643+
pub fn mir_opt_level(&self) -> usize {
644+
self.opts
645+
.debugging_opts
646+
.mir_opt_level
647+
.unwrap_or_else(|| if self.opts.optimize != config::OptLevel::No { 2 } else { 1 })
648+
}
643649

644650
/// Gets the features enabled for the current compilation session.
645651
/// DO NOT USE THIS METHOD if there is a TyCtxt available, as it circumvents

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

0 commit comments

Comments
 (0)