about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-29 17:50:30 +0000
committerbors <bors@rust-lang.org>2020-07-29 17:50:30 +0000
commit8611e526b766ce188dc29bd49bf66ff17764ceea (patch)
tree3271f9e0dbe36f7f37902d93e2b186dbf16c029d
parent6fd4c3f20ff9cc4408400a98dd1c184d924421d7 (diff)
parentf07607f47ab40837c92035e35602731cc80baa81 (diff)
downloadrust-8611e526b766ce188dc29bd49bf66ff17764ceea.tar.gz
rust-8611e526b766ce188dc29bd49bf66ff17764ceea.zip
Auto merge of #74837 - xldenis:mir-dump-crate-file, r=oli-obk
Fix #70767

This PR changes the format of MIR dump filenames to include the crate name rather than `rustc` at the start.

As a result, we can now place mir-opt tests in the same directory as the source files, like with UI tests. I had to make sure that `compiletest` added a bit_width suffix to the expected files when appropriate but otherwise the change is only moving the files to the correct location and ensuring that the `EMIT_MIR` lines are correct.

Fixes #70767
cc @oli-obk
-rw-r--r--Cargo.lock1
-rw-r--r--src/librustc_mir/util/pretty.rs12
-rw-r--r--src/test/mir-opt/address-of.rs4
-rw-r--r--src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir (renamed from src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir)0
-rw-r--r--src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir (renamed from src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir)0
-rw-r--r--src/test/mir-opt/array-index-is-temporary.rs2
-rw-r--r--src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit (renamed from src/test/mir-opt/array-index-is-temporary/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit (renamed from src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir (renamed from src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir)0
-rw-r--r--src/test/mir-opt/basic_assignment.rs2
-rw-r--r--src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir (renamed from src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir)0
-rw-r--r--src/test/mir-opt/box_expr.rs2
-rw-r--r--src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir (renamed from src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/byte_slice.rs2
-rw-r--r--src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit (renamed from src/test/mir-opt/combine_array_len/32bit/rustc.norm2.InstCombine.diff)0
-rw-r--r--src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit (renamed from src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff)0
-rw-r--r--src/test/mir-opt/combine_array_len.rs2
-rw-r--r--src/test/mir-opt/const-promotion-extern-static.rs8
-rw-r--r--src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit (renamed from src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit (renamed from src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_allocation.rs2
-rw-r--r--src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit (renamed from src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit (renamed from src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_allocation2.rs2
-rw-r--r--src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.32bit (renamed from src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.64bit (renamed from src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_allocation3.rs2
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir (renamed from src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff (renamed from src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff)0
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir (renamed from src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir)0
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff (renamed from src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff)0
-rw-r--r--src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/aggregate.rs2
-rw-r--r--src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.32bit (renamed from src/test/mir-opt/const_prop/array_index/32bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit (renamed from src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/array_index.rs2
-rw-r--r--src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/bad_op_div_by_zero/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/bad_op_div_by_zero.rs2
-rw-r--r--src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/bad_op_mod_by_zero/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/bad_op_mod_by_zero.rs2
-rw-r--r--src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.32bit (renamed from src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/32bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit (renamed from src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/64bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs2
-rw-r--r--src/test/mir-opt/const_prop/boolean_identities.rs2
-rw-r--r--src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff (renamed from src/test/mir-opt/const_prop/boolean_identities/rustc.test.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/boxes.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/boxes.rs2
-rw-r--r--src/test/mir-opt/const_prop/cast.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/cast.rs2
-rw-r--r--src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/checked_add.rs2
-rw-r--r--src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs2
-rw-r--r--src/test/mir-opt/const_prop/control-flow-simplification.rs4
-rw-r--r--src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff (renamed from src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir (renamed from src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir)0
-rw-r--r--src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.32bit (renamed from src/test/mir-opt/const_prop/discriminant/32bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit (renamed from src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/discriminant.rs2
-rw-r--r--src/test/mir-opt/const_prop/indirect.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/indirect.rs2
-rw-r--r--src/test/mir-opt/const_prop/issue-66971.rs2
-rw-r--r--src/test/mir-opt/const_prop/issue-67019.rs2
-rw-r--r--src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mult_by_zero.rs2
-rw-r--r--src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mult_by_zero/rustc.test.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mutable_variable/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable.rs2
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mutable_variable_aggregate/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate.rs2
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs2
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs2
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mutable_variable_no_prop/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_no_prop.rs2
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/mutable_variable_unprop_assign/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_unprop_assign.rs2
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.32bit (renamed from src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit (renamed from src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.32bit (renamed from src/test/mir-opt/const_prop/optimizes_into_variable/32bit/rustc.main.SimplifyLocals.after.mir)0
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit (renamed from src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir)0
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.rs4
-rw-r--r--src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/read_immutable_static.rs2
-rw-r--r--src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff (renamed from src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff)0
-rw-r--r--src/test/mir-opt/const_prop/ref_deref.rs4
-rw-r--r--src/test/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff (renamed from src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff)0
-rw-r--r--src/test/mir-opt/const_prop/ref_deref_project.rs4
-rw-r--r--src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/reify_fn_ptr.rs2
-rw-r--r--src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.32bit (renamed from src/test/mir-opt/const_prop/repeat/32bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit (renamed from src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/repeat.rs2
-rw-r--r--src/test/mir-opt/const_prop/return_place.add.ConstProp.diff (renamed from src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir (renamed from src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir)0
-rw-r--r--src/test/mir-opt/const_prop/return_place.rs4
-rw-r--r--src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/scalar_literal_propagation/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/scalar_literal_propagation.rs2
-rw-r--r--src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.32bit (renamed from src/test/mir-opt/const_prop/slice_len/32bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit (renamed from src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/slice_len.rs2
-rw-r--r--src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff (renamed from src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff)0
-rw-r--r--src/test/mir-opt/const_prop/switch_int.rs4
-rw-r--r--src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff (renamed from src/test/mir-opt/const_prop/tuple_literal_propagation/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop/tuple_literal_propagation.rs2
-rw-r--r--src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff (renamed from src/test/mir-opt/const_prop_miscompile/rustc.bar.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff (renamed from src/test/mir-opt/const_prop_miscompile/rustc.foo.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/const_prop_miscompile.rs4
-rw-r--r--src/test/mir-opt/copy_propagation.rs2
-rw-r--r--src/test/mir-opt/copy_propagation.test.CopyPropagation.diff (renamed from src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff)0
-rw-r--r--src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff (renamed from src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff)0
-rw-r--r--src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff (renamed from src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff)0
-rw-r--r--src/test/mir-opt/copy_propagation_arg.baz.CopyPropagation.diff (renamed from src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff)0
-rw-r--r--src/test/mir-opt/copy_propagation_arg.foo.CopyPropagation.diff (renamed from src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff)0
-rw-r--r--src/test/mir-opt/copy_propagation_arg.rs8
-rw-r--r--src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff (renamed from src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff)0
-rw-r--r--src/test/mir-opt/deaggregator_test.rs2
-rw-r--r--src/test/mir-opt/deaggregator_test_enum.bar.Deaggregator.diff (renamed from src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff)0
-rw-r--r--src/test/mir-opt/deaggregator_test_enum.rs2
-rw-r--r--src/test/mir-opt/deaggregator_test_enum_2.rs2
-rw-r--r--src/test/mir-opt/deaggregator_test_enum_2.test1.Deaggregator.diff (renamed from src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff)0
-rw-r--r--src/test/mir-opt/deaggregator_test_multiple.rs2
-rw-r--r--src/test/mir-opt/deaggregator_test_multiple.test.Deaggregator.diff (renamed from src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff)0
-rw-r--r--src/test/mir-opt/exponential-or.rs2
-rw-r--r--src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir (renamed from src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir)0
-rw-r--r--src/test/mir-opt/fn-ptr-shim.rs2
-rw-r--r--src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir (renamed from src/test/mir-opt/fn-ptr-shim/rustc.ops-function-Fn-call.AddMovesForPackedDrops.before.mir)0
-rw-r--r--src/test/mir-opt/generator-drop-cleanup.rs2
-rw-r--r--src/test/mir-opt/generator-storage-dead-unwind.rs2
-rw-r--r--src/test/mir-opt/generator-tiny.rs2
-rw-r--r--src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir (renamed from src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir)0
-rw-r--r--src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir (renamed from src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir)0
-rw-r--r--src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir (renamed from src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir)0
-rw-r--r--src/test/mir-opt/graphviz.main.mir_map.0.dot (renamed from src/test/mir-opt/graphviz/rustc.main.mir_map.0.dot)0
-rw-r--r--src/test/mir-opt/graphviz.rs2
-rw-r--r--src/test/mir-opt/inline/inline-any-operand.rs2
-rw-r--r--src/test/mir-opt/inline/inline-closure-borrows-arg.rs2
-rw-r--r--src/test/mir-opt/inline/inline-closure-captures.rs2
-rw-r--r--src/test/mir-opt/inline/inline-closure.rs2
-rw-r--r--src/test/mir-opt/inline/inline-into-box-place.rs2
-rw-r--r--src/test/mir-opt/inline/inline-retag.rs2
-rw-r--r--src/test/mir-opt/inline/inline-specialization.rs2
-rw-r--r--src/test/mir-opt/inline/inline-trait-method.rs2
-rw-r--r--src/test/mir-opt/inline/inline-trait-method_2.rs2
-rw-r--r--src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit (renamed from src/test/mir-opt/inline/inline-into-box-place/32bit/rustc.main.Inline.diff)0
-rw-r--r--src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit (renamed from src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff)0
-rw-r--r--src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/inline_specialization.main.Inline.diff (renamed from src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff)0
-rw-r--r--src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir (renamed from src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs8
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir (renamed from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir (renamed from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir (renamed from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.c.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir (renamed from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir)0
-rw-r--r--src/test/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff (renamed from src/test/mir-opt/instrument_coverage/rustc.bar.InstrumentCoverage.diff)10
-rw-r--r--src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff (renamed from src/test/mir-opt/instrument_coverage/rustc.main.InstrumentCoverage.diff)10
-rw-r--r--src/test/mir-opt/instrument_coverage.rs4
-rw-r--r--src/test/mir-opt/issue-38669.rs2
-rw-r--r--src/test/mir-opt/issue-41110.rs4
-rw-r--r--src/test/mir-opt/issue-41697.rs2
-rw-r--r--src/test/mir-opt/issue-41888.rs2
-rw-r--r--src/test/mir-opt/issue-49232.rs2
-rw-r--r--src/test/mir-opt/issue-62289.rs2
-rw-r--r--src/test/mir-opt/issue-72181-1.rs4
-rw-r--r--src/test/mir-opt/issue-72181.rs6
-rw-r--r--src/test/mir-opt/issue-72181/rustc.bar.mir_map.0.mir25
-rw-r--r--src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir37
-rw-r--r--src/test/mir-opt/issue-72181/rustc.main.mir_map.0.mir93
-rw-r--r--src/test/mir-opt/issue-73223.rs4
-rw-r--r--src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir (renamed from src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir)0
-rw-r--r--src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir (renamed from src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir)0
-rw-r--r--src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir (renamed from src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir)0
-rw-r--r--src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.32bit (renamed from src/test/mir-opt/issue-41697/32bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir)0
-rw-r--r--src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit (renamed from src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir)0
-rw-r--r--src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir (renamed from src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir)0
-rw-r--r--src/test/mir-opt/issue_49232.main.mir_map.0.mir (renamed from src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir (renamed from src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir)0
-rw-r--r--src/test/mir-opt/issue_72181.bar.mir_map.0.mir.32bit (renamed from src/test/mir-opt/issue-72181/32bit/rustc.bar.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181.bar.mir_map.0.mir.64bit (renamed from src/test/mir-opt/issue-72181/64bit/rustc.bar.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181.foo.mir_map.0.mir.32bit (renamed from src/test/mir-opt/issue-72181/32bit/rustc.foo.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit (renamed from src/test/mir-opt/issue-72181/64bit/rustc.foo.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181.main.mir_map.0.mir.32bit (renamed from src/test/mir-opt/issue-72181/32bit/rustc.main.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit (renamed from src/test/mir-opt/issue-72181/64bit/rustc.main.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181_1.f.mir_map.0.mir (renamed from src/test/mir-opt/issue-72181-1/rustc.f.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_72181_1.main.mir_map.0.mir (renamed from src/test/mir-opt/issue-72181-1/rustc.main.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit (renamed from src/test/mir-opt/issue-73223/32bit/rustc.main.PreCodegen.diff)0
-rw-r--r--src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit (renamed from src/test/mir-opt/issue-73223/64bit/rustc.main.PreCodegen.diff)0
-rw-r--r--src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit (renamed from src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit (renamed from src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir (renamed from src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir)0
-rw-r--r--src/test/mir-opt/loop_test.rs2
-rw-r--r--src/test/mir-opt/match-arm-scopes.rs2
-rw-r--r--src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff (renamed from src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff)0
-rw-r--r--src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir (renamed from src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir)0
-rw-r--r--src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir (renamed from src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir)0
-rw-r--r--src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir (renamed from src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir)0
-rw-r--r--src/test/mir-opt/match_false_edges.rs6
-rw-r--r--src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir (renamed from src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir)0
-rw-r--r--src/test/mir-opt/match_test.rs2
-rw-r--r--src/test/mir-opt/nll/named-lifetimes-basic.rs2
-rw-r--r--src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir (renamed from src/test/mir-opt/nll/named-lifetimes-basic/rustc.use_x.nll.0.mir)0
-rw-r--r--src/test/mir-opt/nll/region-subtyping-basic.rs2
-rw-r--r--src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.32bit (renamed from src/test/mir-opt/nll/region-subtyping-basic/32bit/rustc.main.nll.0.mir)0
-rw-r--r--src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit (renamed from src/test/mir-opt/nll/region-subtyping-basic/64bit/rustc.main.nll.0.mir)0
-rw-r--r--src/test/mir-opt/no-drop-for-inactive-variant.rs2
-rw-r--r--src/test/mir-opt/no-spurious-drop-after-call.rs2
-rw-r--r--src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir (renamed from src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir (renamed from src/test/mir-opt/no-spurious-drop-after-call/rustc.main.ElaborateDrops.before.mir)0
-rw-r--r--src/test/mir-opt/nrvo-simple.rs2
-rw-r--r--src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff (renamed from src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff)0
-rw-r--r--src/test/mir-opt/packed-struct-drop-aligned.rs2
-rw-r--r--src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.32bit (renamed from src/test/mir-opt/packed-struct-drop-aligned/32bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit (renamed from src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/remove-never-const.rs2
-rw-r--r--src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff (renamed from src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff)0
-rw-r--r--src/test/mir-opt/remove_fake_borrows.rs2
-rw-r--r--src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir (renamed from src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir)0
-rw-r--r--src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir (renamed from src/test/mir-opt/retag/rustc.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir)0
-rw-r--r--src/test/mir-opt/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir (renamed from src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir (renamed from src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/retag.rs10
-rw-r--r--src/test/mir-opt/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir (renamed from src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir (renamed from src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir)0
-rw-r--r--src/test/mir-opt/simple-match.rs2
-rw-r--r--src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.32bit (renamed from src/test/mir-opt/simple-match/32bit/rustc.match_bool.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit (renamed from src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/simplify-arm-identity.rs2
-rw-r--r--src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff70
-rw-r--r--src/test/mir-opt/simplify-arm.rs12
-rw-r--r--src/test/mir-opt/simplify-locals-fixedpoint.rs2
-rw-r--r--src/test/mir-opt/simplify-locals-removes-unused-consts.rs2
-rw-r--r--src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs2
-rw-r--r--src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff (renamed from src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff (renamed from src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff (renamed from src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff (renamed from src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff (renamed from src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff (renamed from src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyBranchSame.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.32bit (renamed from src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit (renamed from src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff (renamed from src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff)0
-rw-r--r--src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff (renamed from src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff)0
-rw-r--r--src/test/mir-opt/simplify_cfg.rs4
-rw-r--r--src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff (renamed from src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff)0
-rw-r--r--src/test/mir-opt/simplify_if.rs2
-rw-r--r--src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff (renamed from src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff)0
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff (renamed from src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff)0
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit (renamed from src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/32bit/rustc.map.SimplifyLocals.diff)0
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit (renamed from src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/64bit/rustc.map.SimplifyLocals.diff)0
-rw-r--r--src/test/mir-opt/simplify_match.main.ConstProp.diff (renamed from src/test/mir-opt/simplify_match/rustc.main.ConstProp.diff)0
-rw-r--r--src/test/mir-opt/simplify_match.rs2
-rw-r--r--src/test/mir-opt/simplify_try.rs6
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff (renamed from src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir (renamed from src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir)0
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir (renamed from src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir)0
-rw-r--r--src/test/mir-opt/simplify_try_if_let.rs2
-rw-r--r--src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff (renamed from src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff)0
-rw-r--r--src/test/mir-opt/slice-drop-shim.rs2
-rw-r--r--src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit (renamed from src/test/mir-opt/slice-drop-shim/32bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir)0
-rw-r--r--src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit (renamed from src/test/mir-opt/slice-drop-shim/64bit/rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir)0
-rw-r--r--src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir (renamed from src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/storage_live_dead_in_statics.rs2
-rw-r--r--src/test/mir-opt/storage_ranges.main.nll.0.mir (renamed from src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir)0
-rw-r--r--src/test/mir-opt/storage_ranges.rs2
-rw-r--r--src/test/mir-opt/tls-access.rs2
-rw-r--r--src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir (renamed from src/test/mir-opt/tls-access/rustc.main.SimplifyCfg-final.after.mir)0
-rw-r--r--src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir (renamed from src/test/mir-opt/uniform_array_move_out/rustc.move_out_by_subslice.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir (renamed from src/test/mir-opt/uniform_array_move_out/rustc.move_out_from_end.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/uniform_array_move_out.rs4
-rw-r--r--src/test/mir-opt/uninhabited-enum.rs4
-rw-r--r--src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir (renamed from src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir)0
-rw-r--r--src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir (renamed from src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir)0
-rw-r--r--src/test/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir (renamed from src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir)0
-rw-r--r--src/test/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff (renamed from src/test/mir-opt/uninhabited_enum_branching/rustc.main.UninhabitedEnumBranching.diff)0
-rw-r--r--src/test/mir-opt/uninhabited_enum_branching.rs4
-rw-r--r--src/test/mir-opt/unreachable.main.UnreachablePropagation.diff (renamed from src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff)0
-rw-r--r--src/test/mir-opt/unreachable.rs2
-rw-r--r--src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff (renamed from src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff)0
-rw-r--r--src/test/mir-opt/unreachable_asm.rs2
-rw-r--r--src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff (renamed from src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff)0
-rw-r--r--src/test/mir-opt/unreachable_asm_2.rs2
-rw-r--r--src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff (renamed from src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff)0
-rw-r--r--src/test/mir-opt/unreachable_diverging.rs2
-rw-r--r--src/test/mir-opt/unusual-item-types.rs8
-rw-r--r--src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.32bit (renamed from src/test/mir-opt/unusual-item-types/32bit/rustc.E-V-{{constant}}.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit (renamed from src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.32bit (renamed from src/test/mir-opt/unusual-item-types/32bit/rustc.Test-X-{{constructor}}.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.64bit (renamed from src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit (renamed from src/test/mir-opt/unusual-item-types/32bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit (renamed from src/test/mir-opt/unusual-item-types/64bit/rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.32bit (renamed from src/test/mir-opt/unusual-item-types/32bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit (renamed from src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir)0
-rw-r--r--src/test/mir-opt/while-storage.rs2
-rw-r--r--src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir (renamed from src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir)0
-rw-r--r--src/tools/compiletest/Cargo.toml1
-rw-r--r--src/tools/compiletest/src/runtest.rs76
306 files changed, 225 insertions, 422 deletions
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/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs
index 990bfc064c2..7c985def8e4 100644
--- a/src/librustc_mir/util/pretty.rs
+++ b/src/librustc_mir/util/pretty.rs
@@ -177,6 +177,7 @@ fn dump_path(
     let mut file_path = PathBuf::new();
     file_path.push(Path::new(&tcx.sess.opts.debugging_opts.dump_mir_dir));
 
+    let crate_name = tcx.crate_name(source.def_id().krate);
     let item_name = tcx.def_path(source.def_id()).to_filename_friendly_no_crate();
     // All drop shims have the same DefId, so we have to add the type
     // to get unique file names.
@@ -196,8 +197,15 @@ fn dump_path(
     };
 
     let file_name = format!(
-        "rustc.{}{}{}{}.{}.{}.{}",
-        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.rs b/src/test/mir-opt/address-of.rs
index 6cd14ccf434..c4bea5613e4 100644
--- a/src/test/mir-opt/address-of.rs
+++ b/src/test/mir-opt/address-of.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.address_of_reborrow.SimplifyCfg-initial.after.mir
+// EMIT_MIR address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
 
 fn address_of_reborrow() {
     let y = &[0; 10];
@@ -37,7 +37,7 @@ fn address_of_reborrow() {
 }
 
 // The normal borrows here should be preserved
-// EMIT_MIR rustc.borrow_and_cast.SimplifyCfg-initial.after.mir
+// EMIT_MIR address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
 fn borrow_and_cast(mut x: i32) {
     let p = &x as *const i32;
     let q = &mut x as *const i32;
diff --git a/src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
index 07793b3598f..07793b3598f 100644
--- a/src/test/mir-opt/address-of/rustc.address_of_reborrow.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
diff --git a/src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
index 4a7e8de29ec..4a7e8de29ec 100644
--- a/src/test/mir-opt/address-of/rustc.borrow_and_cast.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
diff --git a/src/test/mir-opt/array-index-is-temporary.rs b/src/test/mir-opt/array-index-is-temporary.rs
index 4667c4f66b2..0e4c486e464 100644
--- a/src/test/mir-opt/array-index-is-temporary.rs
+++ b/src/test/mir-opt/array-index-is-temporary.rs
@@ -8,7 +8,7 @@ unsafe fn foo(z: *mut usize) -> u32 {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
 fn main() {
     let mut x = [42, 43, 44];
     let mut y = 1;
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
index 2a3a18d6c5b..2a3a18d6c5b 100644
--- 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
diff --git a/src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit
index 093c170cf7a..093c170cf7a 100644
--- a/src/test/mir-opt/array-index-is-temporary/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit
diff --git a/src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
index de423cd907a..de423cd907a 100644
--- a/src/test/mir-opt/basic_assignment/rustc.main.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
diff --git a/src/test/mir-opt/basic_assignment.rs b/src/test/mir-opt/basic_assignment.rs
index 17141b6334c..ac350271e9f 100644
--- a/src/test/mir-opt/basic_assignment.rs
+++ b/src/test/mir-opt/basic_assignment.rs
@@ -1,6 +1,6 @@
 // this tests move up progration, which is not yet implemented
 
-// EMIT_MIR rustc.main.SimplifyCfg-initial.after.mir
+// EMIT_MIR basic_assignment.main.SimplifyCfg-initial.after.mir
 
 // Check codegen for assignments (`a = b`) where the left-hand-side is
 // not yet initialized. Assignments tend to be absent in simple code,
diff --git a/src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir
index 259501c7de9..259501c7de9 100644
--- a/src/test/mir-opt/box_expr/rustc.main.ElaborateDrops.before.mir
+++ b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir
diff --git a/src/test/mir-opt/box_expr.rs b/src/test/mir-opt/box_expr.rs
index beaf0baf12c..a214504f6dd 100644
--- a/src/test/mir-opt/box_expr.rs
+++ b/src/test/mir-opt/box_expr.rs
@@ -2,7 +2,7 @@
 
 #![feature(box_syntax)]
 
-// EMIT_MIR rustc.main.ElaborateDrops.before.mir
+// EMIT_MIR box_expr.main.ElaborateDrops.before.mir
 fn main() {
     let x = box S::new();
     drop(x);
diff --git a/src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
index 54e01dceb50..54e01dceb50 100644
--- a/src/test/mir-opt/byte_slice/rustc.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
diff --git a/src/test/mir-opt/byte_slice.rs b/src/test/mir-opt/byte_slice.rs
index 317e96d6f52..48e9c48c120 100644
--- a/src/test/mir-opt/byte_slice.rs
+++ b/src/test/mir-opt/byte_slice.rs
@@ -1,6 +1,6 @@
 // compile-flags: -Z mir-opt-level=0
 
-// EMIT_MIR rustc.main.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
 fn main() {
     let x = b"foo";
     let y = [5u8, b'x'];
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
index 65db967fe5f..65db967fe5f 100644
--- 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
diff --git a/src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit
index 712c4eb230c..712c4eb230c 100644
--- a/src/test/mir-opt/combine_array_len/64bit/rustc.norm2.InstCombine.diff
+++ b/src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit
diff --git a/src/test/mir-opt/combine_array_len.rs b/src/test/mir-opt/combine_array_len.rs
index aa1c7459ea1..93490c14fd6 100644
--- a/src/test/mir-opt/combine_array_len.rs
+++ b/src/test/mir-opt/combine_array_len.rs
@@ -1,5 +1,5 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.norm2.InstCombine.diff
+// EMIT_MIR combine_array_len.norm2.InstCombine.diff
 
 fn norm2(x: [f32; 2]) -> f32 {
     let a = x[0];
diff --git a/src/test/mir-opt/const-promotion-extern-static.rs b/src/test/mir-opt/const-promotion-extern-static.rs
index c9d350a98fd..e63309a9bd2 100644
--- a/src/test/mir-opt/const-promotion-extern-static.rs
+++ b/src/test/mir-opt/const-promotion-extern-static.rs
@@ -4,12 +4,12 @@ extern "C" {
 
 static Y: i32 = 42;
 
-// EMIT_MIR rustc.BAR.PromoteTemps.diff
-// EMIT_MIR rustc.BAR-promoted[0].ConstProp.after.mir
+// EMIT_MIR const_promotion_extern_static.BAR.PromoteTemps.diff
+// EMIT_MIR const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir
 static mut BAR: *const &i32 = [&Y].as_ptr();
 
-// EMIT_MIR rustc.FOO.PromoteTemps.diff
-// EMIT_MIR rustc.FOO-promoted[0].ConstProp.after.mir
+// EMIT_MIR const_promotion_extern_static.FOO.PromoteTemps.diff
+// EMIT_MIR const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir
 static mut FOO: *const &i32 = [unsafe { &X }].as_ptr();
 
 fn main() {}
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
index 30a383fd162..30a383fd162 100644
--- 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
diff --git a/src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit
index 5fa54ae5a58..5fa54ae5a58 100644
--- a/src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir
+++ b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit
diff --git a/src/test/mir-opt/const_allocation.rs b/src/test/mir-opt/const_allocation.rs
index aaf996ee8e1..bb1c48e8e3c 100644
--- a/src/test/mir-opt/const_allocation.rs
+++ b/src/test/mir-opt/const_allocation.rs
@@ -3,7 +3,7 @@
 static FOO: &[(Option<i32>, &[&str])] =
     &[(None, &[]), (None, &["foo", "bar"]), (Some(42), &["meh", "mop", "möp"])];
 
-// EMIT_MIR rustc.main.ConstProp.after.mir
+// EMIT_MIR const_allocation.main.ConstProp.after.mir
 fn main() {
     FOO;
 }
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
index d386d247829..d386d247829 100644
--- 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
diff --git a/src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit
index d7acd0f0f43..d7acd0f0f43 100644
--- a/src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir
+++ b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit
diff --git a/src/test/mir-opt/const_allocation2.rs b/src/test/mir-opt/const_allocation2.rs
index ca61b84c0bc..56839255c0e 100644
--- a/src/test/mir-opt/const_allocation2.rs
+++ b/src/test/mir-opt/const_allocation2.rs
@@ -1,6 +1,6 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
-// EMIT_MIR rustc.main.ConstProp.after.mir
+// EMIT_MIR const_allocation2.main.ConstProp.after.mir
 fn main() {
     FOO;
 }
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
index 39c60ad987a..39c60ad987a 100644
--- 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
diff --git a/src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir b/src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.64bit
index 96024f1c82c..96024f1c82c 100644
--- a/src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir
+++ b/src/test/mir-opt/const_allocation3.main.ConstProp.after.mir.64bit
diff --git a/src/test/mir-opt/const_allocation3.rs b/src/test/mir-opt/const_allocation3.rs
index 73bb58e1a98..2ce289aea3f 100644
--- a/src/test/mir-opt/const_allocation3.rs
+++ b/src/test/mir-opt/const_allocation3.rs
@@ -1,6 +1,6 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
-// EMIT_MIR rustc.main.ConstProp.after.mir
+// EMIT_MIR const_allocation3.main.ConstProp.after.mir
 fn main() {
     FOO;
 }
diff --git a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].ConstProp.after.mir
index 509947071b0..509947071b0 100644
--- a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR-promoted[0].ConstProp.after.mir
+++ b/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/rustc.BAR.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
index 0e0d8ea9063..0e0d8ea9063 100644
--- a/src/test/mir-opt/const-promotion-extern-static/rustc.BAR.PromoteTemps.diff
+++ b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
diff --git a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir b/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].ConstProp.after.mir
index d9c6b4f0029..d9c6b4f0029 100644
--- a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO-promoted[0].ConstProp.after.mir
+++ b/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/rustc.FOO.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
index a885b4d3bae..a885b4d3bae 100644
--- a/src/test/mir-opt/const-promotion-extern-static/rustc.FOO.PromoteTemps.diff
+++ b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
diff --git a/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff
index e84e88b93fc..e84e88b93fc 100644
--- a/src/test/mir-opt/const_prop/aggregate/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/aggregate.rs b/src/test/mir-opt/const_prop/aggregate.rs
index 928ed8265d3..7a3b26a7317 100644
--- a/src/test/mir-opt/const_prop/aggregate.rs
+++ b/src/test/mir-opt/const_prop/aggregate.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR aggregate.main.ConstProp.diff
 fn main() {
     let x = (0, 1, 2).1 + 0;
 }
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
index bbd6c8042f1..bbd6c8042f1 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit
index d9096e5f3f1..d9096e5f3f1 100644
--- a/src/test/mir-opt/const_prop/array_index/64bit/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/array_index.main.ConstProp.diff.64bit
diff --git a/src/test/mir-opt/const_prop/array_index.rs b/src/test/mir-opt/const_prop/array_index.rs
index 9301e6f5d03..2c5254b5deb 100644
--- a/src/test/mir-opt/const_prop/array_index.rs
+++ b/src/test/mir-opt/const_prop/array_index.rs
@@ -1,6 +1,6 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR array_index.main.ConstProp.diff
 fn main() {
     let x: u32 = [0, 1, 2, 3][2];
 }
diff --git a/src/test/mir-opt/const_prop/bad_op_div_by_zero/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_div_by_zero.main.ConstProp.diff
index 4bd4bb0dd7d..4bd4bb0dd7d 100644
--- a/src/test/mir-opt/const_prop/bad_op_div_by_zero/rustc.main.ConstProp.diff
+++ b/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_div_by_zero.rs b/src/test/mir-opt/const_prop/bad_op_div_by_zero.rs
index 0cd1f37c9a7..6f39209b970 100644
--- a/src/test/mir-opt/const_prop/bad_op_div_by_zero.rs
+++ b/src/test/mir-opt/const_prop/bad_op_div_by_zero.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR bad_op_div_by_zero.main.ConstProp.diff
 #[allow(unconditional_panic)]
 fn main() {
     let y = 0;
diff --git a/src/test/mir-opt/const_prop/bad_op_mod_by_zero/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff
index ecd030e32b4..ecd030e32b4 100644
--- a/src/test/mir-opt/const_prop/bad_op_mod_by_zero/rustc.main.ConstProp.diff
+++ b/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_mod_by_zero.rs b/src/test/mir-opt/const_prop/bad_op_mod_by_zero.rs
index 26bccbb90ec..cc16a4a5aa7 100644
--- a/src/test/mir-opt/const_prop/bad_op_mod_by_zero.rs
+++ b/src/test/mir-opt/const_prop/bad_op_mod_by_zero.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
 #[allow(unconditional_panic)]
 fn main() {
     let y = 0;
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
index 2b5010759d7..2b5010759d7 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.diff.64bit
index 301aaf29247..301aaf29247 100644
--- a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices/64bit/rustc.main.ConstProp.diff
+++ b/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/bad_op_unsafe_oob_for_slices.rs b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
index e517e467c37..cf22b06d5e5 100644
--- a/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
+++ b/src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
@@ -1,5 +1,5 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR bad_op_unsafe_oob_for_slices.main.ConstProp.diff
 #[allow(unconditional_panic)]
 fn main() {
     let a: *const [_] = &[1, 2, 3];
diff --git a/src/test/mir-opt/const_prop/boolean_identities.rs b/src/test/mir-opt/const_prop/boolean_identities.rs
index 4e09acbaa53..6dae07dfbd1 100644
--- a/src/test/mir-opt/const_prop/boolean_identities.rs
+++ b/src/test/mir-opt/const_prop/boolean_identities.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O -Zmir-opt-level=3
 
-// EMIT_MIR rustc.test.ConstProp.diff
+// EMIT_MIR boolean_identities.test.ConstProp.diff
 pub fn test(x: bool, y: bool) -> bool {
     (y | true) & (x & false)
 }
diff --git a/src/test/mir-opt/const_prop/boolean_identities/rustc.test.ConstProp.diff b/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff
index b8f0ad4d434..b8f0ad4d434 100644
--- a/src/test/mir-opt/const_prop/boolean_identities/rustc.test.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/boolean_identities.test.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff
index f271188ebfd..f271188ebfd 100644
--- a/src/test/mir-opt/const_prop/boxes/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/boxes.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/boxes.rs b/src/test/mir-opt/const_prop/boxes.rs
index d45804ebb6c..fea666a4455 100644
--- a/src/test/mir-opt/const_prop/boxes.rs
+++ b/src/test/mir-opt/const_prop/boxes.rs
@@ -7,7 +7,7 @@
 
 // Note: this test verifies that we, in fact, do not const prop `box`
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR boxes.main.ConstProp.diff
 fn main() {
     let x = *(box 42) + 0;
 }
diff --git a/src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/cast.main.ConstProp.diff
index 54af804d19b..54af804d19b 100644
--- a/src/test/mir-opt/const_prop/cast/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/cast.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/cast.rs b/src/test/mir-opt/const_prop/cast.rs
index 2af5f32a668..680cab00740 100644
--- a/src/test/mir-opt/const_prop/cast.rs
+++ b/src/test/mir-opt/const_prop/cast.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR cast.main.ConstProp.diff
 
 fn main() {
     let x = 42u8 as u32;
diff --git a/src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff
index e3690d71294..e3690d71294 100644
--- a/src/test/mir-opt/const_prop/checked_add/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/checked_add.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/checked_add.rs b/src/test/mir-opt/const_prop/checked_add.rs
index 439bd2df91f..08d59b6fbc3 100644
--- a/src/test/mir-opt/const_prop/checked_add.rs
+++ b/src/test/mir-opt/const_prop/checked_add.rs
@@ -1,6 +1,6 @@
 // compile-flags: -C overflow-checks=on
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR checked_add.main.ConstProp.diff
 fn main() {
     let x: u32 = 1 + 1;
 }
diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff
index f3efef387a3..f3efef387a3 100644
--- a/src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs
index c6c006c0809..8bd68527f37 100644
--- a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs
+++ b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs
@@ -1,7 +1,7 @@
 #[inline(never)]
 fn read(_: usize) { }
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR const_prop_fails_gracefully.main.ConstProp.diff
 fn main() {
     const FOO: &i32 = &1;
     let x = FOO as *const i32 as usize;
diff --git a/src/test/mir-opt/const_prop/control-flow-simplification.rs b/src/test/mir-opt/const_prop/control-flow-simplification.rs
index 1071590dd9e..aa4ce19f620 100644
--- a/src/test/mir-opt/const_prop/control-flow-simplification.rs
+++ b/src/test/mir-opt/const_prop/control-flow-simplification.rs
@@ -6,8 +6,8 @@ trait NeedsDrop:Sized{
 
 impl<This> NeedsDrop for This{}
 
-// EMIT_MIR rustc.hello.ConstProp.diff
-// EMIT_MIR rustc.hello.PreCodegen.before.mir
+// EMIT_MIR control_flow_simplification.hello.ConstProp.diff
+// EMIT_MIR control_flow_simplification.hello.PreCodegen.before.mir
 fn hello<T>(){
     if <bool>::NEEDS {
         panic!()
diff --git a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
index 474b9ffefba..474b9ffefba 100644
--- a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir b/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
index 3569b9897f9..3569b9897f9 100644
--- a/src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.PreCodegen.before.mir
+++ b/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
index 539a16f52dc..539a16f52dc 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit
index 20875448edd..20875448edd 100644
--- a/src/test/mir-opt/const_prop/discriminant/64bit/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/discriminant.main.ConstProp.diff.64bit
diff --git a/src/test/mir-opt/const_prop/discriminant.rs b/src/test/mir-opt/const_prop/discriminant.rs
index 13e8eb3e44e..67538b3c7a5 100644
--- a/src/test/mir-opt/const_prop/discriminant.rs
+++ b/src/test/mir-opt/const_prop/discriminant.rs
@@ -6,7 +6,7 @@
 // Fixing either of those will allow us to const-prop this away.
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR discriminant.main.ConstProp.diff
 fn main() {
     let x = (if let Some(true) = Some(true) { 42 } else { 10 }) + 0;
 }
diff --git a/src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff
index 57906b1cabd..57906b1cabd 100644
--- a/src/test/mir-opt/const_prop/indirect/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/indirect.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/indirect.rs b/src/test/mir-opt/const_prop/indirect.rs
index 961e4447d8b..37217ca8134 100644
--- a/src/test/mir-opt/const_prop/indirect.rs
+++ b/src/test/mir-opt/const_prop/indirect.rs
@@ -1,6 +1,6 @@
 // compile-flags: -C overflow-checks=on
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR indirect.main.ConstProp.diff
 fn main() {
     let x = (2u32 as u8) + 1;
 }
diff --git a/src/test/mir-opt/const_prop/issue-66971.rs b/src/test/mir-opt/const_prop/issue-66971.rs
index 50a1405b77b..986177b5c0a 100644
--- a/src/test/mir-opt/const_prop/issue-66971.rs
+++ b/src/test/mir-opt/const_prop/issue-66971.rs
@@ -11,7 +11,7 @@ fn encode(this: ((), u8, u8)) {
     assert!(this.2 == 0);
 }
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR issue_66971.main.ConstProp.diff
 fn main() {
     encode(((), 0, 0));
 }
diff --git a/src/test/mir-opt/const_prop/issue-67019.rs b/src/test/mir-opt/const_prop/issue-67019.rs
index 3c832eb1344..d277bd5869c 100644
--- a/src/test/mir-opt/const_prop/issue-67019.rs
+++ b/src/test/mir-opt/const_prop/issue-67019.rs
@@ -6,7 +6,7 @@ fn test(this: ((u8, u8),)) {
     assert!((this.0).0 == 1);
 }
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR issue_67019.main.ConstProp.diff
 fn main() {
     test(((1, 2),));
 }
diff --git a/src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff
index 242907b5599..242907b5599 100644
--- a/src/test/mir-opt/const_prop/issue-66971/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff
index d5c1105d7ca..d5c1105d7ca 100644
--- a/src/test/mir-opt/const_prop/issue-67019/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/mult_by_zero.rs b/src/test/mir-opt/const_prop/mult_by_zero.rs
index f40faee3110..1cb50155b5e 100644
--- a/src/test/mir-opt/const_prop/mult_by_zero.rs
+++ b/src/test/mir-opt/const_prop/mult_by_zero.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O -Zmir-opt-level=3
 
-// EMIT_MIR rustc.test.ConstProp.diff
+// EMIT_MIR mult_by_zero.test.ConstProp.diff
 fn test(x : i32) -> i32 {
   x * 0
 }
diff --git a/src/test/mir-opt/const_prop/mult_by_zero/rustc.test.ConstProp.diff b/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff
index 7b36669bf15..7b36669bf15 100644
--- a/src/test/mir-opt/const_prop/mult_by_zero/rustc.test.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/mutable_variable/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff
index 3d4309a8aec..3d4309a8aec 100644
--- a/src/test/mir-opt/const_prop/mutable_variable/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/mutable_variable.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/mutable_variable.rs b/src/test/mir-opt/const_prop/mutable_variable.rs
index b3a2d80fa95..801e7a9fcbb 100644
--- a/src/test/mir-opt/const_prop/mutable_variable.rs
+++ b/src/test/mir-opt/const_prop/mutable_variable.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR mutable_variable.main.ConstProp.diff
 fn main() {
     let mut x = 42;
     x = 99;
diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff
index f581b222c83..f581b222c83 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_aggregate/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate.rs b/src/test/mir-opt/const_prop/mutable_variable_aggregate.rs
index 3c5fb4574b6..e0b4b77bac4 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_aggregate.rs
+++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
 fn main() {
     let mut x = (42, 43);
     x.1 = 99;
diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff
index e78bc31b774..e78bc31b774 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref/rustc.main.ConstProp.diff
+++ b/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_mut_ref.rs b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
index fc13cbf2abd..79ac497c783 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
 fn main() {
     let mut x = (42, 43);
     let z = &mut x;
diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff
index b1a0ab88fcc..b1a0ab88fcc 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read/rustc.main.ConstProp.diff
+++ b/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_aggregate_partial_read.rs b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
index 4f43ec8c947..9bb62b8973c 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
+++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR mutable_variable_aggregate_partial_read.main.ConstProp.diff
 fn main() {
     let mut x: (i32, i32) = foo();
     x.1 = 99;
diff --git a/src/test/mir-opt/const_prop/mutable_variable_no_prop/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff
index 3b72af2d0b9..3b72af2d0b9 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_no_prop/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/mutable_variable_no_prop.rs b/src/test/mir-opt/const_prop/mutable_variable_no_prop.rs
index 8c9cd005096..4126fb3c68c 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_no_prop.rs
+++ b/src/test/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -2,7 +2,7 @@
 
 static mut STATIC: u32 = 42;
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
 fn main() {
     let mut x = 42;
     unsafe {
diff --git a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff
index b59b180b07d..b59b180b07d 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.rs
index 40f801b1b5e..13f1b3f47f2 100644
--- a/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/src/test/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
 fn main() {
     let a = foo();
     let mut x: (i32, i32) = (1, 2);
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
index 5312784bc8a..5312784bc8a 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/optimizes_into_variable.main.ConstProp.diff.64bit
index 7af99841366..7af99841366 100644
--- a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.ConstProp.diff
+++ b/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
index 7b74bf81d96..7b74bf81d96 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit
index 7b74bf81d96..7b74bf81d96 100644
--- a/src/test/mir-opt/const_prop/optimizes_into_variable/64bit/rustc.main.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.mir.64bit
diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.rs b/src/test/mir-opt/const_prop/optimizes_into_variable.rs
index 0ae172e777b..17265b7eb85 100644
--- a/src/test/mir-opt/const_prop/optimizes_into_variable.rs
+++ b/src/test/mir-opt/const_prop/optimizes_into_variable.rs
@@ -6,8 +6,8 @@ struct Point {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.ConstProp.diff
-// EMIT_MIR rustc.main.SimplifyLocals.after.mir
+// EMIT_MIR optimizes_into_variable.main.ConstProp.diff
+// EMIT_MIR optimizes_into_variable.main.SimplifyLocals.after.mir
 fn main() {
     let x = 2 + 2;
     let y = [0, 1, 2, 3, 4, 5][3];
diff --git a/src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff
index 36edfc42b9a..36edfc42b9a 100644
--- a/src/test/mir-opt/const_prop/read_immutable_static/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/read_immutable_static.rs b/src/test/mir-opt/const_prop/read_immutable_static.rs
index 9635f7050a6..8a5f12c6f3d 100644
--- a/src/test/mir-opt/const_prop/read_immutable_static.rs
+++ b/src/test/mir-opt/const_prop/read_immutable_static.rs
@@ -2,7 +2,7 @@
 
 static FOO: u8 = 2;
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR read_immutable_static.main.ConstProp.diff
 fn main() {
     let x = FOO + FOO;
 }
diff --git a/src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff
index ba5ac8d3ddf..ba5ac8d3ddf 100644
--- a/src/test/mir-opt/const_prop/ref_deref/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff
index fa68eb34818..fa68eb34818 100644
--- a/src/test/mir-opt/const_prop/ref_deref/rustc.main.PromoteTemps.diff
+++ b/src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff
diff --git a/src/test/mir-opt/const_prop/ref_deref.rs b/src/test/mir-opt/const_prop/ref_deref.rs
index fc33e0e1f3b..30ec9766367 100644
--- a/src/test/mir-opt/const_prop/ref_deref.rs
+++ b/src/test/mir-opt/const_prop/ref_deref.rs
@@ -1,5 +1,5 @@
-// EMIT_MIR rustc.main.PromoteTemps.diff
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR ref_deref.main.PromoteTemps.diff
+// EMIT_MIR ref_deref.main.ConstProp.diff
 
 fn main() {
     *(&4);
diff --git a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff
index 483e5f1b9a4..483e5f1b9a4 100644
--- a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff b/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff
index 86e6aacab45..86e6aacab45 100644
--- a/src/test/mir-opt/const_prop/ref_deref_project/rustc.main.PromoteTemps.diff
+++ b/src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff
diff --git a/src/test/mir-opt/const_prop/ref_deref_project.rs b/src/test/mir-opt/const_prop/ref_deref_project.rs
index 0322e300643..c7cc73651f6 100644
--- a/src/test/mir-opt/const_prop/ref_deref_project.rs
+++ b/src/test/mir-opt/const_prop/ref_deref_project.rs
@@ -1,5 +1,5 @@
-// EMIT_MIR rustc.main.PromoteTemps.diff
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR ref_deref_project.main.PromoteTemps.diff
+// EMIT_MIR ref_deref_project.main.ConstProp.diff
 
 fn main() {
     *(&(4, 5).1); // This does not currently propagate (#67862)
diff --git a/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
index 93fe856c8e8..93fe856c8e8 100644
--- a/src/test/mir-opt/const_prop/reify_fn_ptr/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/reify_fn_ptr.rs b/src/test/mir-opt/const_prop/reify_fn_ptr.rs
index 834eb0cb1e9..bfe2563ad8a 100644
--- a/src/test/mir-opt/const_prop/reify_fn_ptr.rs
+++ b/src/test/mir-opt/const_prop/reify_fn_ptr.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR reify_fn_ptr.main.ConstProp.diff
 
 fn main() {
     let _ = main as usize as *const fn();
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
index c30075bbb05..c30075bbb05 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit
index cadce59cf95..cadce59cf95 100644
--- a/src/test/mir-opt/const_prop/repeat/64bit/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/repeat.main.ConstProp.diff.64bit
diff --git a/src/test/mir-opt/const_prop/repeat.rs b/src/test/mir-opt/const_prop/repeat.rs
index cdbfc46d6ca..36d9b9fc62d 100644
--- a/src/test/mir-opt/const_prop/repeat.rs
+++ b/src/test/mir-opt/const_prop/repeat.rs
@@ -1,7 +1,7 @@
 // compile-flags: -O
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR repeat.main.ConstProp.diff
 fn main() {
     let x: u32 = [42; 8][2] + 0;
 }
diff --git a/src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff b/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff
index 5e39c8e6d52..5e39c8e6d52 100644
--- a/src/test/mir-opt/const_prop/return_place/rustc.add.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/return_place.add.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir b/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir
index 23ad8d057ba..23ad8d057ba 100644
--- a/src/test/mir-opt/const_prop/return_place/rustc.add.PreCodegen.before.mir
+++ b/src/test/mir-opt/const_prop/return_place.add.PreCodegen.before.mir
diff --git a/src/test/mir-opt/const_prop/return_place.rs b/src/test/mir-opt/const_prop/return_place.rs
index 8d5b63b9afd..06a85369679 100644
--- a/src/test/mir-opt/const_prop/return_place.rs
+++ b/src/test/mir-opt/const_prop/return_place.rs
@@ -1,7 +1,7 @@
 // compile-flags: -C overflow-checks=on
 
-// EMIT_MIR rustc.add.ConstProp.diff
-// EMIT_MIR rustc.add.PreCodegen.before.mir
+// EMIT_MIR return_place.add.ConstProp.diff
+// EMIT_MIR return_place.add.PreCodegen.before.mir
 fn add() -> u32 {
     2 + 2
 }
diff --git a/src/test/mir-opt/const_prop/scalar_literal_propagation/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff
index 43e0eb09a2e..43e0eb09a2e 100644
--- a/src/test/mir-opt/const_prop/scalar_literal_propagation/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/scalar_literal_propagation.rs b/src/test/mir-opt/const_prop/scalar_literal_propagation.rs
index a740e69dca2..8724e4d5711 100644
--- a/src/test/mir-opt/const_prop/scalar_literal_propagation.rs
+++ b/src/test/mir-opt/const_prop/scalar_literal_propagation.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
 fn main() {
     let x = 1;
     consume(x);
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
index 0a07a1a11f2..0a07a1a11f2 100644
--- 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
diff --git a/src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit
index f8c6f29e854..f8c6f29e854 100644
--- a/src/test/mir-opt/const_prop/slice_len/64bit/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/slice_len.main.ConstProp.diff.64bit
diff --git a/src/test/mir-opt/const_prop/slice_len.rs b/src/test/mir-opt/const_prop/slice_len.rs
index 0312f5e8e3a..fa9eafa8b0b 100644
--- a/src/test/mir-opt/const_prop/slice_len.rs
+++ b/src/test/mir-opt/const_prop/slice_len.rs
@@ -1,6 +1,6 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR slice_len.main.ConstProp.diff
 fn main() {
     (&[1u32, 2, 3] as &[u32])[1];
 }
diff --git a/src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff
index 9580b99da9e..9580b99da9e 100644
--- a/src/test/mir-opt/const_prop/switch_int/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/switch_int.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff
index 54f37e609ec..54f37e609ec 100644
--- a/src/test/mir-opt/const_prop/switch_int/rustc.main.SimplifyBranches-after-const-prop.diff
+++ b/src/test/mir-opt/const_prop/switch_int.main.SimplifyBranches-after-const-prop.diff
diff --git a/src/test/mir-opt/const_prop/switch_int.rs b/src/test/mir-opt/const_prop/switch_int.rs
index 46e6efb8180..9e7c7340448 100644
--- a/src/test/mir-opt/const_prop/switch_int.rs
+++ b/src/test/mir-opt/const_prop/switch_int.rs
@@ -1,8 +1,8 @@
 #[inline(never)]
 fn foo(_: i32) { }
 
-// EMIT_MIR rustc.main.ConstProp.diff
-// EMIT_MIR rustc.main.SimplifyBranches-after-const-prop.diff
+// EMIT_MIR switch_int.main.ConstProp.diff
+// EMIT_MIR switch_int.main.SimplifyBranches-after-const-prop.diff
 fn main() {
     match 1 {
         1 => foo(0),
diff --git a/src/test/mir-opt/const_prop/tuple_literal_propagation/rustc.main.ConstProp.diff b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff
index 941ec64a3cc..941ec64a3cc 100644
--- a/src/test/mir-opt/const_prop/tuple_literal_propagation/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop/tuple_literal_propagation.rs b/src/test/mir-opt/const_prop/tuple_literal_propagation.rs
index 015607cbab1..e644baec4a8 100644
--- a/src/test/mir-opt/const_prop/tuple_literal_propagation.rs
+++ b/src/test/mir-opt/const_prop/tuple_literal_propagation.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
 fn main() {
     let x = (1, 2);
 
diff --git a/src/test/mir-opt/const_prop_miscompile/rustc.bar.ConstProp.diff b/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff
index 5fe35b479c1..5fe35b479c1 100644
--- a/src/test/mir-opt/const_prop_miscompile/rustc.bar.ConstProp.diff
+++ b/src/test/mir-opt/const_prop_miscompile.bar.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop_miscompile/rustc.foo.ConstProp.diff b/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff
index 98e9825c1c4..98e9825c1c4 100644
--- a/src/test/mir-opt/const_prop_miscompile/rustc.foo.ConstProp.diff
+++ b/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff
diff --git a/src/test/mir-opt/const_prop_miscompile.rs b/src/test/mir-opt/const_prop_miscompile.rs
index 043b22870f4..bc54556b349 100644
--- a/src/test/mir-opt/const_prop_miscompile.rs
+++ b/src/test/mir-opt/const_prop_miscompile.rs
@@ -1,13 +1,13 @@
 #![feature(raw_ref_op)]
 
-// EMIT_MIR rustc.foo.ConstProp.diff
+// EMIT_MIR const_prop_miscompile.foo.ConstProp.diff
 fn foo() {
     let mut u = (1,);
     *&mut u.0 = 5;
     let y = { u.0 } == 5;
 }
 
-// EMIT_MIR rustc.bar.ConstProp.diff
+// EMIT_MIR const_prop_miscompile.bar.ConstProp.diff
 fn bar() {
     let mut v = (1,);
     unsafe {
diff --git a/src/test/mir-opt/copy_propagation.rs b/src/test/mir-opt/copy_propagation.rs
index b5db5497d48..ee460a488b6 100644
--- a/src/test/mir-opt/copy_propagation.rs
+++ b/src/test/mir-opt/copy_propagation.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.test.CopyPropagation.diff
+// EMIT_MIR copy_propagation.test.CopyPropagation.diff
 
 fn test(x: u32) -> u32 {
     let y = x;
diff --git a/src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff b/src/test/mir-opt/copy_propagation.test.CopyPropagation.diff
index f2838638aca..f2838638aca 100644
--- a/src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff
+++ b/src/test/mir-opt/copy_propagation.test.CopyPropagation.diff
diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff
index 22fbf4e836b..22fbf4e836b 100644
--- a/src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff
+++ b/src/test/mir-opt/copy_propagation_arg.arg_src.CopyPropagation.diff
diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff
index 6953a80a5f0..6953a80a5f0 100644
--- a/src/test/mir-opt/copy_propagation_arg/rustc.bar.CopyPropagation.diff
+++ b/src/test/mir-opt/copy_propagation_arg.bar.CopyPropagation.diff
diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.baz.CopyPropagation.diff
index ee20553f7cc..ee20553f7cc 100644
--- a/src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff
+++ b/src/test/mir-opt/copy_propagation_arg.baz.CopyPropagation.diff
diff --git a/src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff b/src/test/mir-opt/copy_propagation_arg.foo.CopyPropagation.diff
index 33aaa748678..33aaa748678 100644
--- a/src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff
+++ b/src/test/mir-opt/copy_propagation_arg.foo.CopyPropagation.diff
diff --git a/src/test/mir-opt/copy_propagation_arg.rs b/src/test/mir-opt/copy_propagation_arg.rs
index c4858be7f2b..3a00fc58a4e 100644
--- a/src/test/mir-opt/copy_propagation_arg.rs
+++ b/src/test/mir-opt/copy_propagation_arg.rs
@@ -5,25 +5,25 @@ fn dummy(x: u8) -> u8 {
     x
 }
 
-// EMIT_MIR rustc.foo.CopyPropagation.diff
+// EMIT_MIR copy_propagation_arg.foo.CopyPropagation.diff
 fn foo(mut x: u8) {
     // calling `dummy` to make an use of `x` that copyprop cannot eliminate
     x = dummy(x); // this will assign a local to `x`
 }
 
-// EMIT_MIR rustc.bar.CopyPropagation.diff
+// EMIT_MIR copy_propagation_arg.bar.CopyPropagation.diff
 fn bar(mut x: u8) {
     dummy(x);
     x = 5;
 }
 
-// EMIT_MIR rustc.baz.CopyPropagation.diff
+// EMIT_MIR copy_propagation_arg.baz.CopyPropagation.diff
 fn baz(mut x: i32) {
     // self-assignment to a function argument should be eliminated
     x = x;
 }
 
-// EMIT_MIR rustc.arg_src.CopyPropagation.diff
+// EMIT_MIR copy_propagation_arg.arg_src.CopyPropagation.diff
 fn arg_src(mut x: i32) -> i32 {
     let y = x;
     x = 123; // Don't propagate this assignment to `y`
diff --git a/src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff
index 524156e0b92..524156e0b92 100644
--- a/src/test/mir-opt/deaggregator_test/rustc.bar.Deaggregator.diff
+++ b/src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff
diff --git a/src/test/mir-opt/deaggregator_test.rs b/src/test/mir-opt/deaggregator_test.rs
index 9004a631291..342e222431b 100644
--- a/src/test/mir-opt/deaggregator_test.rs
+++ b/src/test/mir-opt/deaggregator_test.rs
@@ -4,7 +4,7 @@ struct Baz {
     z: bool,
 }
 
-// EMIT_MIR rustc.bar.Deaggregator.diff
+// EMIT_MIR deaggregator_test.bar.Deaggregator.diff
 fn bar(a: usize) -> Baz {
     Baz { x: a, y: 0.0, z: false }
 }
diff --git a/src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_enum.bar.Deaggregator.diff
index 5af9a536693..5af9a536693 100644
--- a/src/test/mir-opt/deaggregator_test_enum/rustc.bar.Deaggregator.diff
+++ b/src/test/mir-opt/deaggregator_test_enum.bar.Deaggregator.diff
diff --git a/src/test/mir-opt/deaggregator_test_enum.rs b/src/test/mir-opt/deaggregator_test_enum.rs
index e74eafd011f..02b63a1f55d 100644
--- a/src/test/mir-opt/deaggregator_test_enum.rs
+++ b/src/test/mir-opt/deaggregator_test_enum.rs
@@ -3,7 +3,7 @@ enum Baz {
     Foo { x: usize },
 }
 
-// EMIT_MIR rustc.bar.Deaggregator.diff
+// EMIT_MIR deaggregator_test_enum.bar.Deaggregator.diff
 fn bar(a: usize) -> Baz {
     Baz::Foo { x: a }
 }
diff --git a/src/test/mir-opt/deaggregator_test_enum_2.rs b/src/test/mir-opt/deaggregator_test_enum_2.rs
index d5201ed72a8..489854ff0aa 100644
--- a/src/test/mir-opt/deaggregator_test_enum_2.rs
+++ b/src/test/mir-opt/deaggregator_test_enum_2.rs
@@ -5,7 +5,7 @@ enum Foo {
     B(i32),
 }
 
-// EMIT_MIR rustc.test1.Deaggregator.diff
+// EMIT_MIR deaggregator_test_enum_2.test1.Deaggregator.diff
 fn test1(x: bool, y: i32) -> Foo {
     if x {
         Foo::A(y)
diff --git a/src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_enum_2.test1.Deaggregator.diff
index bf99f7efb4d..bf99f7efb4d 100644
--- a/src/test/mir-opt/deaggregator_test_enum_2/rustc.test1.Deaggregator.diff
+++ b/src/test/mir-opt/deaggregator_test_enum_2.test1.Deaggregator.diff
diff --git a/src/test/mir-opt/deaggregator_test_multiple.rs b/src/test/mir-opt/deaggregator_test_multiple.rs
index 824a970ce2f..9730b9aa8e5 100644
--- a/src/test/mir-opt/deaggregator_test_multiple.rs
+++ b/src/test/mir-opt/deaggregator_test_multiple.rs
@@ -5,7 +5,7 @@ enum Foo {
     B,
 }
 
-// EMIT_MIR rustc.test.Deaggregator.diff
+// EMIT_MIR deaggregator_test_multiple.test.Deaggregator.diff
 fn test(x: i32) -> [Foo; 2] {
     [Foo::A(x), Foo::A(x)]
 }
diff --git a/src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff b/src/test/mir-opt/deaggregator_test_multiple.test.Deaggregator.diff
index f5d8d0607c6..f5d8d0607c6 100644
--- a/src/test/mir-opt/deaggregator_test_multiple/rustc.test.Deaggregator.diff
+++ b/src/test/mir-opt/deaggregator_test_multiple.test.Deaggregator.diff
diff --git a/src/test/mir-opt/exponential-or.rs b/src/test/mir-opt/exponential-or.rs
index 9fce7928f6a..1d6f7b81890 100644
--- a/src/test/mir-opt/exponential-or.rs
+++ b/src/test/mir-opt/exponential-or.rs
@@ -2,7 +2,7 @@
 
 #![feature(or_patterns)]
 
-// EMIT_MIR rustc.match_tuple.SimplifyCfg-initial.after.mir
+// EMIT_MIR exponential_or.match_tuple.SimplifyCfg-initial.after.mir
 fn match_tuple(x: (u32, bool, Option<i32>, u32)) -> u32 {
     match x {
         (y @ (1 | 4), true | false, Some(1 | 8) | None, z @ (6..=9 | 13..=16)) => y ^ z,
diff --git a/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
index 00942cd12b4..00942cd12b4 100644
--- a/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
diff --git a/src/test/mir-opt/fn-ptr-shim.rs b/src/test/mir-opt/fn-ptr-shim.rs
index 08413c9f6fc..796bec0be1e 100644
--- a/src/test/mir-opt/fn-ptr-shim.rs
+++ b/src/test/mir-opt/fn-ptr-shim.rs
@@ -3,7 +3,7 @@
 // Tests that the `<fn() as Fn>` shim does not create a `Call` terminator with a `Self` callee
 // (as only `FnDef` and `FnPtr` callees are allowed in MIR).
 
-// EMIT_MIR rustc.ops-function-Fn-call.AddMovesForPackedDrops.before.mir
+// EMIT_MIR core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir
 fn main() {
     call(noop as fn());
 }
diff --git a/src/test/mir-opt/fn-ptr-shim/rustc.ops-function-Fn-call.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir
index 199cbcf8375..199cbcf8375 100644
--- a/src/test/mir-opt/fn-ptr-shim/rustc.ops-function-Fn-call.AddMovesForPackedDrops.before.mir
+++ b/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.rs b/src/test/mir-opt/generator-drop-cleanup.rs
index 3e9707c6491..f4fc2aec706 100644
--- a/src/test/mir-opt/generator-drop-cleanup.rs
+++ b/src/test/mir-opt/generator-drop-cleanup.rs
@@ -5,7 +5,7 @@
 // Regression test for #58892, generator drop shims should not have blocks
 // spuriously marked as cleanup
 
-// EMIT_MIR rustc.main-{{closure}}.generator_drop.0.mir
+// EMIT_MIR generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir
 fn main() {
     let gen = || {
         let _s = String::new();
diff --git a/src/test/mir-opt/generator-storage-dead-unwind.rs b/src/test/mir-opt/generator-storage-dead-unwind.rs
index abfb39c77d6..ae9faaefdd5 100644
--- a/src/test/mir-opt/generator-storage-dead-unwind.rs
+++ b/src/test/mir-opt/generator-storage-dead-unwind.rs
@@ -17,7 +17,7 @@ struct Bar(i32);
 
 fn take<T>(_x: T) {}
 
-// EMIT_MIR rustc.main-{{closure}}.StateTransform.before.mir
+// EMIT_MIR generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir
 fn main() {
     let _gen = || {
         let a = Foo(5);
diff --git a/src/test/mir-opt/generator-tiny.rs b/src/test/mir-opt/generator-tiny.rs
index c86e2865ca8..0e79f16255b 100644
--- a/src/test/mir-opt/generator-tiny.rs
+++ b/src/test/mir-opt/generator-tiny.rs
@@ -14,7 +14,7 @@ impl Drop for HasDrop {
 
 fn callee() {}
 
-// EMIT_MIR rustc.main-{{closure}}.generator_resume.0.mir
+// EMIT_MIR generator_tiny.main-{{closure}}.generator_resume.0.mir
 fn main() {
     let _gen = |_x: u8| {
         let _d = HasDrop;
diff --git a/src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir b/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir
index bd64a31663a..bd64a31663a 100644
--- a/src/test/mir-opt/generator-drop-cleanup/rustc.main-{{closure}}.generator_drop.0.mir
+++ b/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir
diff --git a/src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir b/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir
index 7dcfda32ca4..7dcfda32ca4 100644
--- a/src/test/mir-opt/generator-storage-dead-unwind/rustc.main-{{closure}}.StateTransform.before.mir
+++ b/src/test/mir-opt/generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir
diff --git a/src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir b/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir
index 8776e5919bd..8776e5919bd 100644
--- a/src/test/mir-opt/generator-tiny/rustc.main-{{closure}}.generator_resume.0.mir
+++ b/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir
diff --git a/src/test/mir-opt/graphviz/rustc.main.mir_map.0.dot b/src/test/mir-opt/graphviz.main.mir_map.0.dot
index f5d8b84812a..f5d8b84812a 100644
--- a/src/test/mir-opt/graphviz/rustc.main.mir_map.0.dot
+++ b/src/test/mir-opt/graphviz.main.mir_map.0.dot
diff --git a/src/test/mir-opt/graphviz.rs b/src/test/mir-opt/graphviz.rs
index b1c0f0dd3c8..074dba2c373 100644
--- a/src/test/mir-opt/graphviz.rs
+++ b/src/test/mir-opt/graphviz.rs
@@ -1,5 +1,5 @@
 // Test graphviz output
 // compile-flags: -Z dump-mir-graphviz
 
-// EMIT_MIR rustc.main.mir_map.0.dot
+// EMIT_MIR graphviz.main.mir_map.0.dot
 fn main() {}
diff --git a/src/test/mir-opt/inline/inline-any-operand.rs b/src/test/mir-opt/inline/inline-any-operand.rs
index 2edde12d72e..fb0de020f73 100644
--- a/src/test/mir-opt/inline/inline-any-operand.rs
+++ b/src/test/mir-opt/inline/inline-any-operand.rs
@@ -6,7 +6,7 @@ fn main() {
     println!("{}", bar());
 }
 
-// EMIT_MIR rustc.bar.Inline.after.mir
+// EMIT_MIR inline_any_operand.bar.Inline.after.mir
 fn bar() -> bool {
     let f = foo;
     f(1, -1)
diff --git a/src/test/mir-opt/inline/inline-closure-borrows-arg.rs b/src/test/mir-opt/inline/inline-closure-borrows-arg.rs
index a82a91945d8..218bc3553a1 100644
--- a/src/test/mir-opt/inline/inline-closure-borrows-arg.rs
+++ b/src/test/mir-opt/inline/inline-closure-borrows-arg.rs
@@ -7,7 +7,7 @@ fn main() {
     println!("{}", foo(0, &14));
 }
 
-// EMIT_MIR rustc.foo.Inline.after.mir
+// EMIT_MIR inline_closure_borrows_arg.foo.Inline.after.mir
 fn foo<T: Copy>(_t: T, q: &i32) -> i32 {
     let x = |r: &i32, _s: &i32| {
         let variable = &*r;
diff --git a/src/test/mir-opt/inline/inline-closure-captures.rs b/src/test/mir-opt/inline/inline-closure-captures.rs
index 4a0aad9b0e6..52b6817e401 100644
--- a/src/test/mir-opt/inline/inline-closure-captures.rs
+++ b/src/test/mir-opt/inline/inline-closure-captures.rs
@@ -6,7 +6,7 @@ fn main() {
     println!("{:?}", foo(0, 14));
 }
 
-// EMIT_MIR rustc.foo.Inline.after.mir
+// EMIT_MIR inline_closure_captures.foo.Inline.after.mir
 fn foo<T: Copy>(t: T, q: i32) -> (i32, T) {
     let x = |_q| (q, t);
     x(q)
diff --git a/src/test/mir-opt/inline/inline-closure.rs b/src/test/mir-opt/inline/inline-closure.rs
index 77e424a2bb3..715fd0138a7 100644
--- a/src/test/mir-opt/inline/inline-closure.rs
+++ b/src/test/mir-opt/inline/inline-closure.rs
@@ -6,7 +6,7 @@ fn main() {
     println!("{}", foo(0, 14));
 }
 
-// EMIT_MIR rustc.foo.Inline.after.mir
+// EMIT_MIR inline_closure.foo.Inline.after.mir
 fn foo<T: Copy>(_t: T, q: i32) -> i32 {
     let x = |_t, _q| _t;
     x(q, q)
diff --git a/src/test/mir-opt/inline/inline-into-box-place.rs b/src/test/mir-opt/inline/inline-into-box-place.rs
index 77834e9661c..30c9a5d6b8f 100644
--- a/src/test/mir-opt/inline/inline-into-box-place.rs
+++ b/src/test/mir-opt/inline/inline-into-box-place.rs
@@ -3,7 +3,7 @@
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 #![feature(box_syntax)]
 
-// EMIT_MIR rustc.main.Inline.diff
+// EMIT_MIR inline_into_box_place.main.Inline.diff
 fn main() {
     let _x: Box<Vec<u32>> = box Vec::new();
 }
diff --git a/src/test/mir-opt/inline/inline-retag.rs b/src/test/mir-opt/inline/inline-retag.rs
index d7e425ec658..c6950f26925 100644
--- a/src/test/mir-opt/inline/inline-retag.rs
+++ b/src/test/mir-opt/inline/inline-retag.rs
@@ -6,7 +6,7 @@ fn main() {
     println!("{}", bar());
 }
 
-// EMIT_MIR rustc.bar.Inline.after.mir
+// EMIT_MIR inline_retag.bar.Inline.after.mir
 fn bar() -> bool {
     let f = foo;
     f(&1, &-1)
diff --git a/src/test/mir-opt/inline/inline-specialization.rs b/src/test/mir-opt/inline/inline-specialization.rs
index fcdaca460a9..87275b4e514 100644
--- a/src/test/mir-opt/inline/inline-specialization.rs
+++ b/src/test/mir-opt/inline/inline-specialization.rs
@@ -1,6 +1,6 @@
 #![feature(specialization)]
 
-// EMIT_MIR rustc.main.Inline.diff
+// EMIT_MIR inline_specialization.main.Inline.diff
 fn main() {
     let x = <Vec::<()> as Foo>::bar();
 }
diff --git a/src/test/mir-opt/inline/inline-trait-method.rs b/src/test/mir-opt/inline/inline-trait-method.rs
index cb3db9b5592..74be53f5512 100644
--- a/src/test/mir-opt/inline/inline-trait-method.rs
+++ b/src/test/mir-opt/inline/inline-trait-method.rs
@@ -4,7 +4,7 @@ fn main() {
     println!("{}", test(&()));
 }
 
-// EMIT_MIR rustc.test.Inline.after.mir
+// EMIT_MIR inline_trait_method.test.Inline.after.mir
 fn test(x: &dyn X) -> u32 {
     x.y()
 }
diff --git a/src/test/mir-opt/inline/inline-trait-method_2.rs b/src/test/mir-opt/inline/inline-trait-method_2.rs
index e37f091c5cd..6e5de8315a1 100644
--- a/src/test/mir-opt/inline/inline-trait-method_2.rs
+++ b/src/test/mir-opt/inline/inline-trait-method_2.rs
@@ -1,6 +1,6 @@
 // compile-flags: -Z span_free_formats -Z mir-opt-level=3
 
-// EMIT_MIR rustc.test2.Inline.after.mir
+// EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
 fn test2(x: &dyn X) -> bool {
     test(x)
 }
diff --git a/src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir
index c9ff1fe29f5..c9ff1fe29f5 100644
--- a/src/test/mir-opt/inline/inline-any-operand/rustc.bar.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir
diff --git a/src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir
index bd0ec8c7ddb..bd0ec8c7ddb 100644
--- a/src/test/mir-opt/inline/inline-closure/rustc.foo.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir
diff --git a/src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir
index cea3c59a3e4..cea3c59a3e4 100644
--- a/src/test/mir-opt/inline/inline-closure-borrows-arg/rustc.foo.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir
diff --git a/src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir
index eeff914ccff..eeff914ccff 100644
--- a/src/test/mir-opt/inline/inline-closure-captures/rustc.foo.Inline.after.mir
+++ b/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
index 855811964b1..855811964b1 100644
--- 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
diff --git a/src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit
index 507e45a445b..507e45a445b 100644
--- a/src/test/mir-opt/inline/inline-into-box-place/64bit/rustc.main.Inline.diff
+++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit
diff --git a/src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir
index d6ac1c57a63..d6ac1c57a63 100644
--- a/src/test/mir-opt/inline/inline-retag/rustc.bar.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir
diff --git a/src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff
index c273c43c429..c273c43c429 100644
--- a/src/test/mir-opt/inline/inline-specialization/rustc.main.Inline.diff
+++ b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff
diff --git a/src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir
index 8acc5ad5c09..8acc5ad5c09 100644
--- a/src/test/mir-opt/inline/inline-trait-method/rustc.test.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir
diff --git a/src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir
index afea1d5ebff..afea1d5ebff 100644
--- a/src/test/mir-opt/inline/inline-trait-method_2/rustc.test2.Inline.after.mir
+++ b/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.rs b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs
index 317705f7612..94f926d3964 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs
+++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs
@@ -1,19 +1,19 @@
-// EMIT_MIR rustc.a.Inline.after.mir
+// EMIT_MIR issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
 pub fn a<T>(x: &mut [T]) -> &mut [T] {
     x.as_mut()
 }
 
-// EMIT_MIR rustc.b.Inline.after.mir
+// EMIT_MIR issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
 pub fn b<T>(x: &mut Box<T>) -> &mut T {
     x.as_mut()
 }
 
-// EMIT_MIR rustc.c.Inline.after.mir
+// EMIT_MIR issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
 pub fn c<T>(x: &[T]) -> &[T] {
     x.as_ref()
 }
 
-// EMIT_MIR rustc.d.Inline.after.mir
+// EMIT_MIR issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
 pub fn d<T>(x: &Box<T>) -> &T {
     x.as_ref()
 }
diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
index 501e3e9cf96..501e3e9cf96 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir
+++ b/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/rustc.b.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
index 6add8d9d75a..6add8d9d75a 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir
+++ b/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/rustc.c.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
index 77492c89379..77492c89379 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.c.Inline.after.mir
+++ b/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/rustc.d.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
index 51bda6d334c..51bda6d334c 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.d.Inline.after.mir
+++ b/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
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(<ZST>))
@@ -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
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(<ZST>))
@@ -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/instrument_coverage.rs b/src/test/mir-opt/instrument_coverage.rs
index 3fe010ef68f..4770ec9b66e 100644
--- a/src/test/mir-opt/instrument_coverage.rs
+++ b/src/test/mir-opt/instrument_coverage.rs
@@ -4,8 +4,8 @@
 
 // needs-profiler-support
 // compile-flags: -Zinstrument-coverage
-// EMIT_MIR rustc.main.InstrumentCoverage.diff
-// EMIT_MIR rustc.bar.InstrumentCoverage.diff
+// EMIT_MIR instrument_coverage.main.InstrumentCoverage.diff
+// EMIT_MIR instrument_coverage.bar.InstrumentCoverage.diff
 fn main() {
     loop {
         if bar() {
diff --git a/src/test/mir-opt/issue-38669.rs b/src/test/mir-opt/issue-38669.rs
index f6883ac8086..db3f89472c9 100644
--- a/src/test/mir-opt/issue-38669.rs
+++ b/src/test/mir-opt/issue-38669.rs
@@ -1,6 +1,6 @@
 // check that we don't StorageDead booleans before they are used
 
-// EMIT_MIR rustc.main.SimplifyCfg-initial.after.mir
+// EMIT_MIR issue_38669.main.SimplifyCfg-initial.after.mir
 fn main() {
     let mut should_break = false;
     loop {
diff --git a/src/test/mir-opt/issue-41110.rs b/src/test/mir-opt/issue-41110.rs
index cc35b8785a7..638dc601ec8 100644
--- a/src/test/mir-opt/issue-41110.rs
+++ b/src/test/mir-opt/issue-41110.rs
@@ -3,14 +3,14 @@
 // check that we don't emit multiple drop flags when they are not needed.
 
 
-// EMIT_MIR rustc.main.ElaborateDrops.after.mir
+// EMIT_MIR issue_41110.main.ElaborateDrops.after.mir
 fn main() {
     let x = S.other(S.id());
 }
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR rustc.test.ElaborateDrops.after.mir
+// EMIT_MIR issue_41110.test.ElaborateDrops.after.mir
 pub fn test() {
     let u = S;
     let mut v = S;
diff --git a/src/test/mir-opt/issue-41697.rs b/src/test/mir-opt/issue-41697.rs
index 07b9d175677..c90cfc792a9 100644
--- a/src/test/mir-opt/issue-41697.rs
+++ b/src/test/mir-opt/issue-41697.rs
@@ -14,7 +14,7 @@ trait Foo {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir
+// EMIT_MIR issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir
 impl Foo for [u8; 1+1] {
     fn get(&self) -> [u8; 2] {
         *self
diff --git a/src/test/mir-opt/issue-41888.rs b/src/test/mir-opt/issue-41888.rs
index 6caaa59d0af..c1046c14dbf 100644
--- a/src/test/mir-opt/issue-41888.rs
+++ b/src/test/mir-opt/issue-41888.rs
@@ -2,7 +2,7 @@
 // check that we clear the "ADT master drop flag" even when there are
 // no fields to be dropped.
 
-// EMIT_MIR rustc.main.ElaborateDrops.after.mir
+// EMIT_MIR issue_41888.main.ElaborateDrops.after.mir
 fn main() {
     let e;
     if cond() {
diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/issue-49232.rs
index 7d308980b90..86494c76aec 100644
--- a/src/test/mir-opt/issue-49232.rs
+++ b/src/test/mir-opt/issue-49232.rs
@@ -1,7 +1,7 @@
 // We must mark a variable whose initialization fails due to an
 // abort statement as StorageDead.
 
-// EMIT_MIR rustc.main.mir_map.0.mir
+// EMIT_MIR issue_49232.main.mir_map.0.mir
 fn main() {
     loop {
         let beacon = {
diff --git a/src/test/mir-opt/issue-62289.rs b/src/test/mir-opt/issue-62289.rs
index f0d57c572b3..37e3390d5fc 100644
--- a/src/test/mir-opt/issue-62289.rs
+++ b/src/test/mir-opt/issue-62289.rs
@@ -4,7 +4,7 @@
 
 #![feature(box_syntax)]
 
-// EMIT_MIR rustc.test.ElaborateDrops.before.mir
+// EMIT_MIR issue_62289.test.ElaborateDrops.before.mir
 fn test() -> Option<Box<u32>> {
     Some(box (None?))
 }
diff --git a/src/test/mir-opt/issue-72181-1.rs b/src/test/mir-opt/issue-72181-1.rs
index 6d65f847a2c..91e98adbe80 100644
--- a/src/test/mir-opt/issue-72181-1.rs
+++ b/src/test/mir-opt/issue-72181-1.rs
@@ -6,12 +6,12 @@
 
 enum Void {}
 
-// EMIT_MIR rustc.f.mir_map.0.mir
+// EMIT_MIR issue_72181_1.f.mir_map.0.mir
 fn f(v: Void) -> ! {
     match v {}
 }
 
-// EMIT_MIR rustc.main.mir_map.0.mir
+// EMIT_MIR issue_72181_1.main.mir_map.0.mir
 fn main() {
     let v: Void = unsafe {
         std::mem::transmute::<(), Void>(())
diff --git a/src/test/mir-opt/issue-72181.rs b/src/test/mir-opt/issue-72181.rs
index 9373ce12032..844d53a4b2b 100644
--- a/src/test/mir-opt/issue-72181.rs
+++ b/src/test/mir-opt/issue-72181.rs
@@ -12,14 +12,14 @@ union Foo {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.foo.mir_map.0.mir
+// EMIT_MIR issue_72181.foo.mir_map.0.mir
 fn foo(xs: [(Never, u32); 1]) -> u32 { xs[0].1 }
 
-// EMIT_MIR rustc.bar.mir_map.0.mir
+// EMIT_MIR issue_72181.bar.mir_map.0.mir
 fn bar([(_, x)]: [(Never, u32); 1]) -> u32 { x }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.mir_map.0.mir
+// EMIT_MIR issue_72181.main.mir_map.0.mir
 fn main() {
     let _ = mem::size_of::<Foo>();
 
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::<Foo>() -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:22:13: 22:34
-                                         // ty::Const
-                                         // + ty: fn() -> usize {std::mem::size_of::<Foo>}
-                                         // + val: Value(Scalar(<ZST>))
-                                         // mir::Constant
-                                         // + span: $DIR/issue-72181.rs:22:13: 22:32
-                                         // + literal: Const { ty: fn() -> usize {std::mem::size_of::<Foo>}, val: Value(Scalar(<ZST>)) }
-    }
-
-    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(<ZST>))
-                                         // mir::Constant
-                                         // + span: $DIR/issue-72181.rs:21:11: 26:2
-                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
-        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-73223.rs b/src/test/mir-opt/issue-73223.rs
index d93805e6cd1..703b8761231 100644
--- a/src/test/mir-opt/issue-73223.rs
+++ b/src/test/mir-opt/issue-73223.rs
@@ -9,5 +9,5 @@ fn main() {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.SimplifyArmIdentity.diff
-// EMIT_MIR rustc.main.PreCodegen.diff
+// EMIT_MIR issue_73223.main.SimplifyArmIdentity.diff
+// EMIT_MIR issue_73223.main.PreCodegen.diff
diff --git a/src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir
index 7b58dc1f624..7b58dc1f624 100644
--- a/src/test/mir-opt/issue-38669/rustc.main.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir
diff --git a/src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir
index 77763f2d3a0..77763f2d3a0 100644
--- a/src/test/mir-opt/issue-41110/rustc.main.ElaborateDrops.after.mir
+++ b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir
diff --git a/src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir
index a99846bd15d..a99846bd15d 100644
--- a/src/test/mir-opt/issue-41110/rustc.test.ElaborateDrops.after.mir
+++ b/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
index 403555964ca..403555964ca 100644
--- 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
diff --git a/src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit
index df933d3ac25..df933d3ac25 100644
--- a/src/test/mir-opt/issue-41697/64bit/rustc.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir
+++ b/src/test/mir-opt/issue_41697.{{impl}}-{{constant}}.SimplifyCfg-qualify-consts.after.mir.64bit
diff --git a/src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir
index 76ad865bcc8..76ad865bcc8 100644
--- a/src/test/mir-opt/issue-41888/rustc.main.ElaborateDrops.after.mir
+++ b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir
diff --git a/src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir b/src/test/mir-opt/issue_49232.main.mir_map.0.mir
index 918dc5ec387..918dc5ec387 100644
--- a/src/test/mir-opt/issue-49232/rustc.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_49232.main.mir_map.0.mir
diff --git a/src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir
index 56916d676ed..56916d676ed 100644
--- a/src/test/mir-opt/issue-62289/rustc.test.ElaborateDrops.before.mir
+++ b/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
index 29654c2b1f8..29654c2b1f8 100644
--- 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
diff --git a/src/test/mir-opt/issue-72181/64bit/rustc.bar.mir_map.0.mir b/src/test/mir-opt/issue_72181.bar.mir_map.0.mir.64bit
index 29654c2b1f8..29654c2b1f8 100644
--- a/src/test/mir-opt/issue-72181/64bit/rustc.bar.mir_map.0.mir
+++ b/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
index 9f8810e752c..9f8810e752c 100644
--- 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
diff --git a/src/test/mir-opt/issue-72181/64bit/rustc.foo.mir_map.0.mir b/src/test/mir-opt/issue_72181.foo.mir_map.0.mir.64bit
index aab8efb415c..aab8efb415c 100644
--- a/src/test/mir-opt/issue-72181/64bit/rustc.foo.mir_map.0.mir
+++ b/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
index e3fb5eb193a..e3fb5eb193a 100644
--- 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
diff --git a/src/test/mir-opt/issue-72181/64bit/rustc.main.mir_map.0.mir b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit
index d9e791b86bc..d9e791b86bc 100644
--- a/src/test/mir-opt/issue-72181/64bit/rustc.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.main.mir_map.0.mir.64bit
diff --git a/src/test/mir-opt/issue-72181-1/rustc.f.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir
index 1821365898e..1821365898e 100644
--- a/src/test/mir-opt/issue-72181-1/rustc.f.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir
diff --git a/src/test/mir-opt/issue-72181-1/rustc.main.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir
index b87d0294fb8..b87d0294fb8 100644
--- a/src/test/mir-opt/issue-72181-1/rustc.main.mir_map.0.mir
+++ b/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
index 4c9da471f0b..4c9da471f0b 100644
--- a/src/test/mir-opt/issue-73223/32bit/rustc.main.PreCodegen.diff
+++ b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit
diff --git a/src/test/mir-opt/issue-73223/64bit/rustc.main.PreCodegen.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit
index 4c9da471f0b..4c9da471f0b 100644
--- a/src/test/mir-opt/issue-73223/64bit/rustc.main.PreCodegen.diff
+++ b/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
index dd0e8f4b2ad..dd0e8f4b2ad 100644
--- a/src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit
diff --git a/src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit
index d465f60f34d..d465f60f34d 100644
--- a/src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit
diff --git a/src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir b/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir
index e699abf421d..e699abf421d 100644
--- a/src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir
+++ b/src/test/mir-opt/loop_test.main.SimplifyCfg-qualify-consts.after.mir
diff --git a/src/test/mir-opt/loop_test.rs b/src/test/mir-opt/loop_test.rs
index cb23a4c671b..5d0c30d4410 100644
--- a/src/test/mir-opt/loop_test.rs
+++ b/src/test/mir-opt/loop_test.rs
@@ -2,7 +2,7 @@
 
 // Tests to make sure we correctly generate falseUnwind edges in loops
 
-// EMIT_MIR rustc.main.SimplifyCfg-qualify-consts.after.mir
+// EMIT_MIR loop_test.main.SimplifyCfg-qualify-consts.after.mir
 fn main() {
     // Exit early at runtime. Since only care about the generated MIR
     // and not the runtime behavior (which is exercised by other tests)
diff --git a/src/test/mir-opt/match-arm-scopes.rs b/src/test/mir-opt/match-arm-scopes.rs
index 2c5816c51e3..7b7de7788c2 100644
--- a/src/test/mir-opt/match-arm-scopes.rs
+++ b/src/test/mir-opt/match-arm-scopes.rs
@@ -9,7 +9,7 @@
 //   all of the bindings for that scope.
 // * No drop flags are used.
 
-// EMIT_MIR rustc.complicated_match SimplifyCfg-initial.after ElaborateDrops.after
+// EMIT_MIR match_arm_scopes.complicated_match SimplifyCfg-initial.after ElaborateDrops.after
 fn complicated_match(cond: bool, items: (bool, bool, String)) -> i32 {
     match items {
         (false, a, s) | (a, false, s) if if cond { return 3 } else { a } => 1,
diff --git a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index 58847e1bcee..58847e1bcee 100644
--- a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/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/rustc.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
index c53c9cf1db7..c53c9cf1db7 100644
--- a/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir
+++ b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
diff --git a/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir
index b79416fe31a..b79416fe31a 100644
--- a/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir
+++ b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir
diff --git a/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir
index 5b449da93d4..5b449da93d4 100644
--- a/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir
+++ b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir
diff --git a/src/test/mir-opt/match_false_edges.rs b/src/test/mir-opt/match_false_edges.rs
index 91f4aad165e..42dea9c7082 100644
--- a/src/test/mir-opt/match_false_edges.rs
+++ b/src/test/mir-opt/match_false_edges.rs
@@ -10,7 +10,7 @@ fn guard2(_: i32) -> bool {
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR rustc.full_tested_match.PromoteTemps.after.mir
+// EMIT_MIR match_false_edges.full_tested_match.PromoteTemps.after.mir
 pub fn full_tested_match() {
     let _ = match Some(42) {
         Some(x) if guard() => (1, x),
@@ -21,7 +21,7 @@ pub fn full_tested_match() {
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR rustc.full_tested_match2.PromoteTemps.before.mir
+// EMIT_MIR match_false_edges.full_tested_match2.PromoteTemps.before.mir
 pub fn full_tested_match2() {
     let _ = match Some(42) {
         Some(x) if guard() => (1, x),
@@ -30,7 +30,7 @@ pub fn full_tested_match2() {
     };
 }
 
-// EMIT_MIR rustc.main.PromoteTemps.before.mir
+// EMIT_MIR match_false_edges.main.PromoteTemps.before.mir
 fn main() {
     let _ = match Some(1) {
         Some(_w) if guard() => 1,
diff --git a/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
index 16895942cb8..16895942cb8 100644
--- a/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
diff --git a/src/test/mir-opt/match_test.rs b/src/test/mir-opt/match_test.rs
index c3b07d42f5e..3a21077905b 100644
--- a/src/test/mir-opt/match_test.rs
+++ b/src/test/mir-opt/match_test.rs
@@ -2,7 +2,7 @@
 
 #![feature(exclusive_range_pattern)]
 
-// EMIT_MIR rustc.main.SimplifyCfg-initial.after.mir
+// EMIT_MIR match_test.main.SimplifyCfg-initial.after.mir
 fn main() {
     let x = 3;
     let b = true;
diff --git a/src/test/mir-opt/nll/named-lifetimes-basic.rs b/src/test/mir-opt/nll/named-lifetimes-basic.rs
index 073ccf7e6c6..73bd6d64e86 100644
--- a/src/test/mir-opt/nll/named-lifetimes-basic.rs
+++ b/src/test/mir-opt/nll/named-lifetimes-basic.rs
@@ -8,7 +8,7 @@
 
 #![allow(warnings)]
 
-// EMIT_MIR rustc.use_x.nll.0.mir
+// EMIT_MIR named_lifetimes_basic.use_x.nll.0.mir
 fn use_x<'a, 'b: 'a, 'c>(w: &'a mut i32, x: &'b u32, y: &'a u32, z: &'c u32) -> bool { true }
 
 fn main() {
diff --git a/src/test/mir-opt/nll/named-lifetimes-basic/rustc.use_x.nll.0.mir b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
index dcfb069b84a..dcfb069b84a 100644
--- a/src/test/mir-opt/nll/named-lifetimes-basic/rustc.use_x.nll.0.mir
+++ b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
diff --git a/src/test/mir-opt/nll/region-subtyping-basic.rs b/src/test/mir-opt/nll/region-subtyping-basic.rs
index 66d7cda2b85..224a495c788 100644
--- a/src/test/mir-opt/nll/region-subtyping-basic.rs
+++ b/src/test/mir-opt/nll/region-subtyping-basic.rs
@@ -12,7 +12,7 @@ fn use_x(_: usize) -> bool {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.nll.0.mir
+// EMIT_MIR region_subtyping_basic.main.nll.0.mir
 fn main() {
     let mut v = [1, 2, 3];
     let p = &v[0];
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
index e3f113fea28..e3f113fea28 100644
--- 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
diff --git a/src/test/mir-opt/nll/region-subtyping-basic/64bit/rustc.main.nll.0.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.mir.64bit
index a69952ff07f..a69952ff07f 100644
--- a/src/test/mir-opt/nll/region-subtyping-basic/64bit/rustc.main.nll.0.mir
+++ b/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.rs b/src/test/mir-opt/no-drop-for-inactive-variant.rs
index cf6426b878a..34e2b1a134f 100644
--- a/src/test/mir-opt/no-drop-for-inactive-variant.rs
+++ b/src/test/mir-opt/no-drop-for-inactive-variant.rs
@@ -3,7 +3,7 @@
 // Ensure that there are no drop terminators in `unwrap<T>` (except the one along the cleanup
 // path).
 
-// EMIT_MIR rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir
 fn unwrap<T>(opt: Option<T>) -> T {
     match opt {
         Some(x) => x,
diff --git a/src/test/mir-opt/no-spurious-drop-after-call.rs b/src/test/mir-opt/no-spurious-drop-after-call.rs
index ab58654e07c..bb5bb9aa4e5 100644
--- a/src/test/mir-opt/no-spurious-drop-after-call.rs
+++ b/src/test/mir-opt/no-spurious-drop-after-call.rs
@@ -4,7 +4,7 @@
 // MIR drop of the argument. (We used to have a `DROP(_2)` in the code
 // below, as part of bb3.)
 
-// EMIT_MIR rustc.main.ElaborateDrops.before.mir
+// EMIT_MIR no_spurious_drop_after_call.main.ElaborateDrops.before.mir
 fn main() {
     std::mem::drop("".to_string());
 }
diff --git a/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir
index f59390ba84e..f59390ba84e 100644
--- a/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir
+++ b/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/rustc.main.ElaborateDrops.before.mir b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir
index 0af213e425f..0af213e425f 100644
--- a/src/test/mir-opt/no-spurious-drop-after-call/rustc.main.ElaborateDrops.before.mir
+++ b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir
diff --git a/src/test/mir-opt/nrvo-simple.rs b/src/test/mir-opt/nrvo-simple.rs
index bf3a0efeada..f0eb711b3f0 100644
--- a/src/test/mir-opt/nrvo-simple.rs
+++ b/src/test/mir-opt/nrvo-simple.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.nrvo.RenameReturnPlace.diff
+// EMIT_MIR nrvo_simple.nrvo.RenameReturnPlace.diff
 fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {
     let mut buf = [0; 1024];
     init(&mut buf);
diff --git a/src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff
index 18fbffb4630..18fbffb4630 100644
--- a/src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff
+++ b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff
diff --git a/src/test/mir-opt/packed-struct-drop-aligned.rs b/src/test/mir-opt/packed-struct-drop-aligned.rs
index daf397c3d9c..6c2e265d514 100644
--- a/src/test/mir-opt/packed-struct-drop-aligned.rs
+++ b/src/test/mir-opt/packed-struct-drop-aligned.rs
@@ -1,7 +1,7 @@
 // ignore-wasm32-bare compiled with panic=abort by default
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.main.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir
 fn main() {
     let mut x = Packed(Aligned(Droppy(0)));
     x.0 = Aligned(Droppy(0));
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
index 075c7647c67..075c7647c67 100644
--- 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
diff --git a/src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit
index 99a74b6b24f..99a74b6b24f 100644
--- a/src/test/mir-opt/packed-struct-drop-aligned/64bit/rustc.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir.64bit
diff --git a/src/test/mir-opt/remove-never-const.rs b/src/test/mir-opt/remove-never-const.rs
index b2d4f14aa4c..1673f14b45c 100644
--- a/src/test/mir-opt/remove-never-const.rs
+++ b/src/test/mir-opt/remove-never-const.rs
@@ -15,7 +15,7 @@ impl<T> PrintName<T> {
     const VOID: ! = panic!();
 }
 
-// EMIT_MIR rustc.no_codegen.PreCodegen.after.mir
+// EMIT_MIR remove_never_const.no_codegen.PreCodegen.after.mir
 fn no_codegen<T>() {
     let _ = PrintName::<T>::VOID;
 }
diff --git a/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
index 0822d8cc03c..0822d8cc03c 100644
--- a/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff
+++ b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
diff --git a/src/test/mir-opt/remove_fake_borrows.rs b/src/test/mir-opt/remove_fake_borrows.rs
index fd2f1d0dbff..a980f386b69 100644
--- a/src/test/mir-opt/remove_fake_borrows.rs
+++ b/src/test/mir-opt/remove_fake_borrows.rs
@@ -2,7 +2,7 @@
 
 // ignore-wasm32-bare compiled with panic=abort by default
 
-// EMIT_MIR rustc.match_guard.CleanupNonCodegenStatements.diff
+// EMIT_MIR remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
 fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
     match x {
         Some(0) if c => 0,
diff --git a/src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir b/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir
index 6f4a024d20f..6f4a024d20f 100644
--- a/src/test/mir-opt/remove-never-const/rustc.no_codegen.PreCodegen.after.mir
+++ b/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir
diff --git a/src/test/mir-opt/retag/rustc.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
index 694c387986f..694c387986f 100644
--- a/src/test/mir-opt/retag/rustc.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
diff --git a/src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir
index 01f5fbb7d23..01f5fbb7d23 100644
--- a/src/test/mir-opt/retag/rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir
diff --git a/src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir
index b61d9368375..b61d9368375 100644
--- a/src/test/mir-opt/retag/rustc.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir
diff --git a/src/test/mir-opt/retag.rs b/src/test/mir-opt/retag.rs
index eba0f567c4a..12d7cb30d97 100644
--- a/src/test/mir-opt/retag.rs
+++ b/src/test/mir-opt/retag.rs
@@ -6,8 +6,8 @@
 
 struct Test(i32);
 
-// EMIT_MIR rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir
-// EMIT_MIR rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
 impl Test {
     // Make sure we run the pass on a method, not just on bare functions.
     fn foo<'x>(&self, x: &'x mut i32) -> &'x mut i32 {
@@ -18,14 +18,14 @@ impl Test {
     }
 }
 
-// EMIT_MIR rustc.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir
+// EMIT_MIR core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir
 
 impl Drop for Test {
     fn drop(&mut self) {}
 }
 
-// EMIT_MIR rustc.main.SimplifyCfg-elaborate-drops.after.mir
-// EMIT_MIR rustc.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR retag.main.SimplifyCfg-elaborate-drops.after.mir
+// EMIT_MIR retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir
 fn main() {
     let mut x = 0;
     {
diff --git a/src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir
index f9ed3932d33..f9ed3932d33 100644
--- a/src/test/mir-opt/retag/rustc.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir
diff --git a/src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
index 87a8603a931..87a8603a931 100644
--- a/src/test/mir-opt/retag/rustc.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
diff --git a/src/test/mir-opt/simple-match.rs b/src/test/mir-opt/simple-match.rs
index c8c7e9188c2..44adc55b6f7 100644
--- a/src/test/mir-opt/simple-match.rs
+++ b/src/test/mir-opt/simple-match.rs
@@ -1,7 +1,7 @@
 // Test that we don't generate unnecessarily large MIR for very simple matches
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.match_bool.mir_map.0.mir
+// EMIT_MIR simple_match.match_bool.mir_map.0.mir
 fn match_bool(x: bool) -> usize {
     match x {
         true => 10,
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
index da3191554f0..da3191554f0 100644
--- 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
diff --git a/src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit
index 55b51a899bc..55b51a899bc 100644
--- a/src/test/mir-opt/simple-match/64bit/rustc.match_bool.mir_map.0.mir
+++ b/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir.64bit
diff --git a/src/test/mir-opt/simplify-arm-identity.rs b/src/test/mir-opt/simplify-arm-identity.rs
index 24e91b3ff61..0a59032e87b 100644
--- a/src/test/mir-opt/simplify-arm-identity.rs
+++ b/src/test/mir-opt/simplify-arm-identity.rs
@@ -13,7 +13,7 @@ enum Dst {
     Foo(u8),
 }
 
-// EMIT_MIR rustc.main.SimplifyArmIdentity.diff
+// EMIT_MIR simplify_arm_identity.main.SimplifyArmIdentity.diff
 fn main() {
     let e: Src = Src::Foo(0);
     let _: Dst = match e {
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(<ZST>))
-                                           // mir::Constant
-                                           // + span: $DIR/simplify-arm-identity.rs:16:11: 22:2
-                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
-          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.rs b/src/test/mir-opt/simplify-arm.rs
index 0e3f86501bb..20b4e67f53b 100644
--- a/src/test/mir-opt/simplify-arm.rs
+++ b/src/test/mir-opt/simplify-arm.rs
@@ -1,10 +1,10 @@
 // compile-flags: -Z mir-opt-level=1
-// EMIT_MIR rustc.id.SimplifyArmIdentity.diff
-// EMIT_MIR rustc.id.SimplifyBranchSame.diff
-// EMIT_MIR rustc.id_result.SimplifyArmIdentity.diff
-// EMIT_MIR rustc.id_result.SimplifyBranchSame.diff
-// EMIT_MIR rustc.id_try.SimplifyArmIdentity.diff
-// EMIT_MIR rustc.id_try.SimplifyBranchSame.diff
+// EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff
+// EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff
+// EMIT_MIR simplify_arm.id_result.SimplifyArmIdentity.diff
+// EMIT_MIR simplify_arm.id_result.SimplifyBranchSame.diff
+// EMIT_MIR simplify_arm.id_try.SimplifyArmIdentity.diff
+// EMIT_MIR simplify_arm.id_try.SimplifyBranchSame.diff
 
 fn id(o: Option<u8>) -> Option<u8> {
     match o {
diff --git a/src/test/mir-opt/simplify-locals-fixedpoint.rs b/src/test/mir-opt/simplify-locals-fixedpoint.rs
index aa5bc345359..78b1f9f55e5 100644
--- a/src/test/mir-opt/simplify-locals-fixedpoint.rs
+++ b/src/test/mir-opt/simplify-locals-fixedpoint.rs
@@ -12,4 +12,4 @@ fn main() {
     foo::<()>();
 }
 
-// EMIT_MIR rustc.foo.SimplifyLocals.diff
+// EMIT_MIR simplify_locals_fixedpoint.foo.SimplifyLocals.diff
diff --git a/src/test/mir-opt/simplify-locals-removes-unused-consts.rs b/src/test/mir-opt/simplify-locals-removes-unused-consts.rs
index 48cee3c30d2..17999454472 100644
--- a/src/test/mir-opt/simplify-locals-removes-unused-consts.rs
+++ b/src/test/mir-opt/simplify-locals-removes-unused-consts.rs
@@ -8,7 +8,7 @@ struct Temp {
 
 fn use_u8(_: u8) {}
 
-// EMIT_MIR rustc.main.SimplifyLocals.diff
+// EMIT_MIR simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
 fn main() {
     let ((), ()) = ((), ());
     use_zst(((), ()));
diff --git a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs b/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs
index 7047b542aa6..cf8940ec330 100644
--- a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs
+++ b/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs
@@ -10,4 +10,4 @@ fn main() {
 }
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.map.SimplifyLocals.diff
+// EMIT_MIR simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff
diff --git a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff
index 0cddcb061cf..0cddcb061cf 100644
--- a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff
diff --git a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff
index cd5962c682a..cd5962c682a 100644
--- a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff
+++ b/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff
diff --git a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff
index 642ccc1ab14..642ccc1ab14 100644
--- a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/simplify_arm.id_result.SimplifyArmIdentity.diff
diff --git a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff
index 95ce09a39ed..95ce09a39ed 100644
--- a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff
+++ b/src/test/mir-opt/simplify_arm.id_result.SimplifyBranchSame.diff
diff --git a/src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff
index b46ca21fb90..b46ca21fb90 100644
--- a/src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/simplify_arm.id_try.SimplifyArmIdentity.diff
diff --git a/src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id_try.SimplifyBranchSame.diff
index 93412d1a74f..93412d1a74f 100644
--- a/src/test/mir-opt/simplify-arm/rustc.id_try.SimplifyBranchSame.diff
+++ b/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
index 0de80f72a1e..0de80f72a1e 100644
--- 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
diff --git a/src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit
index 4fa0aff8fa0..4fa0aff8fa0 100644
--- a/src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/simplify_arm_identity.main.SimplifyArmIdentity.diff.64bit
diff --git a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff
index 3b472ed3a03..3b472ed3a03 100644
--- a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-early-opt.diff
+++ b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff
diff --git a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff
index 1ba05b1cb38..1ba05b1cb38 100644
--- a/src/test/mir-opt/simplify_cfg/rustc.main.SimplifyCfg-initial.diff
+++ b/src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff
diff --git a/src/test/mir-opt/simplify_cfg.rs b/src/test/mir-opt/simplify_cfg.rs
index 8d588a39d65..c464005c448 100644
--- a/src/test/mir-opt/simplify_cfg.rs
+++ b/src/test/mir-opt/simplify_cfg.rs
@@ -1,7 +1,7 @@
 // Test that the goto chain starting from bb0 is collapsed.
 
-// EMIT_MIR rustc.main.SimplifyCfg-initial.diff
-// EMIT_MIR rustc.main.SimplifyCfg-early-opt.diff
+// EMIT_MIR simplify_cfg.main.SimplifyCfg-initial.diff
+// EMIT_MIR simplify_cfg.main.SimplifyCfg-early-opt.diff
 fn main() {
     loop {
         if bar() {
diff --git a/src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff b/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff
index e94e49bf0cb..e94e49bf0cb 100644
--- a/src/test/mir-opt/simplify_if/rustc.main.SimplifyBranches-after-const-prop.diff
+++ b/src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff
diff --git a/src/test/mir-opt/simplify_if.rs b/src/test/mir-opt/simplify_if.rs
index e2d3ebe69c4..67b2027b710 100644
--- a/src/test/mir-opt/simplify_if.rs
+++ b/src/test/mir-opt/simplify_if.rs
@@ -1,7 +1,7 @@
 #[inline(never)]
 fn noop() {}
 
-// EMIT_MIR rustc.main.SimplifyBranches-after-const-prop.diff
+// EMIT_MIR simplify_if.main.SimplifyBranches-after-const-prop.diff
 fn main() {
     if false {
         noop();
diff --git a/src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
index 720296a2c66..720296a2c66 100644
--- a/src/test/mir-opt/simplify-locals-fixedpoint/rustc.foo.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
diff --git a/src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
index db06b0392df..db06b0392df 100644
--- a/src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff
+++ b/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
index 440c5f8772e..440c5f8772e 100644
--- 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
diff --git a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/64bit/rustc.map.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit
index c12d1715b48..c12d1715b48 100644
--- a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads/64bit/rustc.map.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit
diff --git a/src/test/mir-opt/simplify_match/rustc.main.ConstProp.diff b/src/test/mir-opt/simplify_match.main.ConstProp.diff
index 8003112c46c..8003112c46c 100644
--- a/src/test/mir-opt/simplify_match/rustc.main.ConstProp.diff
+++ b/src/test/mir-opt/simplify_match.main.ConstProp.diff
diff --git a/src/test/mir-opt/simplify_match.rs b/src/test/mir-opt/simplify_match.rs
index b8e1ea6f981..216203f9ff0 100644
--- a/src/test/mir-opt/simplify_match.rs
+++ b/src/test/mir-opt/simplify_match.rs
@@ -1,7 +1,7 @@
 #[inline(never)]
 fn noop() {}
 
-// EMIT_MIR rustc.main.ConstProp.diff
+// EMIT_MIR simplify_match.main.ConstProp.diff
 fn main() {
     match { let x = false; x } {
         true => noop(),
diff --git a/src/test/mir-opt/simplify_try.rs b/src/test/mir-opt/simplify_try.rs
index 88a0451a76f..fa127de13df 100644
--- a/src/test/mir-opt/simplify_try.rs
+++ b/src/test/mir-opt/simplify_try.rs
@@ -1,6 +1,6 @@
-// EMIT_MIR rustc.try_identity.SimplifyArmIdentity.diff
-// EMIT_MIR rustc.try_identity.SimplifyBranchSame.after.mir
-// EMIT_MIR rustc.try_identity.SimplifyLocals.after.mir
+// EMIT_MIR simplify_try.try_identity.SimplifyArmIdentity.diff
+// EMIT_MIR simplify_try.try_identity.SimplifyBranchSame.after.mir
+// EMIT_MIR simplify_try.try_identity.SimplifyLocals.after.mir
 
 fn try_identity(x: Result<u32, i32>) -> Result<u32, i32> {
     let y = x?;
diff --git a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff
index 26ce290b549..26ce290b549 100644
--- a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff
diff --git a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir
index dc4aae176f2..dc4aae176f2 100644
--- a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir
+++ b/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir
diff --git a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir
index d65a2b12c0f..d65a2b12c0f 100644
--- a/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir
diff --git a/src/test/mir-opt/simplify_try_if_let.rs b/src/test/mir-opt/simplify_try_if_let.rs
index daa961c3c8c..b37db738421 100644
--- a/src/test/mir-opt/simplify_try_if_let.rs
+++ b/src/test/mir-opt/simplify_try_if_let.rs
@@ -1,5 +1,5 @@
 // compile-flags: -Zmir-opt-level=1
-// EMIT_MIR rustc.{{impl}}-append.SimplifyArmIdentity.diff
+// EMIT_MIR simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff
 
 use std::ptr::NonNull;
 
diff --git a/src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff
index 4471f4d206c..4471f4d206c 100644
--- a/src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff
diff --git a/src/test/mir-opt/slice-drop-shim.rs b/src/test/mir-opt/slice-drop-shim.rs
index 5d8d37e0bc5..3b98b8474e5 100644
--- a/src/test/mir-opt/slice-drop-shim.rs
+++ b/src/test/mir-opt/slice-drop-shim.rs
@@ -1,7 +1,7 @@
 // compile-flags: -Zmir-opt-level=0
 
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
-// EMIT_MIR rustc.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir
+// EMIT_MIR core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir
 fn main() {
     let _fn = std::ptr::drop_in_place::<[String]> as unsafe fn(_);
 }
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
index b3ee08c3e03..b3ee08c3e03 100644
--- 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
diff --git a/src/test/mir-opt/slice-drop-shim/64bit/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.64bit
index ea22af65dda..ea22af65dda 100644
--- a/src/test/mir-opt/slice-drop-shim/64bit/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.64bit
diff --git a/src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir b/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir
index d7f73a22c26..d7f73a22c26 100644
--- a/src/test/mir-opt/storage_live_dead_in_statics/rustc.XXX.mir_map.0.mir
+++ b/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.rs b/src/test/mir-opt/storage_live_dead_in_statics.rs
index a269914f262..b03de8612fc 100644
--- a/src/test/mir-opt/storage_live_dead_in_statics.rs
+++ b/src/test/mir-opt/storage_live_dead_in_statics.rs
@@ -1,7 +1,7 @@
 // Check that when we compile the static `XXX` into MIR, we do not
 // generate `StorageStart` or `StorageEnd` statements.
 
-// EMIT_MIR rustc.XXX.mir_map.0.mir
+// EMIT_MIR storage_live_dead_in_statics.XXX.mir_map.0.mir
 static XXX: &'static Foo = &Foo {
     tup: "hi",
     data: &[
diff --git a/src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir b/src/test/mir-opt/storage_ranges.main.nll.0.mir
index 099535c0ad2..099535c0ad2 100644
--- a/src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir
+++ b/src/test/mir-opt/storage_ranges.main.nll.0.mir
diff --git a/src/test/mir-opt/storage_ranges.rs b/src/test/mir-opt/storage_ranges.rs
index 7b3c77aca27..996051a2941 100644
--- a/src/test/mir-opt/storage_ranges.rs
+++ b/src/test/mir-opt/storage_ranges.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR rustc.main.nll.0.mir
+// EMIT_MIR storage_ranges.main.nll.0.mir
 
 fn main() {
     let a = 0;
diff --git a/src/test/mir-opt/tls-access.rs b/src/test/mir-opt/tls-access.rs
index 4f3f6b1b3ac..b585fd0c808 100644
--- a/src/test/mir-opt/tls-access.rs
+++ b/src/test/mir-opt/tls-access.rs
@@ -10,4 +10,4 @@ fn main() {
     }
 }
 
-// EMIT_MIR rustc.main.SimplifyCfg-final.after.mir
+// EMIT_MIR tls_access.main.SimplifyCfg-final.after.mir
diff --git a/src/test/mir-opt/tls-access/rustc.main.SimplifyCfg-final.after.mir b/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir
index 5ceca2d091e..5ceca2d091e 100644
--- a/src/test/mir-opt/tls-access/rustc.main.SimplifyCfg-final.after.mir
+++ b/src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir
diff --git a/src/test/mir-opt/uniform_array_move_out/rustc.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
index eb40baa2000..eb40baa2000 100644
--- a/src/test/mir-opt/uniform_array_move_out/rustc.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
diff --git a/src/test/mir-opt/uniform_array_move_out/rustc.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
index 7beceb66577..7beceb66577 100644
--- a/src/test/mir-opt/uniform_array_move_out/rustc.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
diff --git a/src/test/mir-opt/uniform_array_move_out.rs b/src/test/mir-opt/uniform_array_move_out.rs
index c1b7ebdbc3a..35e42552870 100644
--- a/src/test/mir-opt/uniform_array_move_out.rs
+++ b/src/test/mir-opt/uniform_array_move_out.rs
@@ -1,12 +1,12 @@
 #![feature(box_syntax)]
 
-// EMIT_MIR rustc.move_out_from_end.mir_map.0.mir
+// EMIT_MIR uniform_array_move_out.move_out_from_end.mir_map.0.mir
 fn move_out_from_end() {
     let a = [box 1, box 2];
     let [.., _y] = a;
 }
 
-// EMIT_MIR rustc.move_out_by_subslice.mir_map.0.mir
+// EMIT_MIR uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
 fn move_out_by_subslice() {
     let a = [box 1, box 2];
     let [_y @ ..] = a;
diff --git a/src/test/mir-opt/uninhabited-enum.rs b/src/test/mir-opt/uninhabited-enum.rs
index 6503e193608..97c6e8cd531 100644
--- a/src/test/mir-opt/uninhabited-enum.rs
+++ b/src/test/mir-opt/uninhabited-enum.rs
@@ -2,13 +2,13 @@
 
 pub enum Void {}
 
-// EMIT_MIR rustc.process_never.SimplifyLocals.after.mir
+// EMIT_MIR uninhabited_enum.process_never.SimplifyLocals.after.mir
 #[no_mangle]
 pub fn process_never(input: *const !) {
    let _input = unsafe { &*input };
 }
 
-// EMIT_MIR rustc.process_void.SimplifyLocals.after.mir
+// EMIT_MIR uninhabited_enum.process_void.SimplifyLocals.after.mir
 #[no_mangle]
 pub fn process_void(input: *const Void) {
    let _input = unsafe { &*input };
diff --git a/src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir
index c17fe3bb757..c17fe3bb757 100644
--- a/src/test/mir-opt/uninhabited-enum/rustc.process_never.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir
diff --git a/src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
index 8cfcd64a70f..8cfcd64a70f 100644
--- a/src/test/mir-opt/uninhabited-enum/rustc.process_void.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
diff --git a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir b/src/test/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
index 4f4fb7defc3..4f4fb7defc3 100644
--- a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
+++ b/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/rustc.main.UninhabitedEnumBranching.diff b/src/test/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
index d262c9432ca..d262c9432ca 100644
--- a/src/test/mir-opt/uninhabited_enum_branching/rustc.main.UninhabitedEnumBranching.diff
+++ b/src/test/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
diff --git a/src/test/mir-opt/uninhabited_enum_branching.rs b/src/test/mir-opt/uninhabited_enum_branching.rs
index daf1156d20e..0ef604c3088 100644
--- a/src/test/mir-opt/uninhabited_enum_branching.rs
+++ b/src/test/mir-opt/uninhabited_enum_branching.rs
@@ -14,8 +14,8 @@ enum Test2 {
     E = 5,
 }
 
-// EMIT_MIR rustc.main.UninhabitedEnumBranching.diff
-// EMIT_MIR rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
+// EMIT_MIR uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
+// EMIT_MIR uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
 fn main() {
     match Test1::C {
         Test1::A(_) => "A(Empty)",
diff --git a/src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff
index e7abf578800..e7abf578800 100644
--- a/src/test/mir-opt/unreachable/rustc.main.UnreachablePropagation.diff
+++ b/src/test/mir-opt/unreachable.main.UnreachablePropagation.diff
diff --git a/src/test/mir-opt/unreachable.rs b/src/test/mir-opt/unreachable.rs
index 6f0c4ca3cf5..6098b525b55 100644
--- a/src/test/mir-opt/unreachable.rs
+++ b/src/test/mir-opt/unreachable.rs
@@ -4,7 +4,7 @@ fn empty() -> Option<Empty> {
     None
 }
 
-// EMIT_MIR rustc.main.UnreachablePropagation.diff
+// EMIT_MIR unreachable.main.UnreachablePropagation.diff
 fn main() {
     if let Some(_x) = empty() {
         let mut _y;
diff --git a/src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff
index 50694900024..50694900024 100644
--- a/src/test/mir-opt/unreachable_asm/rustc.main.UnreachablePropagation.diff
+++ b/src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff
diff --git a/src/test/mir-opt/unreachable_asm.rs b/src/test/mir-opt/unreachable_asm.rs
index 4bbf22b8227..cbef05a3c05 100644
--- a/src/test/mir-opt/unreachable_asm.rs
+++ b/src/test/mir-opt/unreachable_asm.rs
@@ -6,7 +6,7 @@ fn empty() -> Option<Empty> {
     None
 }
 
-// EMIT_MIR rustc.main.UnreachablePropagation.diff
+// EMIT_MIR unreachable_asm.main.UnreachablePropagation.diff
 fn main() {
     if let Some(_x) = empty() {
         let mut _y;
diff --git a/src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff
index 9be05aefcf6..9be05aefcf6 100644
--- a/src/test/mir-opt/unreachable_asm_2/rustc.main.UnreachablePropagation.diff
+++ b/src/test/mir-opt/unreachable_asm_2.main.UnreachablePropagation.diff
diff --git a/src/test/mir-opt/unreachable_asm_2.rs b/src/test/mir-opt/unreachable_asm_2.rs
index f1610db999e..e0d8e725147 100644
--- a/src/test/mir-opt/unreachable_asm_2.rs
+++ b/src/test/mir-opt/unreachable_asm_2.rs
@@ -6,7 +6,7 @@ fn empty() -> Option<Empty> {
     None
 }
 
-// EMIT_MIR rustc.main.UnreachablePropagation.diff
+// EMIT_MIR unreachable_asm_2.main.UnreachablePropagation.diff
 fn main() {
     if let Some(_x) = empty() {
         let mut _y;
diff --git a/src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff
index e7886f683c0..e7886f683c0 100644
--- a/src/test/mir-opt/unreachable_diverging/rustc.main.UnreachablePropagation.diff
+++ b/src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff
diff --git a/src/test/mir-opt/unreachable_diverging.rs b/src/test/mir-opt/unreachable_diverging.rs
index 53c753f717b..bbf28efc7dd 100644
--- a/src/test/mir-opt/unreachable_diverging.rs
+++ b/src/test/mir-opt/unreachable_diverging.rs
@@ -8,7 +8,7 @@ fn loop_forever() {
     loop {}
 }
 
-// EMIT_MIR rustc.main.UnreachablePropagation.diff
+// EMIT_MIR unreachable_diverging.main.UnreachablePropagation.diff
 fn main() {
     let x = true;
     if let Some(bomb) = empty() {
diff --git a/src/test/mir-opt/unusual-item-types.rs b/src/test/mir-opt/unusual-item-types.rs
index ffe8ca01dfb..249a851af25 100644
--- a/src/test/mir-opt/unusual-item-types.rs
+++ b/src/test/mir-opt/unusual-item-types.rs
@@ -5,25 +5,25 @@
 
 struct A;
 
-// EMIT_MIR rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir
+// EMIT_MIR unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir
 impl A {
     const ASSOCIATED_CONSTANT: i32 = 2;
 }
 
 // See #59021
-// EMIT_MIR rustc.Test-X-{{constructor}}.mir_map.0.mir
+// EMIT_MIR unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir
 enum Test {
     X(usize),
     Y { a: usize },
 }
 
-// EMIT_MIR rustc.E-V-{{constant}}.mir_map.0.mir
+// EMIT_MIR unusual_item_types.E-V-{{constant}}.mir_map.0.mir
 enum E {
     V = 5,
 }
 
 fn main() {
     let f = Test::X as fn(usize) -> Test;
-// EMIT_MIR rustc.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir
+// EMIT_MIR core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir
     let v = Vec::<i32>::new();
 }
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
index 7f0266d6589..7f0266d6589 100644
--- 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
diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.E-V-{{constant}}.mir_map.0.mir.64bit
index f2c1e9c97dd..f2c1e9c97dd 100644
--- a/src/test/mir-opt/unusual-item-types/64bit/rustc.E-V-{{constant}}.mir_map.0.mir
+++ b/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
index 832f18e14c2..832f18e14c2 100644
--- 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
diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir.64bit
index 832f18e14c2..832f18e14c2 100644
--- a/src/test/mir-opt/unusual-item-types/64bit/rustc.Test-X-{{constructor}}.mir_map.0.mir
+++ b/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
index 321f13b4927..321f13b4927 100644
--- 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
diff --git a/src/test/mir-opt/unusual-item-types/64bit/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.64bit
index 321f13b4927..321f13b4927 100644
--- a/src/test/mir-opt/unusual-item-types/64bit/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.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
index 4af856c654e..4af856c654e 100644
--- 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
diff --git a/src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit
index 4af856c654e..4af856c654e 100644
--- a/src/test/mir-opt/unusual-item-types/64bit/rustc.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir
+++ b/src/test/mir-opt/unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir.64bit
diff --git a/src/test/mir-opt/while-storage.rs b/src/test/mir-opt/while-storage.rs
index 56f6c3380a7..afd083acb34 100644
--- a/src/test/mir-opt/while-storage.rs
+++ b/src/test/mir-opt/while-storage.rs
@@ -5,7 +5,7 @@ fn get_bool(c: bool) -> bool {
     c
 }
 
-// EMIT_MIR rustc.while_loop.PreCodegen.after.mir
+// EMIT_MIR while_storage.while_loop.PreCodegen.after.mir
 fn while_loop(c: bool) {
     while get_bool(c) {
         if get_bool(c) {
diff --git a/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
index 3ddf82c2fb2..3ddf82c2fb2 100644
--- a/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir
+++ b/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;