diff options
| author | Jakob Degen <jakob.e.degen@gmail.com> | 2022-08-20 21:47:53 -0700 |
|---|---|---|
| committer | Jakob Degen <jakob.e.degen@gmail.com> | 2022-09-01 23:01:53 -0700 |
| commit | e5d60af3c6f44be48371e32ef553416d277c92ec (patch) | |
| tree | a977da12f72f7265c0aff24547c4159be55f1bfc /src/test/mir-opt/lower_array_len.array_len.SimplifyLocals.diff | |
| parent | 10706d62da83c4ec215165bc72df46219536648f (diff) | |
| download | rust-e5d60af3c6f44be48371e32ef553416d277c92ec.tar.gz rust-e5d60af3c6f44be48371e32ef553416d277c92ec.zip | |
Simplify MIR opt tests
This commit removes many cases of MIR opt tests emitting `.diff`s for more than one pass. These tests cannot be `unit-test`s, and so they are easy to break, and they also provide little value due to having excessively strong opinions over *how* a piece of code should be optimized. Where reasonable, we instead add separate test files that only emit the `PreCodegen.after` MIR for code where we want to track what the result of the net result of the optimization pipeline's output is.
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_len.SimplifyLocals.diff')
| -rw-r--r-- | src/test/mir-opt/lower_array_len.array_len.SimplifyLocals.diff | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/test/mir-opt/lower_array_len.array_len.SimplifyLocals.diff b/src/test/mir-opt/lower_array_len.array_len.SimplifyLocals.diff deleted file mode 100644 index 09d571d20a3..00000000000 --- a/src/test/mir-opt/lower_array_len.array_len.SimplifyLocals.diff +++ /dev/null @@ -1,22 +0,0 @@ -- // MIR for `array_len` before SimplifyLocals -+ // MIR for `array_len` after SimplifyLocals - - fn array_len(_1: &[u8; N]) -> usize { - debug arr => _1; // in scope 0 at $DIR/lower_array_len.rs:+0:34: +0:37 - let mut _0: usize; // return place in scope 0 at $DIR/lower_array_len.rs:+0:52: +0:57 -- let mut _2: &[u8]; // in scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- let mut _3: &[u8; N]; // in scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- let mut _4: &[u8; N]; // in scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 - - bb0: { -- StorageLive(_2); // scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- StorageLive(_3); // scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- StorageLive(_4); // scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- StorageDead(_3); // scope 0 at $DIR/lower_array_len.rs:+1:7: +1:8 - _0 = const N; // scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- StorageDead(_4); // scope 0 at $DIR/lower_array_len.rs:+1:5: +1:14 -- StorageDead(_2); // scope 0 at $DIR/lower_array_len.rs:+1:13: +1:14 - return; // scope 0 at $DIR/lower_array_len.rs:+2:2: +2:2 - } - } - |
