diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-05-21 11:44:37 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-05-21 17:48:37 -0700 |
| commit | d69725d5d5173e6c6fc20873f306cbd66fa963e7 (patch) | |
| tree | 4237d31f1a210397d910b0a41f1057b1b49035ad /src/tools/compiletest | |
| parent | 05bf42bfa9f616652be4fb11142c6bec0c85db96 (diff) | |
| download | rust-d69725d5d5173e6c6fc20873f306cbd66fa963e7.tar.gz rust-d69725d5d5173e6c6fc20873f306cbd66fa963e7.zip | |
Normalize block and local orders in mir-opt tests
Since this only affects `PreCodegen MIR, and it would be nice for that to be resilient to permutations of things that don't affect the actual semantic behaviours.
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 5bc4d164265..a799d93ce25 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2045,7 +2045,10 @@ impl<'test> TestCx<'test> { if let Some(pass) = &self.props.mir_unit_test { rustc.args(&["-Zmir-opt-level=0", &format!("-Zmir-enable-passes=+{}", pass)]); } else { - rustc.arg("-Zmir-opt-level=4"); + rustc.args(&[ + "-Zmir-opt-level=4", + "-Zmir-enable-passes=+ReorderBasicBlocks,+ReorderLocals", + ]); } let mir_dump_dir = self.get_mir_dump_dir(); |
