rust/src/test/mir-opt
2020-04-15 14:53:41 -04:00
..
address-of bless mir opt tests 2020-04-13 22:39:10 +02:00
array-index-is-temporary update 32 bit mir-opt tests 2020-04-14 09:14:58 +02:00
basic_assignment bless mir opt tests 2020-04-13 22:39:10 +02:00
box_expr bless mir opt tests 2020-04-13 22:39:10 +02:00
byte_slice bless mir opt tests 2020-04-13 22:39:10 +02:00
combine_array_len Use write!-style syntax for MIR assert terminator 2020-04-11 13:27:51 +02:00
const_allocation update 32 bit mir-opt tests 2020-04-14 09:14:58 +02:00
const_allocation2 update 32 bit mir-opt tests 2020-04-14 09:14:58 +02:00
const_allocation3 Remove other Rvalues 2020-04-15 14:53:41 -04:00
const_prop Remove other Rvalues 2020-04-15 14:53:41 -04:00
const-promotion-extern-static Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
copy_propagation --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
copy_propagation_arg bless mir opt tests 2020-04-13 22:39:10 +02:00
deaggregator_test --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test_enum --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test_enum_2 --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test_multiple --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
exponential-or --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
generator-drop-cleanup --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
generator-storage-dead-unwind bless mir opt tests 2020-04-13 22:39:10 +02:00
generator-tiny bless mir opt tests 2020-04-13 22:39:10 +02:00
graphviz bless mir opt tests 2020-04-13 22:39:10 +02:00
inline update 32 bit mir-opt tests 2020-04-14 09:14:58 +02:00
issue-38669 bless mir opt tests 2020-04-13 22:39:10 +02:00
issue-41110 bless mir opt tests 2020-04-13 22:39:10 +02:00
issue-41697 Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
issue-41888 bless mir opt tests 2020-04-13 22:39:10 +02:00
issue-49232 bless mir opt tests 2020-04-13 22:39:10 +02:00
issue-62289 --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
loop_test bless mir opt tests 2020-04-13 22:39:10 +02:00
match_false_edges bless mir opt tests 2020-04-13 22:39:10 +02:00
match_test bless mir opt tests 2020-04-13 22:39:10 +02:00
match-arm-scopes Add ignore-wasm32-bare to mir-opt tests that need it. 2020-04-08 18:58:49 +00:00
nll update 32 bit mir-opt tests 2020-04-14 09:14:58 +02:00
no-drop-for-inactive-variant Normalize away pairs of line:col numbers. 2020-04-07 17:49:14 +00:00
no-spurious-drop-after-call bless mir opt tests 2020-04-13 22:39:10 +02:00
packed-struct-drop-aligned update 32 bit mir-opt tests 2020-04-14 09:14:58 +02:00
remove_fake_borrows --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
retag bless mir opt tests 2020-04-13 22:39:10 +02:00
retain-never-const --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simple-match Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
simplify_cfg bless mir opt tests 2020-04-13 22:39:10 +02:00
simplify_if bless mir opt tests 2020-04-13 22:39:10 +02:00
simplify_match bless mir opt tests 2020-04-13 22:39:10 +02:00
simplify_try Normalize away pairs of line:col numbers. 2020-04-07 17:49:14 +00:00
simplify-arm-identity bless mir opt tests 2020-04-13 22:39:10 +02:00
simplify-locals-fixedpoint Remove other Rvalues 2020-04-15 14:53:41 -04:00
simplify-locals-removes-unused-consts bless mir opt tests 2020-04-13 22:39:10 +02:00
simplify-locals-removes-unused-discriminant-reads Remove unused discriminant reads from MIR bodies 2020-04-02 08:14:34 -04:00
slice-drop-shim Normalize away pairs of line:col numbers. 2020-04-07 17:49:14 +00:00
storage_live_dead_in_statics --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
storage_ranges bless mir opt tests 2020-04-13 22:39:10 +02:00
uniform_array_move_out bless mir opt tests 2020-04-13 22:39:10 +02:00
uninhabited_enum_branching bless mir opt tests 2020-04-13 22:39:10 +02:00
uninhabited-enum bless mir opt tests 2020-04-13 22:39:10 +02:00
unreachable bless mir opt tests 2020-04-13 22:39:10 +02:00
unreachable_asm bless mir opt tests 2020-04-13 22:39:10 +02:00
unreachable_asm_2 bless mir opt tests 2020-04-13 22:39:10 +02:00
unreachable_diverging bless mir opt tests 2020-04-13 22:39:10 +02:00
unusual-item-types Normalize away pairs of line:col numbers. 2020-04-07 17:49:14 +00:00
while-storage bless mir opt tests 2020-04-13 22:39:10 +02:00
address-of.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
array-index-is-temporary.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
basic_assignment.rs Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
box_expr.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
byte_slice.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
combine_array_len.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
const_allocation2.rs Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
const_allocation3.rs Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
const_allocation.rs Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
const-promotion-extern-static.rs Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
copy_propagation_arg.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
copy_propagation.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test_enum_2.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test_enum.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test_multiple.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
deaggregator_test.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
exponential-or.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
generator-drop-cleanup.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
generator-storage-dead-unwind.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
generator-tiny.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
graphviz.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
issue-38669.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
issue-41110.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
issue-41697.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
issue-41888.rs Add ignore-wasm32-bare to mir-opt tests that need it. 2020-04-08 18:58:49 +00:00
issue-49232.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
issue-62289.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
loop_test.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
match_false_edges.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
match_test.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
match-arm-scopes.rs Add ignore-wasm32-bare to mir-opt tests that need it. 2020-04-08 18:58:49 +00:00
no-drop-for-inactive-variant.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
no-spurious-drop-after-call.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
packed-struct-drop-aligned.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
README.md Remove old mir-opt test format. 2020-04-07 18:02:11 +00:00
remove_fake_borrows.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
retag.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
retain-never-const.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
return_an_array.rs
simple-match.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
simplify_cfg.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simplify_if.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simplify_match.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simplify_try.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simplify-arm-identity.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simplify-locals-fixedpoint.rs Add test case 2020-04-15 14:34:23 -04:00
simplify-locals-removes-unused-consts.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
simplify-locals-removes-unused-discriminant-reads.rs Remove unused discriminant reads from MIR bodies 2020-04-02 08:14:34 -04:00
slice-drop-shim.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
storage_live_dead_in_statics.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
storage_ranges.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
uniform_array_move_out.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
uninhabited_enum_branching.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
uninhabited-enum.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
unreachable_asm_2.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
unreachable_asm.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
unreachable_diverging.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
unreachable.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00
unusual-item-types.rs Add EMIT_MIR_FOR_EACH_BIT_WIDTH to tests that need it. 2020-04-07 17:49:14 +00:00
while-storage.rs --bless all mir-opt tests. 2020-04-07 15:09:01 +00:00

This folder contains tests for MIR optimizations.

The mir-opt test format emits MIR to extra files that you can automatically update by specifying --bless on the command line (just like ui tests updating .stderr files).

--blessable test format

By default 32 bit and 64 bit targets use the same dump files, which can be problematic in the presence of pointers in constants or other bit width dependent things. In that case you can add

// EMIT_MIR_FOR_EACH_BIT_WIDTH

to your test, causing separate files to be generated for 32bit and 64bit systems.

Emit a diff of the mir for a specific optimization

This is what you want most often when you want to see how an optimization changes the MIR.

// EMIT_MIR $file_name_of_some_mir_dump.diff

Emit mir after a specific optimization

Use this if you are just interested in the final state after an optimization.

// EMIT_MIR $file_name_of_some_mir_dump.after.mir

Emit mir before a specific optimization

This exists mainly for completeness and is rarely useful.

// EMIT_MIR $file_name_of_some_mir_dump.before.mir