rust/src/test/mir-opt
2022-09-18 12:18:34 +08:00
..
const_prop address review again 2022-09-14 17:30:25 +02:00
dead-store-elimination Use the declaration's SourceInfo for FnEntry retags, not the outermost 2022-08-28 11:40:10 -04:00
dest-prop Fix a bunch of typo 2022-08-31 18:24:55 +08:00
inline Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnr 2022-09-17 03:04:22 +00:00
issues ./x.py test --bless 2022-08-23 00:00:00 +00:00
nll Remove ReEmpty 2022-09-08 20:55:55 -04:00
76803_regression.encode.SimplifyBranchSame.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
76803_regression.rs Add regression test showcasing miscompilation 2020-09-19 15:29:09 +02:00
address-of.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
address_of.address_of_reborrow.SimplifyCfg-initial.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
address_of.borrow_and_cast.SimplifyCfg-initial.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
array-index-is-temporary.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
asm_unwind_panic_abort.main.AbortUnwindingCalls.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
asm_unwind_panic_abort.rs Update the minimum external LLVM to 13 2022-08-14 13:46:51 -07:00
basic_assignment.main.SimplifyCfg-initial.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
basic_assignment.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
bool_compare.opt1.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
bool_compare.opt2.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
bool_compare.opt3.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
bool_compare.opt4.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
bool_compare.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
box_expr.main.ElaborateDrops.before.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
box_expr.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
byte_slice.main.SimplifyCfg-elaborate-drops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
byte_slice.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
combine_array_len.norm2.InstCombine.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
combine_array_len.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
combine_clone_of_primitives.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff bless mir-opt tests 2022-08-22 15:19:40 +02:00
const-promotion-extern-static.rs Stop optimizing promoteds 2021-01-04 21:40:38 +00:00
const_allocation.main.ConstProp.after.32bit.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_allocation.main.ConstProp.after.64bit.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_allocation.rs compiletest: ignore-endian-big, fixes #74829, fixes #74885 2020-07-31 12:58:37 +01:00
const_allocation2.main.ConstProp.after.32bit.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_allocation2.main.ConstProp.after.64bit.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_allocation2.rs compiletest: ignore-endian-big, fixes #74829, fixes #74885 2020-07-31 12:58:37 +01:00
const_allocation3.main.ConstProp.after.32bit.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_allocation3.main.ConstProp.after.64bit.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_allocation3.rs compiletest: ignore-endian-big, fixes #74829, fixes #74885 2020-07-31 12:58:37 +01:00
const_debuginfo.main.ConstDebugInfo.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
const_debuginfo.rs Disable the constant debuginfo promotion pass by default 2020-12-14 19:56:10 -05:00
const_goto.issue_77355_opt.ConstGoto.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
const_goto.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
const_goto_const_eval_fail.f.ConstGoto.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
const_goto_const_eval_fail.rs New mir-opt pass to simplify gotos with const values 2021-02-22 21:03:57 +01:00
const_goto_storage.match_nested_if.ConstGoto.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
const_goto_storage.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_promotion_extern_static.BAR.PromoteTemps.diff Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnr 2022-09-17 03:04:22 +00:00
const_promotion_extern_static.BOP.mir_map.0.mir Use tcx.hir() utils for spans in MIR building. 2022-09-13 19:18:23 +02:00
const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
const_promotion_extern_static.FOO.PromoteTemps.diff Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnr 2022-09-17 03:04:22 +00:00
const_prop_miscompile.bar.ConstProp.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
const_prop_miscompile.foo.ConstProp.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
const_prop_miscompile.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
coverage_graphviz.bar.InstrumentCoverage.0.dot Fixed conflict with drop elaboration and coverage 2020-12-15 23:33:47 -08:00
coverage_graphviz.main.InstrumentCoverage.0.dot ./x.py test --bless 2021-09-18 00:00:00 +00:00
coverage_graphviz.rs Stabilize -Z instrument-coverage as -C instrument-coverage 2022-01-01 15:57:35 -08:00
deaggregator_test.bar.Deaggregator.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
deaggregator_test.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
deaggregator_test_enum.bar.Deaggregator.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
deaggregator_test_enum.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
deaggregator_test_enum_2.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
deaggregator_test_enum_2.test1.Deaggregator.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
deaggregator_test_multiple.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
deaggregator_test_multiple.test.Deaggregator.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
deduplicate_blocks.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
derefer_complex_case.main.Derefer.diff rebase 2022-09-13 17:48:05 +02:00
derefer_complex_case.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
derefer_inline_test.main.Derefer.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
derefer_inline_test.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
derefer_terminator_test.main.Derefer.diff ./x.py test --bless 2022-08-23 00:00:00 +00:00
derefer_terminator_test.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
derefer_test.main.Derefer.diff ./x.py test --bless 2022-08-23 00:00:00 +00:00
derefer_test.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
derefer_test_multiple.main.Derefer.diff ./x.py test --bless 2022-08-23 00:00:00 +00:00
derefer_test_multiple.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
early_otherwise_branch.opt3.EarlyOtherwiseBranch.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
early_otherwise_branch.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
early_otherwise_branch_3_element_tuple.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
early_otherwise_branch_68867.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
early_otherwise_branch_noopt.noopt1.EarlyOtherwiseBranch.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
early_otherwise_branch_noopt.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
early_otherwise_branch_soundness.no_deref_ptr.EarlyOtherwiseBranch.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
early_otherwise_branch_soundness.no_downcast.EarlyOtherwiseBranch.diff ./x.py test --bless 2022-08-23 00:00:00 +00:00
early_otherwise_branch_soundness.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
enum_cast.bar.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
enum_cast.boo.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
enum_cast.droppy.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
enum_cast.foo.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
enum_cast.rs Change enum->int casts to not go through MIR casts. 2022-06-30 07:47:07 +00:00
equal_true.opt.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
equal_true.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
exponential-or.rs update tests 2021-03-19 19:45:42 -05:00
exponential_or.match_tuple.SimplifyCfg-initial.after.mir Shrink span for bindings with subpatterns. 2022-09-06 20:57:44 +02:00
fn-ptr-shim.rs Validate the MIR of all optimizations in the mir-opt directory 2020-08-18 13:01:00 +02:00
fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
funky_arms.float_to_exponential_common.ConstProp.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
funky_arms.rs move Deaggregate pass to post_borrowck_cleanup 2020-08-11 17:09:15 +02:00
generator-drop-cleanup.rs Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
generator-storage-dead-unwind.rs Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
generator-tiny.rs Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir Use tcx.hir() utils for spans in MIR building. 2022-09-13 19:18:23 +02:00
generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir Use tcx.hir() utils for spans in MIR building. 2022-09-13 19:18:23 +02:00
generator_tiny.main-{closure#0}.generator_resume.0.mir Use tcx.hir() utils for spans in MIR building. 2022-09-13 19:18:23 +02:00
graphviz.main.mir_map.0.dot Updates to experimental coverage counter injection 2020-10-05 08:02:58 -07:00
graphviz.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
if-condition-int.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.opt_char.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.opt_i8.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.opt_negative.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
if_condition_int.opt_u32.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
instrument_coverage.bar.InstrumentCoverage.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
instrument_coverage.main.InstrumentCoverage.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
instrument_coverage.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
issue-38669.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue-41110.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue-41697.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue-41888.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue-49232.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue-62289.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue-72181-1.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue-72181.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue-73223.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue-78192.rs Run reveal_all on MIR more often. 2021-11-06 15:56:29 +01:00
issue-91633.rs pass when where clause found 2022-08-17 12:25:52 +03:00
issue-99325.rs Allow try_to_raw_bytes on u8 array 2022-07-26 07:05:31 +00:00
issue-101867.rs add miri test via const fn 2022-09-18 12:18:34 +08:00
issue_38669.main.SimplifyCfg-initial.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_41110.main.ElaborateDrops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_41110.test.ElaborateDrops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue_41888.main.ElaborateDrops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_49232.main.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_62289.test.ElaborateDrops.before.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_72181.bar.mir_map.0.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue_72181.foo.mir_map.0.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue_72181.main.mir_map.0.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
issue_72181_1.f.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_72181_1.main.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_73223.main.SimplifyArmIdentity.diff address review again 2022-09-14 17:30:25 +02:00
issue_76432.rs Fix #76432 2020-09-13 10:47:20 +02:00
issue_76432.test.SimplifyComparisonIntegral.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_78192.f.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
issue_91633.bar.mir_map.0.mir pass when where clause found 2022-08-17 12:25:52 +03:00
issue_91633.foo.mir_map.0.mir pass when where clause found 2022-08-17 12:25:52 +03:00
issue_91633.fun.mir_map.0.mir pass when where clause found 2022-08-17 12:25:52 +03:00
issue_91633.hey.mir_map.0.mir pass when where clause found 2022-08-17 12:25:52 +03:00
issue_99325.main.mir_map.0.mir rebase 2022-09-13 17:48:05 +02:00
issue_101867.main.mir_map.0.mir add mir-opt test 2022-09-18 12:10:56 +08:00
loop_test.main.SimplifyCfg-promote-consts.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
loop_test.rs mir building: fix some comments 2020-08-18 13:14:38 +02:00
lower_array_len.array_bound.NormalizeArrayLen.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
lower_array_len.array_bound_mut.NormalizeArrayLen.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
lower_array_len.array_len.NormalizeArrayLen.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
lower_array_len.array_len_by_value.NormalizeArrayLen.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
lower_array_len.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_array_len_e2e.array_bound.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_array_len_e2e.array_bound_mut.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_array_len_e2e.array_len.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_array_len_e2e.array_len_by_value.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_array_len_e2e.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics.align_of.LowerIntrinsics.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics.assume.LowerIntrinsics.diff Test bump 2022-09-06 14:59:46 +00:00
lower_intrinsics.discriminant.LowerIntrinsics.diff rebase 2022-09-13 17:48:05 +02:00
lower_intrinsics.f_copy_nonoverlapping.LowerIntrinsics.diff Test bump 2022-09-06 14:59:46 +00:00
lower_intrinsics.forget.LowerIntrinsics.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics.non_const.LowerIntrinsics.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics.rs Lower the assume intrinsic to a MIR statement 2022-09-06 14:18:32 +00:00
lower_intrinsics.size_of.LowerIntrinsics.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics.unreachable.LowerIntrinsics.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics.wrapping.LowerIntrinsics.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics_e2e.f_u64.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics_e2e.f_unit.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_intrinsics_e2e.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
lower_slice_len.bound.LowerSliceLenCalls.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
lower_slice_len.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
match-arm-scopes.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
match_false_edges.full_tested_match.PromoteTemps.after.mir rebase 2022-09-13 17:48:05 +02:00
match_false_edges.full_tested_match2.PromoteTemps.before.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
match_false_edges.main.PromoteTemps.before.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
match_false_edges.rs Fully stabilize NLL 2022-06-03 17:16:41 -04:00
match_test.main.SimplifyCfg-initial.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
match_test.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
matches_reduce_branches.bar.MatchBranchSimplification.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
matches_reduce_branches.foo.MatchBranchSimplification.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
matches_reduce_branches.match_nested_if.MatchBranchSimplification.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
matches_reduce_branches.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
matches_u8.exhaustive_match.MatchBranchSimplification.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
matches_u8.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
multiple_return_terminators.rs Bump mir-opt-level from 3 to 4 in tests 2021-03-05 17:13:57 -03:00
multiple_return_terminators.test.MultipleReturnTerminators.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
no-drop-for-inactive-variant.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
no-spurious-drop-after-call.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
no_spurious_drop_after_call.main.ElaborateDrops.before.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
not_equal_false.opt.InstCombine.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
not_equal_false.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
nrvo-simple.rs Switch some tests over to new MIR opt unit tests 2022-04-16 18:23:59 -04:00
nrvo_simple.nrvo.RenameReturnPlace.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
packed-struct-drop-aligned.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
README.md Mention unit-test in MIR opt test README 2022-08-09 09:58:46 -07:00
receiver-ptr-mutability.rs Allow calling *const methods on *mut values 2021-03-09 13:40:08 +03:00
receiver_ptr_mutability.main.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
remove-never-const.rs Stabilize const_panic 2021-10-04 02:33:33 -04:00
remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
remove_fake_borrows.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
remove_never_const.no_codegen.PreCodegen.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
remove_storage_markers.main.RemoveStorageMarkers.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
remove_storage_markers.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
remove_unneeded_drops.opt.RemoveUnneededDrops.diff Avoid invalidating the CFG in MirPatch. 2022-08-02 18:57:54 -07:00
remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff Avoid invalidating the CFG in MirPatch. 2022-08-02 18:57:54 -07:00
remove_unneeded_drops.rs Ignore test on wasm as it does not unwind 2020-09-23 18:25:55 +02:00
remove_zsts_dont_touch_unions.get_union.RemoveZsts.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
remove_zsts_dont_touch_unions.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
retag.array_casts.SimplifyCfg-elaborate-drops.after.mir bless tests 2022-09-13 17:47:33 +02:00
retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
retag.main-{closure#0}.SimplifyCfg-elaborate-drops.after.mir Prefer explict closure sig types over expected ones 2022-09-14 10:44:56 +00:00
retag.main.SimplifyCfg-elaborate-drops.after.mir rebase 2022-09-13 17:48:05 +02:00
retag.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.mir Use the declaration's SourceInfo for FnEntry retags, not the outermost 2022-08-28 11:40:10 -04:00
retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.mir Use the declaration's SourceInfo for FnEntry retags, not the outermost 2022-08-28 11:40:10 -04:00
return_an_array.rs Remove licenses 2018-12-25 21:08:33 -07:00
rustc.try_identity.DestinationPropagation.diff simplify_try: clean up test 2020-09-18 21:23:00 +02:00
separate_const_switch.identity.SeparateConstSwitch.diff Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
separate_const_switch.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
separate_const_switch.too_complex.SeparateConstSwitch.diff bless mir-opt tests 2022-08-21 21:21:46 +02:00
simple-match.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
simple_match.match_bool.mir_map.0.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
simplify-arm-identity.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
simplify-arm.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
simplify-locals-fixedpoint.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
simplify-locals-removes-unused-consts.rs Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
simplify-locals-removes-unused-discriminant-reads.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
simplify-locals.rs Remove even more box syntax uses from src/test 2022-08-07 04:22:20 +02:00
simplify_arm.id_try.SimplifyArmIdentity.diff bless mir-opt tests 2022-08-22 15:19:40 +02:00
simplify_arm.id_try.SimplifyBranchSame.diff bless mir-opt tests 2022-08-22 15:19:40 +02:00
simplify_cfg.main.SimplifyCfg-early-opt.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_cfg.main.SimplifyCfg-initial.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_cfg.rs Make simplify_cfg test more consistent 2021-08-03 07:06:19 -07:00
simplify_if.main.SimplifyConstCondition-after-const-prop.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_if.rs Update MIR opt tests with new name 2021-11-30 18:54:37 -08:00
simplify_locals.c.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.d1.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.d2.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.expose_addr.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.r.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.t1.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.t2.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.t3.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals.t4.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals_fixedpoint.foo.SimplifyLocals.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_locals_removes_unused_consts.main.SimplifyLocals.diff Add more // unit-tests to MIR opt tests 2022-08-09 17:32:50 -07:00
simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
simplify_match.main.ConstProp.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
simplify_match.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
simplify_try.try_identity.DestinationPropagation.diff Auto merge of #99762 - Nilstrieb:unreachable-prop, r=oli-obk 2022-08-22 20:28:16 +00:00
simplify_try.try_identity.SimplifyArmIdentity.diff Auto merge of #99762 - Nilstrieb:unreachable-prop, r=oli-obk 2022-08-22 20:28:16 +00:00
simplify_try.try_identity.SimplifyBranchSame.after.mir Auto merge of #99762 - Nilstrieb:unreachable-prop, r=oli-obk 2022-08-22 20:28:16 +00:00
simplify_try.try_identity.SimplifyLocals.after.mir Auto merge of #99762 - Nilstrieb:unreachable-prop, r=oli-obk 2022-08-22 20:28:16 +00:00
simplify_try_if_let.rs Ignore now-broken mir-opt test 2020-10-02 16:50:45 +02:00
simplify_try_if_let.{impl#0}-append.SimplifyArmIdentity.diff Move from {{closure}}#0 syntax to {closure#0} for (def) path components 2020-09-25 22:46:14 +01:00
slice-drop-shim.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
spanview-block.rs Add new -Z dump-mir-spanview option 2020-08-31 22:57:55 -07:00
spanview-statement.rs Add new -Z dump-mir-spanview option 2020-08-31 22:57:55 -07:00
spanview-terminator.rs Add new -Z dump-mir-spanview option 2020-08-31 22:57:55 -07:00
spanview_block.main.mir_map.0.html Updates to experimental coverage counter injection 2020-10-05 08:02:58 -07:00
spanview_statement.main.mir_map.0.html Updates to experimental coverage counter injection 2020-10-05 08:02:58 -07:00
spanview_terminator.main.mir_map.0.html Updates to experimental coverage counter injection 2020-10-05 08:02:58 -07:00
storage_live_dead_in_statics.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
storage_live_dead_in_statics.XXX.mir_map.0.mir Use tcx.hir() utils for spans in MIR building. 2022-09-13 19:18:23 +02:00
storage_ranges.main.nll.0.mir Remove ReEmpty 2022-09-08 20:55:55 -04:00
storage_ranges.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
tls-access.rs Fix TLS access mir opt test and remove stale files 2022-05-30 16:29:36 -07:00
tls_access.main.PreCodegen.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
try_identity_e2e.new.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
try_identity_e2e.old.PreCodegen.after.mir Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
try_identity_e2e.rs Simplify MIR opt tests 2022-09-01 23:01:53 -07:00
uniform_array_move_out.move_out_by_subslice.mir_map.0.mir Shrink span for bindings with subpatterns. 2022-09-06 20:57:44 +02:00
uniform_array_move_out.move_out_from_end.mir_map.0.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
uniform_array_move_out.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
uninhabited-enum.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
uninhabited_enum.process_never.SimplifyLocals.after.mir bless mir-opt tests 2022-08-21 21:21:46 +02:00
uninhabited_enum.process_void.SimplifyLocals.after.mir bless mir opt tests 2022-07-28 14:24:44 +02:00
uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir bless mir-opt tests 2022-08-21 21:21:46 +02:00
uninhabited_enum_branching.main.UninhabitedEnumBranching.diff bless mir-opt tests 2022-08-21 21:21:46 +02:00
uninhabited_enum_branching.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir bless mir-opt tests 2022-08-21 21:21:46 +02:00
uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff bless mir-opt tests 2022-08-21 21:21:46 +02:00
uninhabited_enum_branching2.rs Test for unihnabitded_enum_branching pass using reference to fields 2021-05-23 15:42:09 +02:00
uninhabited_fallthrough_elimination.eliminate_fallthrough.UninhabitedEnumBranching.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
uninhabited_fallthrough_elimination.keep_fallthrough.UninhabitedEnumBranching.diff bless mir opt tests 2022-07-28 14:24:44 +02:00
uninhabited_fallthrough_elimination.rs Add test checking that fallthrough branches are correctly identified as dead 2022-02-18 09:33:52 -05:00
unreachable.main.UnreachablePropagation.diff bless mir-opt tests 2022-08-21 21:21:46 +02:00
unreachable.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
unreachable_diverging.main.UnreachablePropagation.diff bless mir-opt tests 2022-08-21 21:21:46 +02:00
unreachable_diverging.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
unusual-item-types.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
unusual_item_types.E-V-{constant#0}.mir_map.0.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir Use tcx.hir() utils for spans in MIR building. 2022-09-13 19:18:23 +02:00
while-storage.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
while_let_loops.change_loop_body.ConstProp.diff Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
while_let_loops.change_loop_body.PreCodegen.after.mir Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
while_let_loops.rs Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH 2022-09-04 23:25:25 -07:00
while_storage.while_loop.PreCodegen.after.mir bless mir opt tests 2022-07-28 14:24:44 +02: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.

Unit testing

If you are only testing the behavior of a particular mir-opt pass on some specific input (as is usually the case), you should add

// unit-test: PassName

to the top of the file. This makes sure that other passes don't run which means you'll get the input you expected and your test won't break when other code changes.

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