Use -Zmir-opt-level=0 in tests for MIR building#142215
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 27, 2025
Merged
Conversation
Collaborator
|
☔ The latest upstream changes (presumably #145773) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
|
Actually, should this whole test suite run in mir-opt-level=0 unless we specify otherwise? Tests for specific mir passes already do that. Precodegen also specify a level. |
Member
Author
|
It is often surprising that the mir-opt test suite defaults everything to opt-level 4. I'd support such a change. |
Contributor
|
On this PR in particular, if you still want to push it, r=me after a rebase |
d8954d0 to
22cdf21
Compare
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
Member
Author
|
r? cjgillot Gonna wait for CI to pass |
Member
Author
|
@bors r=cjgillot |
Collaborator
bors
added a commit
that referenced
this pull request
Aug 27, 2025
Rollup of 6 pull requests Successful merges: - #142215 (Use -Zmir-opt-level=0 in tests for MIR building) - #143341 (Mention that casting to *const () is a way to roundtrip with from_raw_parts) - #145078 (Fix wrong cache line size of riscv64) - #145290 (Improve std::fs::read_dir docs) - #145335 (Move WTF-8 code from std into core and alloc) - #145904 (Move `riscv64-gc-unknown-linux-musl` from Tier 2 with Host tools to Tier 2) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Aug 27, 2025
Rollup merge of #142215 - saethlin:mir-building-tests, r=cjgillot Use -Zmir-opt-level=0 in tests for MIR building The mir-opt test suite currently defaults all tests in it to `-Zmir-opt-level=4`, so if a test is trying to test MIR _building_ not optimizations and it is in that directory, it _must_ override the default mir-opt-level.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The mir-opt test suite currently defaults all tests in it to
-Zmir-opt-level=4, so if a test is trying to test MIR building not optimizations and it is in that directory, it must override the default mir-opt-level.