From f07607f47ab40837c92035e35602731cc80baa81 Mon Sep 17 00:00:00 2001 From: Xavier Denis Date: Tue, 28 Jul 2020 15:22:21 +0200 Subject: [PATCH] Move mir-opt tests to toplevel --- Cargo.lock | 1 + fuckyou.rb | 7 -- omg.mir | 2 - src/librustc_mir/util/pretty.rs | 11 ++- ..._of_reborrow.SimplifyCfg-initial.after.mir | 0 ...row_and_cast.SimplifyCfg-initial.after.mir | 0 ...mplifyCfg-elaborate-drops.after.mir.32bit} | 0 ...mplifyCfg-elaborate-drops.after.mir.64bit} | 0 ...ignment.main.SimplifyCfg-initial.after.mir | 0 .../box_expr.main.ElaborateDrops.before.mir | 0 ...main.SimplifyCfg-elaborate-drops.after.mir | 0 ...ne_array_len.norm2.InstCombine.diff.32bit} | 0 ...ne_array_len.norm2.InstCombine.diff.64bit} | 0 ...allocation.main.ConstProp.after.mir.32bit} | 0 ...allocation.main.ConstProp.after.mir.64bit} | 0 ...llocation2.main.ConstProp.after.mir.32bit} | 0 ...llocation2.main.ConstProp.after.mir.64bit} | 0 ...llocation3.main.ConstProp.after.mir.32bit} | 0 ...llocation3.main.ConstProp.after.mir.64bit} | 0 ...static.BAR-promoted[0].ConstProp.after.mir | 0 ...motion_extern_static.BAR.PromoteTemps.diff | 0 ...static.FOO-promoted[0].ConstProp.after.mir | 0 ...motion_extern_static.FOO.PromoteTemps.diff | 0 .../aggregate.main.ConstProp.diff | 0 ... => array_index.main.ConstProp.diff.32bit} | 0 ... => array_index.main.ConstProp.diff.64bit} | 0 .../bad_op_div_by_zero.main.ConstProp.diff | 0 .../bad_op_mod_by_zero.main.ConstProp.diff | 0 ..._oob_for_slices.main.ConstProp.diff.32bit} | 0 ..._oob_for_slices.main.ConstProp.diff.64bit} | 0 .../boolean_identities.test.ConstProp.diff | 0 .../{boxes => }/boxes.main.ConstProp.diff | 0 .../{cast => }/cast.main.ConstProp.diff | 0 .../checked_add.main.ConstProp.diff | 0 ..._prop_fails_gracefully.main.ConstProp.diff | 0 ...l_flow_simplification.hello.ConstProp.diff | 0 ...simplification.hello.PreCodegen.before.mir | 0 ...=> discriminant.main.ConstProp.diff.32bit} | 0 ...=> discriminant.main.ConstProp.diff.64bit} | 0 .../indirect.main.ConstProp.diff | 0 .../issue_66971.main.ConstProp.diff | 0 .../issue_67019.main.ConstProp.diff | 0 .../mult_by_zero.test.ConstProp.diff | 0 .../mutable_variable.main.ConstProp.diff | 0 ...ble_variable_aggregate.main.ConstProp.diff | 0 ...able_aggregate_mut_ref.main.ConstProp.diff | 0 ...aggregate_partial_read.main.ConstProp.diff | 0 ...table_variable_no_prop.main.ConstProp.diff | 0 ...variable_unprop_assign.main.ConstProp.diff | 0 ...s_into_variable.main.ConstProp.diff.32bit} | 0 ...s_into_variable.main.ConstProp.diff.64bit} | 0 ...iable.main.SimplifyLocals.after.mir.32bit} | 0 ...iable.main.SimplifyLocals.after.mir.64bit} | 0 .../read_immutable_static.main.ConstProp.diff | 0 .../ref_deref.main.ConstProp.diff | 0 .../ref_deref.main.PromoteTemps.diff | 0 .../ref_deref_project.main.ConstProp.diff | 0 .../ref_deref_project.main.PromoteTemps.diff | 0 .../reify_fn_ptr.main.ConstProp.diff | 0 ....diff => repeat.main.ConstProp.diff.32bit} | 0 ....diff => repeat.main.ConstProp.diff.64bit} | 0 .../return_place.add.ConstProp.diff | 0 .../return_place.add.PreCodegen.before.mir | 0 ...ar_literal_propagation.main.ConstProp.diff | 0 ...ff => slice_len.main.ConstProp.diff.32bit} | 0 ...ff => slice_len.main.ConstProp.diff.64bit} | 0 .../switch_int.main.ConstProp.diff | 0 ...ain.SimplifyBranches-after-const-prop.diff | 0 ...le_literal_propagation.main.ConstProp.diff | 0 .../const_prop_miscompile.bar.ConstProp.diff | 0 .../const_prop_miscompile.foo.ConstProp.diff | 0 ...copy_propagation.test.CopyPropagation.diff | 0 ...opagation_arg.arg_src.CopyPropagation.diff | 0 ...y_propagation_arg.bar.CopyPropagation.diff | 0 ...y_propagation_arg.baz.CopyPropagation.diff | 0 ...y_propagation_arg.foo.CopyPropagation.diff | 0 .../deaggregator_test.bar.Deaggregator.diff | 0 ...aggregator_test_enum.bar.Deaggregator.diff | 0 ...egator_test_enum_2.test1.Deaggregator.diff | 0 ...gator_test_multiple.test.Deaggregator.diff | 0 ....match_tuple.SimplifyCfg-initial.after.mir | 0 ...Fn-call.AddMovesForPackedDrops.before.mir} | 0 ...anup.main-{{closure}}.generator_drop.0.mir | 0 ...main-{{closure}}.StateTransform.before.mir | 0 ...ny.main-{{closure}}.generator_resume.0.mir | 0 .../graphviz.main.mir_map.0.dot | 0 .../inline_any_operand.bar.Inline.after.mir | 0 .../inline_closure.foo.Inline.after.mir | 0 ...e_closure_borrows_arg.foo.Inline.after.mir | 0 ...line_closure_captures.foo.Inline.after.mir | 0 ...ine_into_box_place.main.Inline.diff.32bit} | 0 ...ine_into_box_place.main.Inline.diff.64bit} | 0 .../inline_retag.bar.Inline.after.mir | 0 .../inline_specialization.main.Inline.diff | 0 .../inline_trait_method.test.Inline.after.mir | 0 ...line_trait_method_2.test2.Inline.after.mir | 0 ...67_inline_as_ref_as_mut.a.Inline.after.mir | 0 ...67_inline_as_ref_as_mut.b.Inline.after.mir | 0 ...67_inline_as_ref_as_mut.c.Inline.after.mir | 0 ...67_inline_as_ref_as_mut.d.Inline.after.mir | 0 ...ment_coverage.bar.InstrumentCoverage.diff} | 10 +- ...ent_coverage.main.InstrumentCoverage.diff} | 10 +- .../issue-72181/rustc.bar.mir_map.0.mir | 25 ----- .../issue-72181/rustc.foo.mir_map.0.mir | 37 -------- .../issue-72181/rustc.main.mir_map.0.mir | 93 ------------------- ...e_38669.main.SimplifyCfg-initial.after.mir | 0 .../issue_41110.main.ElaborateDrops.after.mir | 0 .../issue_41110.test.ElaborateDrops.after.mir | 0 ...implifyCfg-qualify-consts.after.mir.32bit} | 0 ...implifyCfg-qualify-consts.after.mir.64bit} | 0 .../issue_41888.main.ElaborateDrops.after.mir | 0 .../issue_49232.main.mir_map.0.mir | 0 ...issue_62289.test.ElaborateDrops.before.mir | 0 ...ir => issue_72181.bar.mir_map.0.mir.32bit} | 0 ...ir => issue_72181.bar.mir_map.0.mir.64bit} | 0 ...ir => issue_72181.foo.mir_map.0.mir.32bit} | 0 ...ir => issue_72181.foo.mir_map.0.mir.64bit} | 0 ...r => issue_72181.main.mir_map.0.mir.32bit} | 0 ...r => issue_72181.main.mir_map.0.mir.64bit} | 0 .../issue_72181_1.f.mir_map.0.mir | 0 .../issue_72181_1.main.mir_map.0.mir | 0 ...=> issue_73223.main.PreCodegen.diff.32bit} | 0 ...=> issue_73223.main.PreCodegen.diff.64bit} | 0 ...73223.main.SimplifyArmIdentity.diff.32bit} | 0 ...73223.main.SimplifyArmIdentity.diff.64bit} | 0 ....main.SimplifyCfg-qualify-consts.after.mir | 0 ...fg-initial.after-ElaborateDrops.after.diff | 0 ...s.full_tested_match.PromoteTemps.after.mir | 0 ...full_tested_match2.PromoteTemps.before.mir | 0 ...h_false_edges.main.PromoteTemps.before.mir | 0 ...ch_test.main.SimplifyCfg-initial.after.mir | 0 .../named_lifetimes_basic.use_x.nll.0.mir | 0 ...gion_subtyping_basic.main.nll.0.mir.32bit} | 0 ...gion_subtyping_basic.main.nll.0.mir.64bit} | 0 ...wrap.SimplifyCfg-elaborate-drops.after.mir | 0 ..._after_call.main.ElaborateDrops.before.mir | 0 .../nrvo_simple.nrvo.RenameReturnPlace.diff | 0 ...mplifyCfg-elaborate-drops.after.mir.32bit} | 0 ...mplifyCfg-elaborate-drops.after.mir.64bit} | 0 ...tch_guard.CleanupNonCodegenStatements.diff | 0 ...ever_const.no_codegen.PreCodegen.after.mir | 0 ...lace.Test.SimplifyCfg-make_shim.after.mir} | 0 ...re}}.SimplifyCfg-elaborate-drops.after.mir | 0 ...main.SimplifyCfg-elaborate-drops.after.mir | 0 ...-foo.SimplifyCfg-elaborate-drops.after.mir | 0 ..._shr.SimplifyCfg-elaborate-drops.after.mir | 0 ...mple_match.match_bool.mir_map.0.mir.32bit} | 0 ...mple_match.match_bool.mir_map.0.mir.64bit} | 0 .../rustc.main.SimplifyArmIdentity.diff | 70 -------------- .../simplify_arm.id.SimplifyArmIdentity.diff | 0 .../simplify_arm.id.SimplifyBranchSame.diff | 0 ...ify_arm.id_result.SimplifyArmIdentity.diff | 0 ...lify_arm.id_result.SimplifyBranchSame.diff | 0 ...mplify_arm.id_try.SimplifyArmIdentity.diff | 0 ...implify_arm.id_try.SimplifyBranchSame.diff | 0 ...ntity.main.SimplifyArmIdentity.diff.32bit} | 0 ...ntity.main.SimplifyArmIdentity.diff.64bit} | 0 ...mplify_cfg.main.SimplifyCfg-early-opt.diff | 0 ...simplify_cfg.main.SimplifyCfg-initial.diff | 0 ...ain.SimplifyBranches-after-const-prop.diff | 0 ..._locals_fixedpoint.foo.SimplifyLocals.diff | 0 ...ves_unused_consts.main.SimplifyLocals.diff | 0 ...inant_reads.map.SimplifyLocals.diff.32bit} | 0 ...inant_reads.map.SimplifyLocals.diff.64bit} | 0 .../simplify_match.main.ConstProp.diff | 0 ..._try.try_identity.SimplifyArmIdentity.diff | 0 ....try_identity.SimplifyBranchSame.after.mir | 0 ..._try.try_identity.SimplifyLocals.after.mir | 0 ...t.{{impl}}-append.SimplifyArmIdentity.diff | 0 ...].AddMovesForPackedDrops.before.mir.32bit} | 0 ...].AddMovesForPackedDrops.before.mir.64bit} | 0 ...age_live_dead_in_statics.XXX.mir_map.0.mir | 0 .../storage_ranges.main.nll.0.mir | 0 ...ls_access.main.SimplifyCfg-final.after.mir | 0 ...ove_out.move_out_by_subslice.mir_map.0.mir | 0 ...y_move_out.move_out_from_end.mir_map.0.mir | 0 ...num.process_never.SimplifyLocals.after.mir | 0 ...enum.process_void.SimplifyLocals.after.mir | 0 ...after-uninhabited-enum-branching.after.mir | 0 ...anching.main.UninhabitedEnumBranching.diff | 0 ...reachable.main.UnreachablePropagation.diff | 0 ...hable_asm.main.UnreachablePropagation.diff | 0 ...ble_asm_2.main.UnreachablePropagation.diff | 0 ...diverging.main.UnreachablePropagation.diff | 0 ...ypes.E-V-{{constant}}.mir_map.0.mir.32bit} | 0 ...ypes.E-V-{{constant}}.mir_map.0.mir.64bit} | 0 ...est-X-{{constructor}}.mir_map.0.mir.32bit} | 0 ...est-X-{{constructor}}.mir_map.0.mir.64bit} | 0 ..._.AddMovesForPackedDrops.before.mir.32bit} | 0 ..._.AddMovesForPackedDrops.before.mir.64bit} | 0 ...}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit} | 0 ...}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit} | 0 ...le_storage.while_loop.PreCodegen.after.mir | 0 src/tools/compiletest/Cargo.toml | 1 + src/tools/compiletest/src/runtest.rs | 76 +++++++++------ 195 files changed, 68 insertions(+), 275 deletions(-) delete mode 100644 fuckyou.rb delete mode 100644 omg.mir rename src/test/mir-opt/{address-of => }/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir (100%) rename src/test/mir-opt/{address-of => }/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir (100%) rename src/test/mir-opt/{array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir => array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit} (100%) rename src/test/mir-opt/{array-index-is-temporary/64bit/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir => array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit} (100%) rename src/test/mir-opt/{basic_assignment => }/basic_assignment.main.SimplifyCfg-initial.after.mir (100%) rename src/test/mir-opt/{box_expr => }/box_expr.main.ElaborateDrops.before.mir (100%) rename src/test/mir-opt/{byte_slice => }/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir (100%) rename src/test/mir-opt/{combine_array_len/32bit/rustc.norm2.InstCombine.diff => combine_array_len.norm2.InstCombine.diff.32bit} (100%) rename src/test/mir-opt/{combine_array_len/64bit/combine_array_len.norm2.InstCombine.diff => combine_array_len.norm2.InstCombine.diff.64bit} (100%) rename src/test/mir-opt/{const_allocation/32bit/rustc.main.ConstProp.after.mir => const_allocation.main.ConstProp.after.mir.32bit} (100%) rename src/test/mir-opt/{const_allocation/64bit/const_allocation.main.ConstProp.after.mir => const_allocation.main.ConstProp.after.mir.64bit} (100%) rename src/test/mir-opt/{const_allocation2/32bit/rustc.main.ConstProp.after.mir => const_allocation2.main.ConstProp.after.mir.32bit} (100%) rename src/test/mir-opt/{const_allocation2/64bit/const_allocation2.main.ConstProp.after.mir => const_allocation2.main.ConstProp.after.mir.64bit} (100%) rename src/test/mir-opt/{const_allocation3/32bit/rustc.main.ConstProp.after.mir => const_allocation3.main.ConstProp.after.mir.32bit} (100%) rename src/test/mir-opt/{const_allocation3/64bit/const_allocation3.main.ConstProp.after.mir => const_allocation3.main.ConstProp.after.mir.64bit} (100%) rename src/test/mir-opt/{const-promotion-extern-static => }/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir (100%) rename src/test/mir-opt/{const-promotion-extern-static => }/const_promotion_extern_static.BAR.PromoteTemps.diff (100%) rename src/test/mir-opt/{const-promotion-extern-static => }/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir (100%) rename src/test/mir-opt/{const-promotion-extern-static => }/const_promotion_extern_static.FOO.PromoteTemps.diff (100%) rename src/test/mir-opt/const_prop/{aggregate => }/aggregate.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{array_index/32bit/rustc.main.ConstProp.diff => array_index.main.ConstProp.diff.32bit} (100%) rename src/test/mir-opt/const_prop/{array_index/64bit/array_index.main.ConstProp.diff => array_index.main.ConstProp.diff.64bit} (100%) rename src/test/mir-opt/const_prop/{bad_op_div_by_zero => }/bad_op_div_by_zero.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{bad_op_mod_by_zero => }/bad_op_mod_by_zero.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{bad_op_unsafe_oob_for_slices/32bit/rustc.main.ConstProp.diff => bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit} (100%) rename src/test/mir-opt/const_prop/{bad_op_unsafe_oob_for_slices/64bit/bad_op_unsafe_oob_for_slices.main.ConstProp.diff => bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit} (100%) rename src/test/mir-opt/const_prop/{boolean_identities => }/boolean_identities.test.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{boxes => }/boxes.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{cast => }/cast.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{checked_add => }/checked_add.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{const_prop_fails_gracefully => }/const_prop_fails_gracefully.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{control-flow-simplification => }/control_flow_simplification.hello.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{control-flow-simplification => }/control_flow_simplification.hello.PreCodegen.before.mir (100%) rename src/test/mir-opt/const_prop/{discriminant/32bit/rustc.main.ConstProp.diff => discriminant.main.ConstProp.diff.32bit} (100%) rename src/test/mir-opt/const_prop/{discriminant/64bit/discriminant.main.ConstProp.diff => discriminant.main.ConstProp.diff.64bit} (100%) rename src/test/mir-opt/const_prop/{indirect => }/indirect.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{issue-66971 => }/issue_66971.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{issue-67019 => }/issue_67019.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mult_by_zero => }/mult_by_zero.test.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mutable_variable => }/mutable_variable.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mutable_variable_aggregate => }/mutable_variable_aggregate.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mutable_variable_aggregate_mut_ref => }/mutable_variable_aggregate_mut_ref.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mutable_variable_aggregate_partial_read => }/mutable_variable_aggregate_partial_read.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mutable_variable_no_prop => }/mutable_variable_no_prop.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{mutable_variable_unprop_assign => }/mutable_variable_unprop_assign.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{optimizes_into_variable/32bit/rustc.main.ConstProp.diff => optimizes_into_variable.main.ConstProp.diff.32bit} (100%) rename src/test/mir-opt/const_prop/{optimizes_into_variable/64bit/optimizes_into_variable.main.ConstProp.diff => optimizes_into_variable.main.ConstProp.diff.64bit} (100%) rename src/test/mir-opt/const_prop/{optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir => optimizes_into_variable.main.SimplifyLocals.after.mir.32bit} (100%) rename src/test/mir-opt/const_prop/{optimizes_into_variable/64bit/optimizes_into_variable.main.SimplifyLocals.after.mir => optimizes_into_variable.main.SimplifyLocals.after.mir.64bit} (100%) rename src/test/mir-opt/const_prop/{read_immutable_static => }/read_immutable_static.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{ref_deref => }/ref_deref.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{ref_deref => }/ref_deref.main.PromoteTemps.diff (100%) rename src/test/mir-opt/const_prop/{ref_deref_project => }/ref_deref_project.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{ref_deref_project => }/ref_deref_project.main.PromoteTemps.diff (100%) rename src/test/mir-opt/const_prop/{reify_fn_ptr => }/reify_fn_ptr.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{repeat/32bit/rustc.main.ConstProp.diff => repeat.main.ConstProp.diff.32bit} (100%) rename src/test/mir-opt/const_prop/{repeat/64bit/repeat.main.ConstProp.diff => repeat.main.ConstProp.diff.64bit} (100%) rename src/test/mir-opt/const_prop/{return_place => }/return_place.add.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{return_place => }/return_place.add.PreCodegen.before.mir (100%) rename src/test/mir-opt/const_prop/{scalar_literal_propagation => }/scalar_literal_propagation.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{slice_len/32bit/rustc.main.ConstProp.diff => slice_len.main.ConstProp.diff.32bit} (100%) rename src/test/mir-opt/const_prop/{slice_len/64bit/slice_len.main.ConstProp.diff => slice_len.main.ConstProp.diff.64bit} (100%) rename src/test/mir-opt/const_prop/{switch_int => }/switch_int.main.ConstProp.diff (100%) rename src/test/mir-opt/const_prop/{switch_int => }/switch_int.main.SimplifyBranches-after-const-prop.diff (100%) rename src/test/mir-opt/const_prop/{tuple_literal_propagation => }/tuple_literal_propagation.main.ConstProp.diff (100%) rename src/test/mir-opt/{const_prop_miscompile => }/const_prop_miscompile.bar.ConstProp.diff (100%) rename src/test/mir-opt/{const_prop_miscompile => }/const_prop_miscompile.foo.ConstProp.diff (100%) rename src/test/mir-opt/{copy_propagation => }/copy_propagation.test.CopyPropagation.diff (100%) rename src/test/mir-opt/{copy_propagation_arg => }/copy_propagation_arg.arg_src.CopyPropagation.diff (100%) rename src/test/mir-opt/{copy_propagation_arg => }/copy_propagation_arg.bar.CopyPropagation.diff (100%) rename src/test/mir-opt/{copy_propagation_arg => }/copy_propagation_arg.baz.CopyPropagation.diff (100%) rename src/test/mir-opt/{copy_propagation_arg => }/copy_propagation_arg.foo.CopyPropagation.diff (100%) rename src/test/mir-opt/{deaggregator_test => }/deaggregator_test.bar.Deaggregator.diff (100%) rename src/test/mir-opt/{deaggregator_test_enum => }/deaggregator_test_enum.bar.Deaggregator.diff (100%) rename src/test/mir-opt/{deaggregator_test_enum_2 => }/deaggregator_test_enum_2.test1.Deaggregator.diff (100%) rename src/test/mir-opt/{deaggregator_test_multiple => }/deaggregator_test_multiple.test.Deaggregator.diff (100%) rename src/test/mir-opt/{exponential-or => }/exponential_or.match_tuple.SimplifyCfg-initial.after.mir (100%) rename src/test/mir-opt/{fn-ptr-shim/core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir => fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir} (100%) rename src/test/mir-opt/{generator-drop-cleanup => }/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir (100%) rename src/test/mir-opt/{generator-storage-dead-unwind => }/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir (100%) rename src/test/mir-opt/{generator-tiny => }/generator_tiny.main-{{closure}}.generator_resume.0.mir (100%) rename src/test/mir-opt/{graphviz => }/graphviz.main.mir_map.0.dot (100%) rename src/test/mir-opt/inline/{inline-any-operand => }/inline_any_operand.bar.Inline.after.mir (100%) rename src/test/mir-opt/inline/{inline-closure => }/inline_closure.foo.Inline.after.mir (100%) rename src/test/mir-opt/inline/{inline-closure-borrows-arg => }/inline_closure_borrows_arg.foo.Inline.after.mir (100%) rename src/test/mir-opt/inline/{inline-closure-captures => }/inline_closure_captures.foo.Inline.after.mir (100%) rename src/test/mir-opt/inline/{inline-into-box-place/32bit/rustc.main.Inline.diff => inline_into_box_place.main.Inline.diff.32bit} (100%) rename src/test/mir-opt/inline/{inline-into-box-place/64bit/inline_into_box_place.main.Inline.diff => inline_into_box_place.main.Inline.diff.64bit} (100%) rename src/test/mir-opt/inline/{inline-retag => }/inline_retag.bar.Inline.after.mir (100%) rename src/test/mir-opt/inline/{inline-specialization => }/inline_specialization.main.Inline.diff (100%) rename src/test/mir-opt/inline/{inline-trait-method => }/inline_trait_method.test.Inline.after.mir (100%) rename src/test/mir-opt/inline/{inline-trait-method_2 => }/inline_trait_method_2.test2.Inline.after.mir (100%) rename src/test/mir-opt/inline/{issue-58867-inline-as-ref-as-mut => }/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir (100%) rename src/test/mir-opt/inline/{issue-58867-inline-as-ref-as-mut => }/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir (100%) rename src/test/mir-opt/inline/{issue-58867-inline-as-ref-as-mut => }/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir (100%) rename src/test/mir-opt/inline/{issue-58867-inline-as-ref-as-mut => }/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir (100%) rename src/test/mir-opt/{instrument_coverage/rustc.bar.InstrumentCoverage.diff => instrument_coverage.bar.InstrumentCoverage.diff} (95%) rename src/test/mir-opt/{instrument_coverage/rustc.main.InstrumentCoverage.diff => instrument_coverage.main.InstrumentCoverage.diff} (97%) delete mode 100644 src/test/mir-opt/issue-72181/rustc.bar.mir_map.0.mir delete mode 100644 src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir delete mode 100644 src/test/mir-opt/issue-72181/rustc.main.mir_map.0.mir rename src/test/mir-opt/{issue-38669 => }/issue_38669.main.SimplifyCfg-initial.after.mir (100%) rename src/test/mir-opt/{issue-41110 => }/issue_41110.main.ElaborateDrops.after.mir (100%) rename src/test/mir-opt/{issue-41110 => }/issue_41110.test.ElaborateDrops.after.mir (100%) rename src/test/mir-opt/{issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir => issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit} (100%) rename src/test/mir-opt/{issue-41697/64bit/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir => issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit} (100%) rename src/test/mir-opt/{issue-41888 => }/issue_41888.main.ElaborateDrops.after.mir (100%) rename src/test/mir-opt/{issue-49232 => }/issue_49232.main.mir_map.0.mir (100%) rename src/test/mir-opt/{issue-62289 => }/issue_62289.test.ElaborateDrops.before.mir (100%) rename src/test/mir-opt/{issue-72181/32bit/rustc.bar.mir_map.0.mir => issue_72181.bar.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{issue-72181/64bit/issue_72181.bar.mir_map.0.mir => issue_72181.bar.mir_map.0.mir.64bit} (100%) rename src/test/mir-opt/{issue-72181/32bit/rustc.foo.mir_map.0.mir => issue_72181.foo.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{issue-72181/64bit/issue_72181.foo.mir_map.0.mir => issue_72181.foo.mir_map.0.mir.64bit} (100%) rename src/test/mir-opt/{issue-72181/32bit/rustc.main.mir_map.0.mir => issue_72181.main.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{issue-72181/64bit/issue_72181.main.mir_map.0.mir => issue_72181.main.mir_map.0.mir.64bit} (100%) rename src/test/mir-opt/{issue-72181-1 => }/issue_72181_1.f.mir_map.0.mir (100%) rename src/test/mir-opt/{issue-72181-1 => }/issue_72181_1.main.mir_map.0.mir (100%) rename src/test/mir-opt/{issue-73223/32bit/rustc.main.PreCodegen.diff => issue_73223.main.PreCodegen.diff.32bit} (100%) rename src/test/mir-opt/{issue-73223/64bit/issue_73223.main.PreCodegen.diff => issue_73223.main.PreCodegen.diff.64bit} (100%) rename src/test/mir-opt/{issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff => issue_73223.main.SimplifyArmIdentity.diff.32bit} (100%) rename src/test/mir-opt/{issue-73223/64bit/issue_73223.main.SimplifyArmIdentity.diff => issue_73223.main.SimplifyArmIdentity.diff.64bit} (100%) rename src/test/mir-opt/{loop_test => }/loop_test.main.SimplifyCfg-qualify-consts.after.mir (100%) rename src/test/mir-opt/{match-arm-scopes => }/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff (100%) rename src/test/mir-opt/{match_false_edges => }/match_false_edges.full_tested_match.PromoteTemps.after.mir (100%) rename src/test/mir-opt/{match_false_edges => }/match_false_edges.full_tested_match2.PromoteTemps.before.mir (100%) rename src/test/mir-opt/{match_false_edges => }/match_false_edges.main.PromoteTemps.before.mir (100%) rename src/test/mir-opt/{match_test => }/match_test.main.SimplifyCfg-initial.after.mir (100%) rename src/test/mir-opt/nll/{named-lifetimes-basic => }/named_lifetimes_basic.use_x.nll.0.mir (100%) rename src/test/mir-opt/nll/{region-subtyping-basic/32bit/rustc.main.nll.0.mir => region_subtyping_basic.main.nll.0.mir.32bit} (100%) rename src/test/mir-opt/nll/{region-subtyping-basic/64bit/region_subtyping_basic.main.nll.0.mir => region_subtyping_basic.main.nll.0.mir.64bit} (100%) rename src/test/mir-opt/{no-drop-for-inactive-variant => }/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir (100%) rename src/test/mir-opt/{no-spurious-drop-after-call => }/no_spurious_drop_after_call.main.ElaborateDrops.before.mir (100%) rename src/test/mir-opt/{nrvo-simple => }/nrvo_simple.nrvo.RenameReturnPlace.diff (100%) rename src/test/mir-opt/{packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir => packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit} (100%) rename src/test/mir-opt/{packed-struct-drop-aligned/64bit/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir => packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit} (100%) rename src/test/mir-opt/{remove_fake_borrows => }/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff (100%) rename src/test/mir-opt/{remove-never-const => }/remove_never_const.no_codegen.PreCodegen.after.mir (100%) rename src/test/mir-opt/{retag/core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir => retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir} (100%) rename src/test/mir-opt/{retag => }/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir (100%) rename src/test/mir-opt/{retag => }/retag.main.SimplifyCfg-elaborate-drops.after.mir (100%) rename src/test/mir-opt/{retag => }/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir (100%) rename src/test/mir-opt/{retag => }/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir (100%) rename src/test/mir-opt/{simple-match/32bit/rustc.match_bool.mir_map.0.mir => simple_match.match_bool.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{simple-match/64bit/simple_match.match_bool.mir_map.0.mir => simple_match.match_bool.mir_map.0.mir.64bit} (100%) delete mode 100644 src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff rename src/test/mir-opt/{simplify-arm => }/simplify_arm.id.SimplifyArmIdentity.diff (100%) rename src/test/mir-opt/{simplify-arm => }/simplify_arm.id.SimplifyBranchSame.diff (100%) rename src/test/mir-opt/{simplify-arm => }/simplify_arm.id_result.SimplifyArmIdentity.diff (100%) rename src/test/mir-opt/{simplify-arm => }/simplify_arm.id_result.SimplifyBranchSame.diff (100%) rename src/test/mir-opt/{simplify-arm => }/simplify_arm.id_try.SimplifyArmIdentity.diff (100%) rename src/test/mir-opt/{simplify-arm => }/simplify_arm.id_try.SimplifyBranchSame.diff (100%) rename src/test/mir-opt/{simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff => simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit} (100%) rename src/test/mir-opt/{simplify-arm-identity/64bit/simplify_arm_identity.main.SimplifyArmIdentity.diff => simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit} (100%) rename src/test/mir-opt/{simplify_cfg => }/simplify_cfg.main.SimplifyCfg-early-opt.diff (100%) rename src/test/mir-opt/{simplify_cfg => }/simplify_cfg.main.SimplifyCfg-initial.diff (100%) rename src/test/mir-opt/{simplify_if => }/simplify_if.main.SimplifyBranches-after-const-prop.diff (100%) rename src/test/mir-opt/{simplify-locals-fixedpoint => }/simplify_locals_fixedpoint.foo.SimplifyLocals.diff (100%) rename src/test/mir-opt/{simplify-locals-removes-unused-consts => }/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff (100%) rename src/test/mir-opt/{simplify-locals-removes-unused-discriminant-reads/32bit/rustc.map.SimplifyLocals.diff => simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit} (100%) rename src/test/mir-opt/{simplify-locals-removes-unused-discriminant-reads/64bit/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff => simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit} (100%) rename src/test/mir-opt/{simplify_match => }/simplify_match.main.ConstProp.diff (100%) rename src/test/mir-opt/{simplify_try => }/simplify_try.try_identity.SimplifyArmIdentity.diff (100%) rename src/test/mir-opt/{simplify_try => }/simplify_try.try_identity.SimplifyBranchSame.after.mir (100%) rename src/test/mir-opt/{simplify_try => }/simplify_try.try_identity.SimplifyLocals.after.mir (100%) rename src/test/mir-opt/{simplify_try_if_let => }/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff (100%) rename src/test/mir-opt/{slice-drop-shim/32bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir => slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit} (100%) rename src/test/mir-opt/{slice-drop-shim/64bit/core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir => slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit} (100%) rename src/test/mir-opt/{storage_live_dead_in_statics => }/storage_live_dead_in_statics.XXX.mir_map.0.mir (100%) rename src/test/mir-opt/{storage_ranges => }/storage_ranges.main.nll.0.mir (100%) rename src/test/mir-opt/{tls-access => }/tls_access.main.SimplifyCfg-final.after.mir (100%) rename src/test/mir-opt/{uniform_array_move_out => }/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir (100%) rename src/test/mir-opt/{uniform_array_move_out => }/uniform_array_move_out.move_out_from_end.mir_map.0.mir (100%) rename src/test/mir-opt/{uninhabited-enum => }/uninhabited_enum.process_never.SimplifyLocals.after.mir (100%) rename src/test/mir-opt/{uninhabited-enum => }/uninhabited_enum.process_void.SimplifyLocals.after.mir (100%) rename src/test/mir-opt/{uninhabited_enum_branching => }/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir (100%) rename src/test/mir-opt/{uninhabited_enum_branching => }/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff (100%) rename src/test/mir-opt/{unreachable => }/unreachable.main.UnreachablePropagation.diff (100%) rename src/test/mir-opt/{unreachable_asm => }/unreachable_asm.main.UnreachablePropagation.diff (100%) rename src/test/mir-opt/{unreachable_asm_2 => }/unreachable_asm_2.main.UnreachablePropagation.diff (100%) rename src/test/mir-opt/{unreachable_diverging => }/unreachable_diverging.main.UnreachablePropagation.diff (100%) rename src/test/mir-opt/{unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir => unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{unusual-item-types/64bit/unusual_item_types.E-V-{{constant}}.mir_map.0.mir => unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit} (100%) rename src/test/mir-opt/{unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir => unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{unusual-item-types/64bit/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir => unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.64bit} (100%) rename src/test/mir-opt/{unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir => unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit} (100%) rename src/test/mir-opt/{unusual-item-types/64bit/core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir => unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit} (100%) rename src/test/mir-opt/{unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir => unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit} (100%) rename src/test/mir-opt/{unusual-item-types/64bit/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir => unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit} (100%) rename src/test/mir-opt/{while-storage => }/while_storage.while_loop.PreCodegen.after.mir (100%) diff --git a/Cargo.lock b/Cargo.lock index d0ce581343f..982e4d3602f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -611,6 +611,7 @@ dependencies = [ "diff", "env_logger 0.7.1", "getopts", + "glob", "lazy_static", "libc", "log", diff --git a/fuckyou.rb b/fuckyou.rb deleted file mode 100644 index e4f1fc2f785..00000000000 --- a/fuckyou.rb +++ /dev/null @@ -1,7 +0,0 @@ -Dir.glob('src/test/mir-opt/**/*.rs').each do |f| - puts f - t = File.read(f) - b = File.basename(f, ".rs") - t.gsub!(/\/\/ EMIT_MIR rustc/, "// EMIT_MIR " + b) - File.open(f, "w") { |f| f.puts t } -end diff --git a/omg.mir b/omg.mir deleted file mode 100644 index c067a2c1d44..00000000000 --- a/omg.mir +++ /dev/null @@ -1,2 +0,0 @@ -// EMIT_MIR rustc.OMG -test 123 diff --git a/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs index bc1b1e4f992..7c985def8e4 100644 --- a/src/librustc_mir/util/pretty.rs +++ b/src/librustc_mir/util/pretty.rs @@ -197,8 +197,15 @@ fn dump_path( }; let file_name = format!( - "{}.{}{}{}{}.{}.{}.{}", crate_name, - item_name, shim_disambiguator, promotion_id, pass_num, pass_name, disambiguator, extension, + "{}.{}{}{}{}.{}.{}.{}", + crate_name, + item_name, + shim_disambiguator, + promotion_id, + pass_num, + pass_name, + disambiguator, + extension, ); file_path.push(&file_name); diff --git a/src/test/mir-opt/address-of/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir similarity index 100% rename from src/test/mir-opt/address-of/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir rename to src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/address-of/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir similarity index 100% rename from src/test/mir-opt/address-of/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir rename to src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit similarity index 100% rename from src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit diff --git a/src/test/mir-opt/array-index-is-temporary/64bit/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit similarity index 100% rename from src/test/mir-opt/array-index-is-temporary/64bit/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit diff --git a/src/test/mir-opt/basic_assignment/basic_assignment.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir similarity index 100% rename from src/test/mir-opt/basic_assignment/basic_assignment.main.SimplifyCfg-initial.after.mir rename to src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/box_expr/box_expr.main.ElaborateDrops.before.mir b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir similarity index 100% rename from src/test/mir-opt/box_expr/box_expr.main.ElaborateDrops.before.mir rename to src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir diff --git a/src/test/mir-opt/byte_slice/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir similarity index 100% rename from src/test/mir-opt/byte_slice/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir diff --git a/src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit similarity index 100% rename from src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff rename to src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit diff --git a/src/test/mir-opt/combine_array_len/64bit/combine_array_len.norm2.InstCombine.diff b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit similarity index 100% rename from src/test/mir-opt/combine_array_len/64bit/combine_array_len.norm2.InstCombine.diff rename to src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit diff --git a/src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit similarity index 100% rename from src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir rename to src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit diff --git a/src/test/mir-opt/const_allocation/64bit/const_allocation.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit similarity index 100% rename from src/test/mir-opt/const_allocation/64bit/const_allocation.main.ConstProp.after.mir rename to src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit diff --git a/src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit similarity index 100% rename from src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir rename to src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit diff --git a/src/test/mir-opt/const_allocation2/64bit/const_allocation2.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit similarity index 100% rename from src/test/mir-opt/const_allocation2/64bit/const_allocation2.main.ConstProp.after.mir rename to src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit diff --git a/src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.32bit similarity index 100% rename from src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir rename to src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.32bit diff --git a/src/test/mir-opt/const_allocation3/64bit/const_allocation3.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.64bit similarity index 100% rename from src/test/mir-opt/const_allocation3/64bit/const_allocation3.main.ConstProp.after.mir rename to src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.64bit diff --git a/src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir similarity index 100% rename from src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir rename to src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir diff --git a/src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.BAR.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff similarity index 100% rename from src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.BAR.PromoteTemps.diff rename to src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff diff --git a/src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir similarity index 100% rename from src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir rename to src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir diff --git a/src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.FOO.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff similarity index 100% rename from src/test/mir-opt/const-promotion-extern-static/const_promotion_extern_static.FOO.PromoteTemps.diff rename to src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff diff --git a/src/test/mir-opt/const_prop/aggregate/aggregate.main.ConstProp.diff b/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/aggregate/aggregate.main.ConstProp.diff rename to src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit similarity index 100% rename from src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff rename to src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit diff --git a/src/test/mir-opt/const_prop/array_index/64bit/array_index.main.ConstProp.diff b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit similarity index 100% rename from src/test/mir-opt/const_prop/array_index/64bit/array_index.main.ConstProp.diff rename to src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit diff --git a/src/test/mir-opt/const_prop/bad_op_div_by_zero/bad_op_div_by_zero.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/bad_op_div_by_zero/bad_op_div_by_zero.main.ConstProp.diff rename to src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/bad_op_mod_by_zero/bad_op_mod_by_zero.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/bad_op_mod_by_zero/bad_op_mod_by_zero.main.ConstProp.diff rename to src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit similarity index 100% rename from src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/32bit/rustc.main.ConstProp.diff rename to src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit diff --git a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/64bit/bad_op_unsafe_oob_for_slices.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit similarity index 100% rename from src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/64bit/bad_op_unsafe_oob_for_slices.main.ConstProp.diff rename to src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit diff --git a/src/test/mir-opt/const_prop/boolean_identities/boolean_identities.test.ConstProp.diff b/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/boolean_identities/boolean_identities.test.ConstProp.diff rename to src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/boxes/boxes.main.ConstProp.diff b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/boxes/boxes.main.ConstProp.diff rename to src/test/mir-opt/const_prop/boxes.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/cast/cast.main.ConstProp.diff b/src/test/mir-opt/const_prop/cast.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/cast/cast.main.ConstProp.diff rename to src/test/mir-opt/const_prop/cast.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/checked_add/checked_add.main.ConstProp.diff b/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/checked_add/checked_add.main.ConstProp.diff rename to src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully/const_prop_fails_gracefully.main.ConstProp.diff b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/const_prop_fails_gracefully/const_prop_fails_gracefully.main.ConstProp.diff rename to src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/control-flow-simplification/control_flow_simplification.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/control-flow-simplification/control_flow_simplification.hello.ConstProp.diff rename to src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/control-flow-simplification/control_flow_simplification.hello.PreCodegen.before.mir b/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir similarity index 100% rename from src/test/mir-opt/const_prop/control-flow-simplification/control_flow_simplification.hello.PreCodegen.before.mir rename to src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir diff --git a/src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit similarity index 100% rename from src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff rename to src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit diff --git a/src/test/mir-opt/const_prop/discriminant/64bit/discriminant.main.ConstProp.diff b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit similarity index 100% rename from src/test/mir-opt/const_prop/discriminant/64bit/discriminant.main.ConstProp.diff rename to src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit diff --git a/src/test/mir-opt/const_prop/indirect/indirect.main.ConstProp.diff b/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/indirect/indirect.main.ConstProp.diff rename to src/test/mir-opt/const_prop/indirect.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/issue-66971/issue_66971.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/issue-66971/issue_66971.main.ConstProp.diff rename to src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/issue-67019/issue_67019.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/issue-67019/issue_67019.main.ConstProp.diff rename to src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mult_by_zero/mult_by_zero.test.ConstProp.diff b/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mult_by_zero/mult_by_zero.test.ConstProp.diff rename to src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mutable_variable/mutable_variable.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mutable_variable/mutable_variable.main.ConstProp.diff rename to src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate/mutable_variable_aggregate.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mutable_variable_aggregate/mutable_variable_aggregate.main.ConstProp.diff rename to src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref/mutable_variable_aggregate_mut_ref.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref/mutable_variable_aggregate_mut_ref.main.ConstProp.diff rename to src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read/mutable_variable_aggregate_partial_read.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read/mutable_variable_aggregate_partial_read.main.ConstProp.diff rename to src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mutable_variable_no_prop/mutable_variable_no_prop.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mutable_variable_no_prop/mutable_variable_no_prop.main.ConstProp.diff rename to src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign/mutable_variable_unprop_assign.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/mutable_variable_unprop_assign/mutable_variable_unprop_assign.main.ConstProp.diff rename to src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit similarity index 100% rename from src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff rename to src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/optimizes_into_variable.main.ConstProp.diff b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit similarity index 100% rename from src/test/mir-opt/const_prop/optimizes_into_variable/64bit/optimizes_into_variable.main.ConstProp.diff rename to src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit similarity index 100% rename from src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir rename to src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/optimizes_into_variable.main.SimplifyLocals.after.mir b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit similarity index 100% rename from src/test/mir-opt/const_prop/optimizes_into_variable/64bit/optimizes_into_variable.main.SimplifyLocals.after.mir rename to src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit diff --git a/src/test/mir-opt/const_prop/read_immutable_static/read_immutable_static.main.ConstProp.diff b/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/read_immutable_static/read_immutable_static.main.ConstProp.diff rename to src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/ref_deref/ref_deref.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/ref_deref/ref_deref.main.ConstProp.diff rename to src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/ref_deref/ref_deref.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff similarity index 100% rename from src/test/mir-opt/const_prop/ref_deref/ref_deref.main.PromoteTemps.diff rename to src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff diff --git a/src/test/mir-opt/const_prop/ref_deref_project/ref_deref_project.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/ref_deref_project/ref_deref_project.main.ConstProp.diff rename to src/test/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/ref_deref_project/ref_deref_project.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff similarity index 100% rename from src/test/mir-opt/const_prop/ref_deref_project/ref_deref_project.main.PromoteTemps.diff rename to src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff diff --git a/src/test/mir-opt/const_prop/reify_fn_ptr/reify_fn_ptr.main.ConstProp.diff b/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/reify_fn_ptr/reify_fn_ptr.main.ConstProp.diff rename to src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit similarity index 100% rename from src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff rename to src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit diff --git a/src/test/mir-opt/const_prop/repeat/64bit/repeat.main.ConstProp.diff b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit similarity index 100% rename from src/test/mir-opt/const_prop/repeat/64bit/repeat.main.ConstProp.diff rename to src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit diff --git a/src/test/mir-opt/const_prop/return_place/return_place.add.ConstProp.diff b/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/return_place/return_place.add.ConstProp.diff rename to src/test/mir-opt/const_prop/return_place.add.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/return_place/return_place.add.PreCodegen.before.mir b/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir similarity index 100% rename from src/test/mir-opt/const_prop/return_place/return_place.add.PreCodegen.before.mir rename to src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir diff --git a/src/test/mir-opt/const_prop/scalar_literal_propagation/scalar_literal_propagation.main.ConstProp.diff b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/scalar_literal_propagation/scalar_literal_propagation.main.ConstProp.diff rename to src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit similarity index 100% rename from src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff rename to src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit diff --git a/src/test/mir-opt/const_prop/slice_len/64bit/slice_len.main.ConstProp.diff b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit similarity index 100% rename from src/test/mir-opt/const_prop/slice_len/64bit/slice_len.main.ConstProp.diff rename to src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit diff --git a/src/test/mir-opt/const_prop/switch_int/switch_int.main.ConstProp.diff b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/switch_int/switch_int.main.ConstProp.diff rename to src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop/switch_int/switch_int.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff similarity index 100% rename from src/test/mir-opt/const_prop/switch_int/switch_int.main.SimplifyBranches-after-const-prop.diff rename to src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff diff --git a/src/test/mir-opt/const_prop/tuple_literal_propagation/tuple_literal_propagation.main.ConstProp.diff b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop/tuple_literal_propagation/tuple_literal_propagation.main.ConstProp.diff rename to src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff diff --git a/src/test/mir-opt/const_prop_miscompile/const_prop_miscompile.bar.ConstProp.diff b/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop_miscompile/const_prop_miscompile.bar.ConstProp.diff rename to src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff diff --git a/src/test/mir-opt/const_prop_miscompile/const_prop_miscompile.foo.ConstProp.diff b/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff similarity index 100% rename from src/test/mir-opt/const_prop_miscompile/const_prop_miscompile.foo.ConstProp.diff rename to src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff diff --git a/src/test/mir-opt/copy_propagation/copy_propagation.test.CopyPropagation.diff b/src/test/mir-opt/copy_propagation.test.CopyPropagation.diff similarity index 100% rename from src/test/mir-opt/copy_propagation/copy_propagation.test.CopyPropagation.diff rename to src/test/mir-opt/copy_propagation.test.CopyPropagation.diff diff --git a/src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.arg_src.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff similarity index 100% rename from src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.arg_src.CopyPropagation.diff rename to src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff diff --git a/src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.bar.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff similarity index 100% rename from src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.bar.CopyPropagation.diff rename to src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff diff --git a/src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.baz.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.baz.CopyPropagation.diff similarity index 100% rename from src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.baz.CopyPropagation.diff rename to src/test/mir-opt/copy_propagation_arg.baz.CopyPropagation.diff diff --git a/src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.foo.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.foo.CopyPropagation.diff similarity index 100% rename from src/test/mir-opt/copy_propagation_arg/copy_propagation_arg.foo.CopyPropagation.diff rename to src/test/mir-opt/copy_propagation_arg.foo.CopyPropagation.diff diff --git a/src/test/mir-opt/deaggregator_test/deaggregator_test.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff similarity index 100% rename from src/test/mir-opt/deaggregator_test/deaggregator_test.bar.Deaggregator.diff rename to src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff diff --git a/src/test/mir-opt/deaggregator_test_enum/deaggregator_test_enum.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_enum.bar.Deaggregator.diff similarity index 100% rename from src/test/mir-opt/deaggregator_test_enum/deaggregator_test_enum.bar.Deaggregator.diff rename to src/test/mir-opt/deaggregator_test_enum.bar.Deaggregator.diff diff --git a/src/test/mir-opt/deaggregator_test_enum_2/deaggregator_test_enum_2.test1.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_enum_2.test1.Deaggregator.diff similarity index 100% rename from src/test/mir-opt/deaggregator_test_enum_2/deaggregator_test_enum_2.test1.Deaggregator.diff rename to src/test/mir-opt/deaggregator_test_enum_2.test1.Deaggregator.diff diff --git a/src/test/mir-opt/deaggregator_test_multiple/deaggregator_test_multiple.test.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_multiple.test.Deaggregator.diff similarity index 100% rename from src/test/mir-opt/deaggregator_test_multiple/deaggregator_test_multiple.test.Deaggregator.diff rename to src/test/mir-opt/deaggregator_test_multiple.test.Deaggregator.diff diff --git a/src/test/mir-opt/exponential-or/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir similarity index 100% rename from src/test/mir-opt/exponential-or/exponential_or.match_tuple.SimplifyCfg-initial.after.mir rename to src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/fn-ptr-shim/core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir similarity index 100% rename from src/test/mir-opt/fn-ptr-shim/core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir rename to src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir diff --git a/src/test/mir-opt/generator-drop-cleanup/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir b/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir similarity index 100% rename from src/test/mir-opt/generator-drop-cleanup/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir rename to src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir diff --git a/src/test/mir-opt/generator-storage-dead-unwind/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir b/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir similarity index 100% rename from src/test/mir-opt/generator-storage-dead-unwind/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir rename to src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir diff --git a/src/test/mir-opt/generator-tiny/generator_tiny.main-{{closure}}.generator_resume.0.mir b/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir similarity index 100% rename from src/test/mir-opt/generator-tiny/generator_tiny.main-{{closure}}.generator_resume.0.mir rename to src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir diff --git a/src/test/mir-opt/graphviz/graphviz.main.mir_map.0.dot b/src/test/mir-opt/graphviz.main.mir_map.0.dot similarity index 100% rename from src/test/mir-opt/graphviz/graphviz.main.mir_map.0.dot rename to src/test/mir-opt/graphviz.main.mir_map.0.dot diff --git a/src/test/mir-opt/inline/inline-any-operand/inline_any_operand.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-any-operand/inline_any_operand.bar.Inline.after.mir rename to src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir diff --git a/src/test/mir-opt/inline/inline-closure/inline_closure.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-closure/inline_closure.foo.Inline.after.mir rename to src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir diff --git a/src/test/mir-opt/inline/inline-closure-borrows-arg/inline_closure_borrows_arg.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-closure-borrows-arg/inline_closure_borrows_arg.foo.Inline.after.mir rename to src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir diff --git a/src/test/mir-opt/inline/inline-closure-captures/inline_closure_captures.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-closure-captures/inline_closure_captures.foo.Inline.after.mir rename to src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir diff --git a/src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit similarity index 100% rename from src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff rename to src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit diff --git a/src/test/mir-opt/inline/inline-into-box-place/64bit/inline_into_box_place.main.Inline.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit similarity index 100% rename from src/test/mir-opt/inline/inline-into-box-place/64bit/inline_into_box_place.main.Inline.diff rename to src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit diff --git a/src/test/mir-opt/inline/inline-retag/inline_retag.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-retag/inline_retag.bar.Inline.after.mir rename to src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir diff --git a/src/test/mir-opt/inline/inline-specialization/inline_specialization.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff similarity index 100% rename from src/test/mir-opt/inline/inline-specialization/inline_specialization.main.Inline.diff rename to src/test/mir-opt/inline/inline_specialization.main.Inline.diff diff --git a/src/test/mir-opt/inline/inline-trait-method/inline_trait_method.test.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-trait-method/inline_trait_method.test.Inline.after.mir rename to src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir diff --git a/src/test/mir-opt/inline/inline-trait-method_2/inline_trait_method_2.test2.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/inline-trait-method_2/inline_trait_method_2.test2.Inline.after.mir rename to src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir rename to src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir rename to src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir rename to src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir similarity index 100% rename from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir rename to src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir diff --git a/src/test/mir-opt/instrument_coverage/rustc.bar.InstrumentCoverage.diff b/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff similarity index 95% rename from src/test/mir-opt/instrument_coverage/rustc.bar.InstrumentCoverage.diff rename to src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff index e7fef4622b1..96df5c6a518 100644 --- a/src/test/mir-opt/instrument_coverage/rustc.bar.InstrumentCoverage.diff +++ b/src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff @@ -7,7 +7,7 @@ bb0: { + StorageLive(_1); // scope 0 at $DIR/instrument_coverage.rs:18:18: 18:18 -+ _1 = const std::intrinsics::count_code_region(const 10208505205182607101_u64, const 0_u32, const 501_u32, const 513_u32) -> bb2; // scope 0 at $DIR/instrument_coverage.rs:18:18: 18:18 ++ _1 = const std::intrinsics::count_code_region(const 10208505205182607101_u64, const 0_u32, const 529_u32, const 541_u32) -> bb2; // scope 0 at $DIR/instrument_coverage.rs:18:18: 18:18 + // ty::Const + // + ty: unsafe extern "rust-intrinsic" fn(u64, u32, u32, u32) {std::intrinsics::count_code_region} + // + val: Value(Scalar()) @@ -28,16 +28,16 @@ + // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } + // ty::Const + // + ty: u32 -+ // + val: Value(Scalar(0x000001f5)) ++ // + val: Value(Scalar(0x00000211)) + // mir::Constant + // + span: $DIR/instrument_coverage.rs:18:18: 18:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x000001f5)) } ++ // + literal: Const { ty: u32, val: Value(Scalar(0x00000211)) } + // ty::Const + // + ty: u32 -+ // + val: Value(Scalar(0x00000201)) ++ // + val: Value(Scalar(0x0000021d)) + // mir::Constant + // + span: $DIR/instrument_coverage.rs:18:18: 18:18 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000201)) } ++ // + literal: Const { ty: u32, val: Value(Scalar(0x0000021d)) } + } + + bb1 (cleanup): { diff --git a/src/test/mir-opt/instrument_coverage/rustc.main.InstrumentCoverage.diff b/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff similarity index 97% rename from src/test/mir-opt/instrument_coverage/rustc.main.InstrumentCoverage.diff rename to src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff index 51378c216da..1bcc98de8d4 100644 --- a/src/test/mir-opt/instrument_coverage/rustc.main.InstrumentCoverage.diff +++ b/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff @@ -11,7 +11,7 @@ bb0: { - falseUnwind -> [real: bb1, cleanup: bb2]; // scope 0 at $DIR/instrument_coverage.rs:10:5: 14:6 + StorageLive(_4); // scope 0 at $DIR/instrument_coverage.rs:9:11: 9:11 -+ _4 = const std::intrinsics::count_code_region(const 16004455475339839479_u64, const 0_u32, const 397_u32, const 465_u32) -> bb7; // scope 0 at $DIR/instrument_coverage.rs:9:11: 9:11 ++ _4 = const std::intrinsics::count_code_region(const 16004455475339839479_u64, const 0_u32, const 425_u32, const 493_u32) -> bb7; // scope 0 at $DIR/instrument_coverage.rs:9:11: 9:11 + // ty::Const + // + ty: unsafe extern "rust-intrinsic" fn(u64, u32, u32, u32) {std::intrinsics::count_code_region} + // + val: Value(Scalar()) @@ -32,16 +32,16 @@ + // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) } + // ty::Const + // + ty: u32 -+ // + val: Value(Scalar(0x0000018d)) ++ // + val: Value(Scalar(0x000001a9)) + // mir::Constant + // + span: $DIR/instrument_coverage.rs:9:11: 9:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000018d)) } ++ // + literal: Const { ty: u32, val: Value(Scalar(0x000001a9)) } + // ty::Const + // + ty: u32 -+ // + val: Value(Scalar(0x000001d1)) ++ // + val: Value(Scalar(0x000001ed)) + // mir::Constant + // + span: $DIR/instrument_coverage.rs:9:11: 9:11 -+ // + literal: Const { ty: u32, val: Value(Scalar(0x000001d1)) } ++ // + literal: Const { ty: u32, val: Value(Scalar(0x000001ed)) } } bb1: { diff --git a/src/test/mir-opt/issue-72181/rustc.bar.mir_map.0.mir b/src/test/mir-opt/issue-72181/rustc.bar.mir_map.0.mir deleted file mode 100644 index 3b6dc46d055..00000000000 --- a/src/test/mir-opt/issue-72181/rustc.bar.mir_map.0.mir +++ /dev/null @@ -1,25 +0,0 @@ -// MIR for `bar` 0 mir_map - -fn bar(_1: [(Never, u32); 1]) -> u32 { - let mut _0: u32; // return place in scope 0 at $DIR/issue-72181.rs:18:40: 18:43 - let _2: u32; // in scope 0 at $DIR/issue-72181.rs:18:13: 18:14 - scope 1 { - debug x => _2; // in scope 1 at $DIR/issue-72181.rs:18:13: 18:14 - } - - bb0: { - StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:18:13: 18:14 - _2 = (_1[0 of 1].1: u32); // scope 0 at $DIR/issue-72181.rs:18:13: 18:14 - _0 = _2; // scope 1 at $DIR/issue-72181.rs:18:46: 18:47 - StorageDead(_2); // scope 0 at $DIR/issue-72181.rs:18:48: 18:49 - goto -> bb2; // scope 0 at $DIR/issue-72181.rs:18:49: 18:49 - } - - bb1 (cleanup): { - resume; // scope 0 at $DIR/issue-72181.rs:18:1: 18:49 - } - - bb2: { - return; // scope 0 at $DIR/issue-72181.rs:18:49: 18:49 - } -} diff --git a/src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir b/src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir deleted file mode 100644 index 2941e282cf4..00000000000 --- a/src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir +++ /dev/null @@ -1,37 +0,0 @@ -// MIR for `foo` 0 mir_map - -fn foo(_1: [(Never, u32); 1]) -> u32 { - debug xs => _1; // in scope 0 at $DIR/issue-72181.rs:15:8: 15:10 - let mut _0: u32; // return place in scope 0 at $DIR/issue-72181.rs:15:34: 15:37 - let _2: usize; // in scope 0 at $DIR/issue-72181.rs:15:43: 15:44 - let mut _3: usize; // in scope 0 at $DIR/issue-72181.rs:15:40: 15:45 - let mut _4: bool; // in scope 0 at $DIR/issue-72181.rs:15:40: 15:45 - - bb0: { - StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:15:43: 15:44 - _2 = const 0usize; // scope 0 at $DIR/issue-72181.rs:15:43: 15:44 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $DIR/issue-72181.rs:15:43: 15:44 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } - _3 = Len(_1); // scope 0 at $DIR/issue-72181.rs:15:40: 15:45 - _4 = Lt(_2, _3); // scope 0 at $DIR/issue-72181.rs:15:40: 15:45 - assert(move _4, "index out of bounds: the len is {} but the index is {}", move _3, _2) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:15:40: 15:45 - } - - bb1 (cleanup): { - resume; // scope 0 at $DIR/issue-72181.rs:15:1: 15:49 - } - - bb2: { - _0 = (_1[_2].1: u32); // scope 0 at $DIR/issue-72181.rs:15:40: 15:47 - StorageDead(_2); // scope 0 at $DIR/issue-72181.rs:15:48: 15:49 - goto -> bb3; // scope 0 at $DIR/issue-72181.rs:15:49: 15:49 - } - - bb3: { - return; // scope 0 at $DIR/issue-72181.rs:15:49: 15:49 - } -} diff --git a/src/test/mir-opt/issue-72181/rustc.main.mir_map.0.mir b/src/test/mir-opt/issue-72181/rustc.main.mir_map.0.mir deleted file mode 100644 index 65f4de0e235..00000000000 --- a/src/test/mir-opt/issue-72181/rustc.main.mir_map.0.mir +++ /dev/null @@ -1,93 +0,0 @@ -// MIR for `main` 0 mir_map - -fn main() -> () { - let mut _0: (); // return place in scope 0 at $DIR/issue-72181.rs:21:11: 21:11 - let mut _1: usize; // in scope 0 at $DIR/issue-72181.rs:22:13: 22:34 - let mut _3: Foo; // in scope 0 at $DIR/issue-72181.rs:24:14: 24:27 - let mut _4: Foo; // in scope 0 at $DIR/issue-72181.rs:24:29: 24:42 - let mut _5: u64; // in scope 0 at $DIR/issue-72181.rs:25:13: 25:30 - let _6: usize; // in scope 0 at $DIR/issue-72181.rs:25:24: 25:25 - let mut _7: usize; // in scope 0 at $DIR/issue-72181.rs:25:22: 25:26 - let mut _8: bool; // in scope 0 at $DIR/issue-72181.rs:25:22: 25:26 - scope 1 { - let _2: [Foo; 2]; // in scope 1 at $DIR/issue-72181.rs:24:9: 24:10 - scope 2 { - debug f => _2; // in scope 2 at $DIR/issue-72181.rs:24:9: 24:10 - scope 3 { - } - scope 4 { - } - } - } - - bb0: { - StorageLive(_1); // scope 0 at $DIR/issue-72181.rs:22:13: 22:34 - _1 = const std::mem::size_of::() -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:22:13: 22:34 - // ty::Const - // + ty: fn() -> usize {std::mem::size_of::} - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/issue-72181.rs:22:13: 22:32 - // + literal: Const { ty: fn() -> usize {std::mem::size_of::}, val: Value(Scalar()) } - } - - bb1 (cleanup): { - resume; // scope 0 at $DIR/issue-72181.rs:21:1: 26:2 - } - - bb2: { - StorageDead(_1); // scope 0 at $DIR/issue-72181.rs:22:34: 22:35 - StorageLive(_2); // scope 1 at $DIR/issue-72181.rs:24:9: 24:10 - StorageLive(_3); // scope 1 at $DIR/issue-72181.rs:24:14: 24:27 - _3 = Foo { a: const 42u64 }; // scope 1 at $DIR/issue-72181.rs:24:14: 24:27 - // ty::Const - // + ty: u64 - // + val: Value(Scalar(0x000000000000002a)) - // mir::Constant - // + span: $DIR/issue-72181.rs:24:23: 24:25 - // + literal: Const { ty: u64, val: Value(Scalar(0x000000000000002a)) } - StorageLive(_4); // scope 1 at $DIR/issue-72181.rs:24:29: 24:42 - _4 = Foo { a: const 10u64 }; // scope 1 at $DIR/issue-72181.rs:24:29: 24:42 - // ty::Const - // + ty: u64 - // + val: Value(Scalar(0x000000000000000a)) - // mir::Constant - // + span: $DIR/issue-72181.rs:24:38: 24:40 - // + literal: Const { ty: u64, val: Value(Scalar(0x000000000000000a)) } - _2 = [move _3, move _4]; // scope 1 at $DIR/issue-72181.rs:24:13: 24:43 - StorageDead(_4); // scope 1 at $DIR/issue-72181.rs:24:42: 24:43 - StorageDead(_3); // scope 1 at $DIR/issue-72181.rs:24:42: 24:43 - FakeRead(ForLet, _2); // scope 1 at $DIR/issue-72181.rs:24:9: 24:10 - StorageLive(_5); // scope 2 at $DIR/issue-72181.rs:25:13: 25:30 - StorageLive(_6); // scope 4 at $DIR/issue-72181.rs:25:24: 25:25 - _6 = const 0usize; // scope 4 at $DIR/issue-72181.rs:25:24: 25:25 - // ty::Const - // + ty: usize - // + val: Value(Scalar(0x0000000000000000)) - // mir::Constant - // + span: $DIR/issue-72181.rs:25:24: 25:25 - // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) } - _7 = Len(_2); // scope 4 at $DIR/issue-72181.rs:25:22: 25:26 - _8 = Lt(_6, _7); // scope 4 at $DIR/issue-72181.rs:25:22: 25:26 - assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> [success: bb3, unwind: bb1]; // scope 4 at $DIR/issue-72181.rs:25:22: 25:26 - } - - bb3: { - _5 = (_2[_6].0: u64); // scope 4 at $DIR/issue-72181.rs:25:22: 25:28 - StorageDead(_6); // scope 2 at $DIR/issue-72181.rs:25:30: 25:31 - StorageDead(_5); // scope 2 at $DIR/issue-72181.rs:25:30: 25:31 - _0 = const (); // scope 0 at $DIR/issue-72181.rs:21:11: 26:2 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/issue-72181.rs:21:11: 26:2 - // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_2); // scope 1 at $DIR/issue-72181.rs:26:1: 26:2 - goto -> bb4; // scope 0 at $DIR/issue-72181.rs:26:2: 26:2 - } - - bb4: { - return; // scope 0 at $DIR/issue-72181.rs:26:2: 26:2 - } -} diff --git a/src/test/mir-opt/issue-38669/issue_38669.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir similarity index 100% rename from src/test/mir-opt/issue-38669/issue_38669.main.SimplifyCfg-initial.after.mir rename to src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/issue-41110/issue_41110.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir similarity index 100% rename from src/test/mir-opt/issue-41110/issue_41110.main.ElaborateDrops.after.mir rename to src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir diff --git a/src/test/mir-opt/issue-41110/issue_41110.test.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir similarity index 100% rename from src/test/mir-opt/issue-41110/issue_41110.test.ElaborateDrops.after.mir rename to src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir diff --git a/src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit similarity index 100% rename from src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir rename to src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit diff --git a/src/test/mir-opt/issue-41697/64bit/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit similarity index 100% rename from src/test/mir-opt/issue-41697/64bit/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir rename to src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit diff --git a/src/test/mir-opt/issue-41888/issue_41888.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir similarity index 100% rename from src/test/mir-opt/issue-41888/issue_41888.main.ElaborateDrops.after.mir rename to src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir diff --git a/src/test/mir-opt/issue-49232/issue_49232.main.mir_map.0.mir b/src/test/mir-opt/issue_49232.main.mir_map.0.mir similarity index 100% rename from src/test/mir-opt/issue-49232/issue_49232.main.mir_map.0.mir rename to src/test/mir-opt/issue_49232.main.mir_map.0.mir diff --git a/src/test/mir-opt/issue-62289/issue_62289.test.ElaborateDrops.before.mir b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir similarity index 100% rename from src/test/mir-opt/issue-62289/issue_62289.test.ElaborateDrops.before.mir rename to src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir diff --git a/src/test/mir-opt/issue-72181/32bit/rustc.bar.mir_map.0.mir b/src/test/mir-opt/issue_72181.bar.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/issue-72181/32bit/rustc.bar.mir_map.0.mir rename to src/test/mir-opt/issue_72181.bar.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/issue-72181/64bit/issue_72181.bar.mir_map.0.mir b/src/test/mir-opt/issue_72181.bar.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/issue-72181/64bit/issue_72181.bar.mir_map.0.mir rename to src/test/mir-opt/issue_72181.bar.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/issue-72181/32bit/rustc.foo.mir_map.0.mir b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/issue-72181/32bit/rustc.foo.mir_map.0.mir rename to src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/issue-72181/64bit/issue_72181.foo.mir_map.0.mir b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/issue-72181/64bit/issue_72181.foo.mir_map.0.mir rename to src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/issue-72181/32bit/rustc.main.mir_map.0.mir b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/issue-72181/32bit/rustc.main.mir_map.0.mir rename to src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/issue-72181/64bit/issue_72181.main.mir_map.0.mir b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/issue-72181/64bit/issue_72181.main.mir_map.0.mir rename to src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/issue-72181-1/issue_72181_1.f.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir similarity index 100% rename from src/test/mir-opt/issue-72181-1/issue_72181_1.f.mir_map.0.mir rename to src/test/mir-opt/issue_72181_1.f.mir_map.0.mir diff --git a/src/test/mir-opt/issue-72181-1/issue_72181_1.main.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir similarity index 100% rename from src/test/mir-opt/issue-72181-1/issue_72181_1.main.mir_map.0.mir rename to src/test/mir-opt/issue_72181_1.main.mir_map.0.mir diff --git a/src/test/mir-opt/issue-73223/32bit/rustc.main.PreCodegen.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit similarity index 100% rename from src/test/mir-opt/issue-73223/32bit/rustc.main.PreCodegen.diff rename to src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit diff --git a/src/test/mir-opt/issue-73223/64bit/issue_73223.main.PreCodegen.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit similarity index 100% rename from src/test/mir-opt/issue-73223/64bit/issue_73223.main.PreCodegen.diff rename to src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit diff --git a/src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit similarity index 100% rename from src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff rename to src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit diff --git a/src/test/mir-opt/issue-73223/64bit/issue_73223.main.SimplifyArmIdentity.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit similarity index 100% rename from src/test/mir-opt/issue-73223/64bit/issue_73223.main.SimplifyArmIdentity.diff rename to src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit diff --git a/src/test/mir-opt/loop_test/loop_test.main.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir similarity index 100% rename from src/test/mir-opt/loop_test/loop_test.main.SimplifyCfg-qualify-consts.after.mir rename to src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir diff --git a/src/test/mir-opt/match-arm-scopes/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff similarity index 100% rename from src/test/mir-opt/match-arm-scopes/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff rename to src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff diff --git a/src/test/mir-opt/match_false_edges/match_false_edges.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir similarity index 100% rename from src/test/mir-opt/match_false_edges/match_false_edges.full_tested_match.PromoteTemps.after.mir rename to src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir diff --git a/src/test/mir-opt/match_false_edges/match_false_edges.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir similarity index 100% rename from src/test/mir-opt/match_false_edges/match_false_edges.full_tested_match2.PromoteTemps.before.mir rename to src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir diff --git a/src/test/mir-opt/match_false_edges/match_false_edges.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir similarity index 100% rename from src/test/mir-opt/match_false_edges/match_false_edges.main.PromoteTemps.before.mir rename to src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir diff --git a/src/test/mir-opt/match_test/match_test.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir similarity index 100% rename from src/test/mir-opt/match_test/match_test.main.SimplifyCfg-initial.after.mir rename to src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/nll/named-lifetimes-basic/named_lifetimes_basic.use_x.nll.0.mir b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir similarity index 100% rename from src/test/mir-opt/nll/named-lifetimes-basic/named_lifetimes_basic.use_x.nll.0.mir rename to src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir diff --git a/src/test/mir-opt/nll/region-subtyping-basic/32bit/rustc.main.nll.0.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit similarity index 100% rename from src/test/mir-opt/nll/region-subtyping-basic/32bit/rustc.main.nll.0.mir rename to src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit diff --git a/src/test/mir-opt/nll/region-subtyping-basic/64bit/region_subtyping_basic.main.nll.0.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit similarity index 100% rename from src/test/mir-opt/nll/region-subtyping-basic/64bit/region_subtyping_basic.main.nll.0.mir rename to src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit diff --git a/src/test/mir-opt/no-drop-for-inactive-variant/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir similarity index 100% rename from src/test/mir-opt/no-drop-for-inactive-variant/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir diff --git a/src/test/mir-opt/no-spurious-drop-after-call/no_spurious_drop_after_call.main.ElaborateDrops.before.mir b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir similarity index 100% rename from src/test/mir-opt/no-spurious-drop-after-call/no_spurious_drop_after_call.main.ElaborateDrops.before.mir rename to src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir diff --git a/src/test/mir-opt/nrvo-simple/nrvo_simple.nrvo.RenameReturnPlace.diff b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff similarity index 100% rename from src/test/mir-opt/nrvo-simple/nrvo_simple.nrvo.RenameReturnPlace.diff rename to src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff diff --git a/src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit similarity index 100% rename from src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit diff --git a/src/test/mir-opt/packed-struct-drop-aligned/64bit/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit similarity index 100% rename from src/test/mir-opt/packed-struct-drop-aligned/64bit/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit diff --git a/src/test/mir-opt/remove_fake_borrows/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff similarity index 100% rename from src/test/mir-opt/remove_fake_borrows/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff rename to src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff diff --git a/src/test/mir-opt/remove-never-const/remove_never_const.no_codegen.PreCodegen.after.mir b/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir similarity index 100% rename from src/test/mir-opt/remove-never-const/remove_never_const.no_codegen.PreCodegen.after.mir rename to src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir diff --git a/src/test/mir-opt/retag/core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir b/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir similarity index 100% rename from src/test/mir-opt/retag/core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir rename to src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir diff --git a/src/test/mir-opt/retag/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir similarity index 100% rename from src/test/mir-opt/retag/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir diff --git a/src/test/mir-opt/retag/retag.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir similarity index 100% rename from src/test/mir-opt/retag/retag.main.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir diff --git a/src/test/mir-opt/retag/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir similarity index 100% rename from src/test/mir-opt/retag/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir diff --git a/src/test/mir-opt/retag/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir similarity index 100% rename from src/test/mir-opt/retag/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir rename to src/test/mir-opt/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir diff --git a/src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir rename to src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/simple-match/64bit/simple_match.match_bool.mir_map.0.mir b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/simple-match/64bit/simple_match.match_bool.mir_map.0.mir rename to src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff deleted file mode 100644 index e7373391b79..00000000000 --- a/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff +++ /dev/null @@ -1,70 +0,0 @@ -- // MIR for `main` before SimplifyArmIdentity -+ // MIR for `main` after SimplifyArmIdentity - - fn main() -> () { - let mut _0: (); // return place in scope 0 at $DIR/simplify-arm-identity.rs:16:11: 16:11 - let _1: Src as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/simplify-arm-identity.rs:17:9: 17:10 - let mut _2: Dst; // in scope 0 at $DIR/simplify-arm-identity.rs:18:18: 21:6 - let mut _3: isize; // in scope 0 at $DIR/simplify-arm-identity.rs:19:9: 19:20 - let mut _5: u8; // in scope 0 at $DIR/simplify-arm-identity.rs:19:33: 19:34 - scope 1 { - debug e => _1; // in scope 1 at $DIR/simplify-arm-identity.rs:17:9: 17:10 - let _4: u8; // in scope 1 at $DIR/simplify-arm-identity.rs:19:18: 19:19 - scope 2 { - } - scope 3 { - debug x => _4; // in scope 3 at $DIR/simplify-arm-identity.rs:19:18: 19:19 - } - } - - bb0: { - StorageLive(_1); // scope 0 at $DIR/simplify-arm-identity.rs:17:9: 17:10 - ((_1 as Foo).0: u8) = const 0u8; // scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29 - // ty::Const - // + ty: u8 - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:17:27: 17:28 - // + literal: Const { ty: u8, val: Value(Scalar(0x00)) } - discriminant(_1) = 0; // scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29 - StorageLive(_2); // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 - _3 = discriminant(_1); // scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20 - switchInt(move _3) -> [0isize: bb3, 1isize: bb1, otherwise: bb2]; // scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20 - } - - bb1: { - _2 = const Dst::Foo(0u8); // bb1[0]: scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32 - // ty::Const - // + ty: Dst - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:20:21: 20:32 - // + literal: Const { ty: Dst, val: Value(Scalar(0x00)) } - goto -> bb4; // bb1[1]: scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 - } - - bb2: { - unreachable; // scope 1 at $DIR/simplify-arm-identity.rs:18:24: 18:25 - } - - bb3: { - _4 = ((_1 as Foo).0: u8); // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 19:19 - ((_2 as Foo).0: u8) = move _4; // scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35 - discriminant(_2) = 0; // scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35 - goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6 - } - - bb4: { - StorageDead(_2); // scope 1 at $DIR/simplify-arm-identity.rs:21:6: 21:7 - _0 = const (); // scope 0 at $DIR/simplify-arm-identity.rs:16:11: 22:2 - // ty::Const - // + ty: () - // + val: Value(Scalar()) - // mir::Constant - // + span: $DIR/simplify-arm-identity.rs:16:11: 22:2 - // + literal: Const { ty: (), val: Value(Scalar()) } - StorageDead(_1); // scope 0 at $DIR/simplify-arm-identity.rs:22:1: 22:2 - return; // scope 0 at $DIR/simplify-arm-identity.rs:22:2: 22:2 - } - } - diff --git a/src/test/mir-opt/simplify-arm/simplify_arm.id.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff similarity index 100% rename from src/test/mir-opt/simplify-arm/simplify_arm.id.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff diff --git a/src/test/mir-opt/simplify-arm/simplify_arm.id.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff similarity index 100% rename from src/test/mir-opt/simplify-arm/simplify_arm.id.SimplifyBranchSame.diff rename to src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff diff --git a/src/test/mir-opt/simplify-arm/simplify_arm.id_result.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff similarity index 100% rename from src/test/mir-opt/simplify-arm/simplify_arm.id_result.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff diff --git a/src/test/mir-opt/simplify-arm/simplify_arm.id_result.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff similarity index 100% rename from src/test/mir-opt/simplify-arm/simplify_arm.id_result.SimplifyBranchSame.diff rename to src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff diff --git a/src/test/mir-opt/simplify-arm/simplify_arm.id_try.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff similarity index 100% rename from src/test/mir-opt/simplify-arm/simplify_arm.id_try.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff diff --git a/src/test/mir-opt/simplify-arm/simplify_arm.id_try.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff similarity index 100% rename from src/test/mir-opt/simplify-arm/simplify_arm.id_try.SimplifyBranchSame.diff rename to src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff diff --git a/src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit similarity index 100% rename from src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit diff --git a/src/test/mir-opt/simplify-arm-identity/64bit/simplify_arm_identity.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit similarity index 100% rename from src/test/mir-opt/simplify-arm-identity/64bit/simplify_arm_identity.main.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit diff --git a/src/test/mir-opt/simplify_cfg/simplify_cfg.main.SimplifyCfg-early-opt.diff b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff similarity index 100% rename from src/test/mir-opt/simplify_cfg/simplify_cfg.main.SimplifyCfg-early-opt.diff rename to src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff diff --git a/src/test/mir-opt/simplify_cfg/simplify_cfg.main.SimplifyCfg-initial.diff b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff similarity index 100% rename from src/test/mir-opt/simplify_cfg/simplify_cfg.main.SimplifyCfg-initial.diff rename to src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff diff --git a/src/test/mir-opt/simplify_if/simplify_if.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff similarity index 100% rename from src/test/mir-opt/simplify_if/simplify_if.main.SimplifyBranches-after-const-prop.diff rename to src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff diff --git a/src/test/mir-opt/simplify-locals-fixedpoint/simplify_locals_fixedpoint.foo.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff similarity index 100% rename from src/test/mir-opt/simplify-locals-fixedpoint/simplify_locals_fixedpoint.foo.SimplifyLocals.diff rename to src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff diff --git a/src/test/mir-opt/simplify-locals-removes-unused-consts/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff similarity index 100% rename from src/test/mir-opt/simplify-locals-removes-unused-consts/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff rename to src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff diff --git a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/32bit/rustc.map.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit similarity index 100% rename from src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/32bit/rustc.map.SimplifyLocals.diff rename to src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit diff --git a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/64bit/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit similarity index 100% rename from src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/64bit/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff rename to src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit diff --git a/src/test/mir-opt/simplify_match/simplify_match.main.ConstProp.diff b/src/test/mir-opt/simplify_match.main.ConstProp.diff similarity index 100% rename from src/test/mir-opt/simplify_match/simplify_match.main.ConstProp.diff rename to src/test/mir-opt/simplify_match.main.ConstProp.diff diff --git a/src/test/mir-opt/simplify_try/simplify_try.try_identity.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff similarity index 100% rename from src/test/mir-opt/simplify_try/simplify_try.try_identity.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff diff --git a/src/test/mir-opt/simplify_try/simplify_try.try_identity.SimplifyBranchSame.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir similarity index 100% rename from src/test/mir-opt/simplify_try/simplify_try.try_identity.SimplifyBranchSame.after.mir rename to src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir diff --git a/src/test/mir-opt/simplify_try/simplify_try.try_identity.SimplifyLocals.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir similarity index 100% rename from src/test/mir-opt/simplify_try/simplify_try.try_identity.SimplifyLocals.after.mir rename to src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir diff --git a/src/test/mir-opt/simplify_try_if_let/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff similarity index 100% rename from src/test/mir-opt/simplify_try_if_let/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff rename to src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff diff --git a/src/test/mir-opt/slice-drop-shim/32bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit similarity index 100% rename from src/test/mir-opt/slice-drop-shim/32bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir rename to src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit diff --git a/src/test/mir-opt/slice-drop-shim/64bit/core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit similarity index 100% rename from src/test/mir-opt/slice-drop-shim/64bit/core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir rename to src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit diff --git a/src/test/mir-opt/storage_live_dead_in_statics/storage_live_dead_in_statics.XXX.mir_map.0.mir b/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir similarity index 100% rename from src/test/mir-opt/storage_live_dead_in_statics/storage_live_dead_in_statics.XXX.mir_map.0.mir rename to src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir diff --git a/src/test/mir-opt/storage_ranges/storage_ranges.main.nll.0.mir b/src/test/mir-opt/storage_ranges.main.nll.0.mir similarity index 100% rename from src/test/mir-opt/storage_ranges/storage_ranges.main.nll.0.mir rename to src/test/mir-opt/storage_ranges.main.nll.0.mir diff --git a/src/test/mir-opt/tls-access/tls_access.main.SimplifyCfg-final.after.mir b/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir similarity index 100% rename from src/test/mir-opt/tls-access/tls_access.main.SimplifyCfg-final.after.mir rename to src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir diff --git a/src/test/mir-opt/uniform_array_move_out/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir similarity index 100% rename from src/test/mir-opt/uniform_array_move_out/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir rename to src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir diff --git a/src/test/mir-opt/uniform_array_move_out/uniform_array_move_out.move_out_from_end.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir similarity index 100% rename from src/test/mir-opt/uniform_array_move_out/uniform_array_move_out.move_out_from_end.mir_map.0.mir rename to src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir diff --git a/src/test/mir-opt/uninhabited-enum/uninhabited_enum.process_never.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir similarity index 100% rename from src/test/mir-opt/uninhabited-enum/uninhabited_enum.process_never.SimplifyLocals.after.mir rename to src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir diff --git a/src/test/mir-opt/uninhabited-enum/uninhabited_enum.process_void.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir similarity index 100% rename from src/test/mir-opt/uninhabited-enum/uninhabited_enum.process_void.SimplifyLocals.after.mir rename to src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir diff --git a/src/test/mir-opt/uninhabited_enum_branching/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir b/src/test/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir similarity index 100% rename from src/test/mir-opt/uninhabited_enum_branching/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir rename to src/test/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir diff --git a/src/test/mir-opt/uninhabited_enum_branching/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff b/src/test/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff similarity index 100% rename from src/test/mir-opt/uninhabited_enum_branching/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff rename to src/test/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff diff --git a/src/test/mir-opt/unreachable/unreachable.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff similarity index 100% rename from src/test/mir-opt/unreachable/unreachable.main.UnreachablePropagation.diff rename to src/test/mir-opt/unreachable.main.UnreachablePropagation.diff diff --git a/src/test/mir-opt/unreachable_asm/unreachable_asm.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff similarity index 100% rename from src/test/mir-opt/unreachable_asm/unreachable_asm.main.UnreachablePropagation.diff rename to src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff diff --git a/src/test/mir-opt/unreachable_asm_2/unreachable_asm_2.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff similarity index 100% rename from src/test/mir-opt/unreachable_asm_2/unreachable_asm_2.main.UnreachablePropagation.diff rename to src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff diff --git a/src/test/mir-opt/unreachable_diverging/unreachable_diverging.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff similarity index 100% rename from src/test/mir-opt/unreachable_diverging/unreachable_diverging.main.UnreachablePropagation.diff rename to src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir rename to src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/unusual-item-types/64bit/unusual_item_types.E-V-{{constant}}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/64bit/unusual_item_types.E-V-{{constant}}.mir_map.0.mir rename to src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir rename to src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/unusual-item-types/64bit/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/64bit/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir rename to src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir rename to src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit diff --git a/src/test/mir-opt/unusual-item-types/64bit/core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/64bit/core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir rename to src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit diff --git a/src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir rename to src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit diff --git a/src/test/mir-opt/unusual-item-types/64bit/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit similarity index 100% rename from src/test/mir-opt/unusual-item-types/64bit/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir rename to src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit diff --git a/src/test/mir-opt/while-storage/while_storage.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir similarity index 100% rename from src/test/mir-opt/while-storage/while_storage.while_loop.PreCodegen.after.mir rename to src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml index a26c3a4acab..338a167de3f 100644 --- a/src/tools/compiletest/Cargo.toml +++ b/src/tools/compiletest/Cargo.toml @@ -15,6 +15,7 @@ serde_json = "1.0" rustfix = "0.5.0" lazy_static = "1.0" walkdir = "2" +glob = "0.3.0" [target.'cfg(unix)'.dependencies] libc = "0.2" diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 7fbe4f2b928..9354cc16a9a 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -28,6 +28,7 @@ use std::path::{Path, PathBuf}; use std::process::{Child, Command, ExitStatus, Output, Stdio}; use std::str; +use glob::glob; use lazy_static::lazy_static; use log::*; @@ -3124,22 +3125,35 @@ impl<'test> TestCx<'test> { fn check_mir_dump(&self) { let test_file_contents = fs::read_to_string(&self.testpaths.file).unwrap(); - let mut test_dir = self.testpaths.file.with_extension(""); + let test_dir = self.testpaths.file.parent().unwrap(); + let test_crate = + self.testpaths.file.file_stem().unwrap().to_str().unwrap().replace("-", "_"); + let mut bit_width = String::new(); if test_file_contents.lines().any(|l| l == "// EMIT_MIR_FOR_EACH_BIT_WIDTH") { - test_dir.push(get_pointer_width(&self.config.target)) + bit_width = format!(".{}", get_pointer_width(&self.config.target)); } if self.config.bless { - let _ = std::fs::remove_dir_all(&test_dir); + for e in + glob(&format!("{}/{}.*.mir{}", test_dir.display(), test_crate, bit_width)).unwrap() + { + std::fs::remove_file(e.unwrap()).unwrap(); + } + for e in + glob(&format!("{}/{}.*.diff{}", test_dir.display(), test_crate, bit_width)).unwrap() + { + std::fs::remove_file(e.unwrap()).unwrap(); + } } + for l in test_file_contents.lines() { if l.starts_with("// EMIT_MIR ") { let test_name = l.trim_start_matches("// EMIT_MIR ").trim(); let mut test_names = test_name.split(' '); // sometimes we specify two files so that we get a diff between the two files let test_name = test_names.next().unwrap(); - let expected_file; + let mut expected_file; let from_file; let to_file; @@ -3147,7 +3161,7 @@ impl<'test> TestCx<'test> { let trimmed = test_name.trim_end_matches(".diff"); let test_against = format!("{}.after.mir", trimmed); from_file = format!("{}.before.mir", trimmed); - expected_file = test_name.to_string(); + expected_file = format!("{}{}", test_name, bit_width); assert!( test_names.next().is_none(), "two mir pass names specified for MIR diff" @@ -3159,12 +3173,13 @@ impl<'test> TestCx<'test> { test_names.next().is_none(), "three mir pass names specified for MIR diff" ); - expected_file = format!("{}.{}-{}.diff", test_name, first_pass, second_pass); + expected_file = + format!("{}{}.{}-{}.diff", test_name, bit_width, first_pass, second_pass); let second_file = format!("{}.{}.mir", test_name, second_pass); from_file = format!("{}.{}.mir", test_name, first_pass); to_file = Some(second_file); } else { - expected_file = test_name.to_string(); + expected_file = format!("{}{}", test_name, bit_width); from_file = test_name.to_string(); assert!( test_names.next().is_none(), @@ -3172,30 +3187,13 @@ impl<'test> TestCx<'test> { ); to_file = None; }; + if !expected_file.starts_with(&test_crate) { + expected_file = format!("{}.{}", test_crate, expected_file); + } let expected_file = test_dir.join(expected_file); let dumped_string = if let Some(after) = to_file { - let before = self.get_mir_dump_dir().join(from_file); - let after = self.get_mir_dump_dir().join(after); - debug!( - "comparing the contents of: {} with {}", - before.display(), - after.display() - ); - let before = fs::read_to_string(before).unwrap(); - let after = fs::read_to_string(after).unwrap(); - let before = self.normalize_output(&before, &[]); - let after = self.normalize_output(&after, &[]); - let mut dumped_string = String::new(); - for result in diff::lines(&before, &after) { - use std::fmt::Write; - match result { - diff::Result::Left(s) => writeln!(dumped_string, "- {}", s).unwrap(), - diff::Result::Right(s) => writeln!(dumped_string, "+ {}", s).unwrap(), - diff::Result::Both(s, _) => writeln!(dumped_string, " {}", s).unwrap(), - } - } - dumped_string + self.diff_mir_files(from_file.into(), after.into()) } else { let mut output_file = PathBuf::new(); output_file.push(self.get_mir_dump_dir()); @@ -3216,8 +3214,8 @@ impl<'test> TestCx<'test> { let dumped_string = fs::read_to_string(&output_file).unwrap(); self.normalize_output(&dumped_string, &[]) }; + if self.config.bless { - let _ = std::fs::create_dir_all(&test_dir); let _ = std::fs::remove_file(&expected_file); std::fs::write(expected_file, dumped_string.as_bytes()).unwrap(); } else { @@ -3240,6 +3238,26 @@ impl<'test> TestCx<'test> { } } + fn diff_mir_files(&self, before: PathBuf, after: PathBuf) -> String { + let before = self.get_mir_dump_dir().join(before); + let after = self.get_mir_dump_dir().join(after); + debug!("comparing the contents of: {} with {}", before.display(), after.display()); + let before = fs::read_to_string(before).unwrap(); + let after = fs::read_to_string(after).unwrap(); + let before = self.normalize_output(&before, &[]); + let after = self.normalize_output(&after, &[]); + let mut dumped_string = String::new(); + for result in diff::lines(&before, &after) { + use std::fmt::Write; + match result { + diff::Result::Left(s) => writeln!(dumped_string, "- {}", s).unwrap(), + diff::Result::Right(s) => writeln!(dumped_string, "+ {}", s).unwrap(), + diff::Result::Both(s, _) => writeln!(dumped_string, " {}", s).unwrap(), + } + } + dumped_string + } + fn check_mir_test_timestamp(&self, test_name: &str, output_file: &Path) { let t = |file| fs::metadata(file).unwrap().modified().unwrap(); let source_file = &self.testpaths.file;