about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-19 16:53:52 +0000
committerbors <bors@rust-lang.org>2023-10-19 16:53:52 +0000
commite76cb8c49831ff80d7d2e16319c86edbaa9edb8c (patch)
tree0ee10fd0e3fbcb6aea6da062b9ef275fc4ca6a4f
parentc104861b7b51d2c28e7023e7e53db16cc6677e29 (diff)
parent328192bff492d32b86004fd80f963296fb654278 (diff)
downloadrust-e76cb8c49831ff80d7d2e16319c86edbaa9edb8c.tar.gz
rust-e76cb8c49831ff80d7d2e16319c86edbaa9edb8c.zip
Auto merge of #116810 - cjgillot:mir-opt-check, r=oli-obk
Add FileCheck annotations to mir-opt tests.

This PR makes compiletest run LLVM `FileCheck` tool on mir-opt tests.

The check is *run by default*, except if disabled using `// skip-filecheck` comment. This ensures that we do not have a silently broken test. For now, the check is only run on the output of `--emit=mir`, ie. on PreCodegen MIR.

I give an example on `reference_prop.rs`.

r? `@oli-obk`
cc `@RalfJung`

Fixes https://github.com/rust-lang/rust/issues/85180
-rw-r--r--src/tools/compiletest/src/runtest.rs65
-rw-r--r--src/tools/miropt-test-tools/src/lib.rs27
-rw-r--r--src/tools/tidy/src/mir_opt_tests.rs3
-rw-r--r--tests/mir-opt/README.md18
-rw-r--r--tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir60
-rw-r--r--tests/mir-opt/address_of.rs1
-rw-r--r--tests/mir-opt/array_index_is_temporary.rs7
-rw-r--r--tests/mir-opt/asm_unwind_panic_abort.rs3
-rw-r--r--tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir4
-rw-r--r--tests/mir-opt/basic_assignment.rs18
-rw-r--r--tests/mir-opt/bool_compare.rs28
-rw-r--r--tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir71
-rw-r--r--tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir71
-rw-r--r--tests/mir-opt/box_expr.main.ElaborateDrops.diff89
-rw-r--r--tests/mir-opt/box_expr.rs17
-rw-r--r--tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir6
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir66
-rw-r--r--tests/mir-opt/building/async_await.rs1
-rw-r--r--tests/mir-opt/building/custom/aggregate_exprs.rs1
-rw-r--r--tests/mir-opt/building/custom/arbitrary_let.rs1
-rw-r--r--tests/mir-opt/building/custom/arrays.rs1
-rw-r--r--tests/mir-opt/building/custom/as_cast.rs1
-rw-r--r--tests/mir-opt/building/custom/composite_return.rs1
-rw-r--r--tests/mir-opt/building/custom/consts.rs1
-rw-r--r--tests/mir-opt/building/custom/debuginfo.rs1
-rw-r--r--tests/mir-opt/building/custom/enums.rs1
-rw-r--r--tests/mir-opt/building/custom/operators.rs1
-rw-r--r--tests/mir-opt/building/custom/projections.rs1
-rw-r--r--tests/mir-opt/building/custom/references.rs1
-rw-r--r--tests/mir-opt/building/custom/simple_assign.rs1
-rw-r--r--tests/mir-opt/building/custom/terminators.rs1
-rw-r--r--tests/mir-opt/building/enum_cast.rs1
-rw-r--r--tests/mir-opt/building/issue_101867.main.built.after.mir4
-rw-r--r--tests/mir-opt/building/issue_101867.rs1
-rw-r--r--tests/mir-opt/building/issue_110508.rs1
-rw-r--r--tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir4
-rw-r--r--tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir4
-rw-r--r--tests/mir-opt/building/issue_49232.rs1
-rw-r--r--tests/mir-opt/building/logical_or_in_conditional.rs1
-rw-r--r--tests/mir-opt/building/match_false_edges.rs1
-rw-r--r--tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir8
-rw-r--r--tests/mir-opt/building/receiver_ptr_mutability.rs1
-rw-r--r--tests/mir-opt/building/shifts.rs1
-rw-r--r--tests/mir-opt/building/simple_match.rs1
-rw-r--r--tests/mir-opt/building/storage_live_dead_in_statics.rs1
-rw-r--r--tests/mir-opt/building/uniform_array_move_out.rs1
-rw-r--r--tests/mir-opt/byte_slice.rs1
-rw-r--r--tests/mir-opt/casts.redundant.PreCodegen.after.mir14
-rw-r--r--tests/mir-opt/casts.roundtrip.PreCodegen.after.mir15
-rw-r--r--tests/mir-opt/casts.rs17
-rw-r--r--tests/mir-opt/const_allocation.rs1
-rw-r--r--tests/mir-opt/const_allocation2.rs1
-rw-r--r--tests/mir-opt/const_allocation3.rs1
-rw-r--r--tests/mir-opt/const_debuginfo.rs1
-rw-r--r--tests/mir-opt/const_goto.rs1
-rw-r--r--tests/mir-opt/const_goto_const_eval_fail.rs1
-rw-r--r--tests/mir-opt/const_goto_storage.rs1
-rw-r--r--tests/mir-opt/const_promotion_extern_static.rs1
-rw-r--r--tests/mir-opt/const_prop/address_of_pair.rs1
-rw-r--r--tests/mir-opt/const_prop/aggregate.rs1
-rw-r--r--tests/mir-opt/const_prop/array_index.rs1
-rw-r--r--tests/mir-opt/const_prop/bad_op_div_by_zero.rs1
-rw-r--r--tests/mir-opt/const_prop/bad_op_mod_by_zero.rs1
-rw-r--r--tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs1
-rw-r--r--tests/mir-opt/const_prop/boolean_identities.rs1
-rw-r--r--tests/mir-opt/const_prop/boxes.rs1
-rw-r--r--tests/mir-opt/const_prop/cast.rs1
-rw-r--r--tests/mir-opt/const_prop/checked_add.rs1
-rw-r--r--tests/mir-opt/const_prop/const_prop_fails_gracefully.rs1
-rw-r--r--tests/mir-opt/const_prop/control_flow_simplification.rs1
-rw-r--r--tests/mir-opt/const_prop/discriminant.rs1
-rw-r--r--tests/mir-opt/const_prop/indirect.rs1
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.rs1
-rw-r--r--tests/mir-opt/const_prop/invalid_constant.rs1
-rw-r--r--tests/mir-opt/const_prop/issue_66971.rs1
-rw-r--r--tests/mir-opt/const_prop/issue_67019.rs1
-rw-r--r--tests/mir-opt/const_prop/large_array_index.rs1
-rw-r--r--tests/mir-opt/const_prop/mult_by_zero.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs1
-rw-r--r--tests/mir-opt/const_prop/offset_of.rs1
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.rs1
-rw-r--r--tests/mir-opt/const_prop/ref_deref.rs1
-rw-r--r--tests/mir-opt/const_prop/ref_deref_project.rs1
-rw-r--r--tests/mir-opt/const_prop/reify_fn_ptr.rs1
-rw-r--r--tests/mir-opt/const_prop/repeat.rs1
-rw-r--r--tests/mir-opt/const_prop/return_place.rs1
-rw-r--r--tests/mir-opt/const_prop/scalar_literal_propagation.rs1
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs1
-rw-r--r--tests/mir-opt/const_prop/switch_int.rs1
-rw-r--r--tests/mir-opt/const_prop/transmute.rs22
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.rs1
-rw-r--r--tests/mir-opt/const_prop/while_let_loops.rs1
-rw-r--r--tests/mir-opt/const_prop_miscompile.rs1
-rw-r--r--tests/mir-opt/copy-prop/borrowed_local.rs1
-rw-r--r--tests/mir-opt/copy-prop/branch.rs1
-rw-r--r--tests/mir-opt/copy-prop/calls.rs1
-rw-r--r--tests/mir-opt/copy-prop/copy_propagation_arg.rs1
-rw-r--r--tests/mir-opt/copy-prop/custom_move_arg.rs1
-rw-r--r--tests/mir-opt/copy-prop/cycle.rs1
-rw-r--r--tests/mir-opt/copy-prop/dead_stores_79191.rs1
-rw-r--r--tests/mir-opt/copy-prop/dead_stores_better.rs1
-rw-r--r--tests/mir-opt/copy-prop/issue_107511.rs1
-rw-r--r--tests/mir-opt/copy-prop/move_arg.rs1
-rw-r--r--tests/mir-opt/copy-prop/move_projection.rs1
-rw-r--r--tests/mir-opt/copy-prop/mutate_through_pointer.rs1
-rw-r--r--tests/mir-opt/copy-prop/non_dominate.rs1
-rw-r--r--tests/mir-opt/copy-prop/partial_init.rs1
-rw-r--r--tests/mir-opt/copy-prop/reborrow.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/array_index.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/boolean_identities.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/cast.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/checked.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/if.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/inherit_overflow.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/issue_81605.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/large_array_index.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/mult_by_zero.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/ref_without_sb.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/repeat.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/repr_transparent.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/self_assign.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/self_assign_add.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/sibling_ptr.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/slice_len.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/terminator.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.rs22
-rw-r--r--tests/mir-opt/dataflow-const-prop/tuple.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/call_arg_copy.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/cycle.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/place_mention.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/provenance_soundness.rs1
-rw-r--r--tests/mir-opt/deduplicate_blocks.rs1
-rw-r--r--tests/mir-opt/deref-patterns/string.rs1
-rw-r--r--tests/mir-opt/derefer_complex_case.rs1
-rw-r--r--tests/mir-opt/derefer_inline_test.rs1
-rw-r--r--tests/mir-opt/derefer_terminator_test.rs1
-rw-r--r--tests/mir-opt/derefer_test.rs1
-rw-r--r--tests/mir-opt/derefer_test_multiple.rs1
-rw-r--r--tests/mir-opt/dest-prop/branch.rs1
-rw-r--r--tests/mir-opt/dest-prop/copy_propagation_arg.rs1
-rw-r--r--tests/mir-opt/dest-prop/cycle.rs1
-rw-r--r--tests/mir-opt/dest-prop/dead_stores_79191.rs1
-rw-r--r--tests/mir-opt/dest-prop/dead_stores_better.rs1
-rw-r--r--tests/mir-opt/dest-prop/simple.rs1
-rw-r--r--tests/mir-opt/dest-prop/union.rs1
-rw-r--r--tests/mir-opt/dest-prop/unreachable.rs1
-rw-r--r--tests/mir-opt/dont_inline_type_id.rs1
-rw-r--r--tests/mir-opt/dont_yeet_assert.rs11
-rw-r--r--tests/mir-opt/early_otherwise_branch.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_3_element_tuple.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_68867.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_noopt.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_soundness.rs1
-rw-r--r--tests/mir-opt/enum_opt.rs1
-rw-r--r--tests/mir-opt/equal_true.opt.InstSimplify.diff36
-rw-r--r--tests/mir-opt/equal_true.rs11
-rw-r--r--tests/mir-opt/exponential_or.rs1
-rw-r--r--tests/mir-opt/fn_ptr_shim.rs1
-rw-r--r--tests/mir-opt/funky_arms.rs1
-rw-r--r--tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir4
-rw-r--r--tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir4
-rw-r--r--tests/mir-opt/generator_drop_cleanup.rs1
-rw-r--r--tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir2
-rw-r--r--tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir2
-rw-r--r--tests/mir-opt/generator_storage_dead_unwind.rs1
-rw-r--r--tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir12
-rw-r--r--tests/mir-opt/generator_tiny.rs1
-rw-r--r--tests/mir-opt/graphviz.rs1
-rw-r--r--tests/mir-opt/gvn.rs1
-rw-r--r--tests/mir-opt/if_condition_int.rs1
-rw-r--r--tests/mir-opt/inline/asm_unwind.rs1
-rw-r--r--tests/mir-opt/inline/caller_with_trivial_bound.rs1
-rw-r--r--tests/mir-opt/inline/cycle.rs1
-rw-r--r--tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs1
-rw-r--r--tests/mir-opt/inline/dyn_trait.rs1
-rw-r--r--tests/mir-opt/inline/exponential_runtime.rs1
-rw-r--r--tests/mir-opt/inline/inline_any_operand.rs1
-rw-r--r--tests/mir-opt/inline/inline_async.rs1
-rw-r--r--tests/mir-opt/inline/inline_box_fn.rs1
-rw-r--r--tests/mir-opt/inline/inline_closure.rs1
-rw-r--r--tests/mir-opt/inline/inline_closure_borrows_arg.rs1
-rw-r--r--tests/mir-opt/inline/inline_closure_captures.rs1
-rw-r--r--tests/mir-opt/inline/inline_compatibility.rs1
-rw-r--r--tests/mir-opt/inline/inline_cycle.rs1
-rw-r--r--tests/mir-opt/inline/inline_cycle_generic.rs1
-rw-r--r--tests/mir-opt/inline/inline_diverging.rs1
-rw-r--r--tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff22
-rw-r--r--tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff22
-rw-r--r--tests/mir-opt/inline/inline_generator.rs1
-rw-r--r--tests/mir-opt/inline/inline_instruction_set.rs1
-rw-r--r--tests/mir-opt/inline/inline_into_box_place.rs1
-rw-r--r--tests/mir-opt/inline/inline_options.rs1
-rw-r--r--tests/mir-opt/inline/inline_retag.rs1
-rw-r--r--tests/mir-opt/inline/inline_shims.rs4
-rw-r--r--tests/mir-opt/inline/inline_specialization.rs1
-rw-r--r--tests/mir-opt/inline/inline_trait_method.rs1
-rw-r--r--tests/mir-opt/inline/inline_trait_method_2.rs1
-rw-r--r--tests/mir-opt/inline/issue_106141.rs6
-rw-r--r--tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs1
-rw-r--r--tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir6
-rw-r--r--tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs1
-rw-r--r--tests/mir-opt/inline/issue_78442.rs1
-rw-r--r--tests/mir-opt/inline/polymorphic_recursion.rs1
-rw-r--r--tests/mir-opt/inline/unchecked_shifts.rs1
-rw-r--r--tests/mir-opt/inline/unsized_argument.rs1
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.rs1
-rw-r--r--tests/mir-opt/inline_generically_if_sized.rs1
-rw-r--r--tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff2
-rw-r--r--tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff10
-rw-r--r--tests/mir-opt/instrument_coverage.rs1
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.eq_false.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt3.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff36
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.false_eq.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt4.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff36
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.ne_false.InstSimplify.diff (renamed from tests/mir-opt/not_equal_false.opt.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.ne_true.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt1.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.rs68
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff36
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.true_ne.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt2.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/casts.redundant.InstSimplify.diff (renamed from tests/mir-opt/casts.redundant.InstSimplify.diff)10
-rw-r--r--tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff21
-rw-r--r--tests/mir-opt/instsimplify/casts.rs25
-rw-r--r--tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-abort.diff (renamed from tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-abort.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-unwind.diff (renamed from tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_array_len.rs (renamed from tests/mir-opt/combine_array_len.rs)4
-rw-r--r--tests/mir-opt/instsimplify/combine_clone_of_primitives.rs (renamed from tests/mir-opt/combine_clone_of_primitives.rs)6
-rw-r--r--tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff (renamed from tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff)6
-rw-r--r--tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff (renamed from tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff)6
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.adt_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.identity_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.integer_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.rs (renamed from tests/mir-opt/combine_transmutes.rs)22
-rw-r--r--tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff (renamed from tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/duplicate_switch_targets.rs (renamed from tests/mir-opt/instsimplify_duplicate_switch_targets.rs)8
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.generic.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff)14
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.generic_ref.InstSimplify.diff (renamed from tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.panics.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff)14
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.removable.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff)14
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.rs (renamed from tests/mir-opt/intrinsic_asserts.rs)22
-rw-r--r--tests/mir-opt/issue_101973.rs1
-rw-r--r--tests/mir-opt/issue_104451_unwindable_intrinsics.rs1
-rw-r--r--tests/mir-opt/issue_38669.rs1
-rw-r--r--tests/mir-opt/issue_41110.rs1
-rw-r--r--tests/mir-opt/issue_41697.rs1
-rw-r--r--tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir4
-rw-r--r--tests/mir-opt/issue_41888.rs1
-rw-r--r--tests/mir-opt/issue_62289.rs1
-rw-r--r--tests/mir-opt/issue_72181.rs1
-rw-r--r--tests/mir-opt/issue_72181_1.main.built.after.mir4
-rw-r--r--tests/mir-opt/issue_72181_1.rs1
-rw-r--r--tests/mir-opt/issue_76432.rs1
-rw-r--r--tests/mir-opt/issue_78192.rs1
-rw-r--r--tests/mir-opt/issue_91633.rs1
-rw-r--r--tests/mir-opt/issue_99325.main.built.after.32bit.mir4
-rw-r--r--tests/mir-opt/issue_99325.main.built.after.64bit.mir4
-rw-r--r--tests/mir-opt/issue_99325.rs1
-rw-r--r--tests/mir-opt/issues/issue_59352.rs1
-rw-r--r--tests/mir-opt/issues/issue_75439.rs1
-rw-r--r--tests/mir-opt/loop_test.rs1
-rw-r--r--tests/mir-opt/lower_array_len.rs14
-rw-r--r--tests/mir-opt/lower_intrinsics.rs87
-rw-r--r--tests/mir-opt/lower_slice_len.rs4
-rw-r--r--tests/mir-opt/match_arm_scopes.rs1
-rw-r--r--tests/mir-opt/match_test.rs1
-rw-r--r--tests/mir-opt/matches_reduce_branches.rs1
-rw-r--r--tests/mir-opt/matches_u8.rs1
-rw-r--r--tests/mir-opt/multiple_return_terminators.rs1
-rw-r--r--tests/mir-opt/nll/named_lifetimes_basic.rs1
-rw-r--r--tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir16
-rw-r--r--tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir4
-rw-r--r--tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir4
-rw-r--r--tests/mir-opt/nll/region_subtyping_basic.rs1
-rw-r--r--tests/mir-opt/no_drop_for_inactive_variant.rs1
-rw-r--r--tests/mir-opt/no_spurious_drop_after_call.rs1
-rw-r--r--tests/mir-opt/not_equal_false.rs10
-rw-r--r--tests/mir-opt/nrvo_miscompile_111005.rs1
-rw-r--r--tests/mir-opt/nrvo_simple.rs1
-rw-r--r--tests/mir-opt/packed_struct_drop_aligned.rs1
-rw-r--r--tests/mir-opt/pre-codegen/chained_comparison.rs1
-rw-r--r--tests/mir-opt/pre-codegen/checked_ops.rs1
-rw-r--r--tests/mir-opt/pre-codegen/duplicate_switch_targets.rs1
-rw-r--r--tests/mir-opt/pre-codegen/intrinsics.rs1
-rw-r--r--tests/mir-opt/pre-codegen/loops.rs1
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.rs1
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.rs1
-rw-r--r--tests/mir-opt/pre-codegen/range_iter.rs1
-rw-r--r--tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir4
-rw-r--r--tests/mir-opt/pre-codegen/simple_option_map.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.rs1
-rw-r--r--tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir20
-rw-r--r--tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir20
-rw-r--r--tests/mir-opt/pre-codegen/spans.rs1
-rw-r--r--tests/mir-opt/pre-codegen/try_identity.rs1
-rw-r--r--tests/mir-opt/reference_prop.rs333
-rw-r--r--tests/mir-opt/remove_fake_borrows.rs1
-rw-r--r--tests/mir-opt/remove_never_const.rs1
-rw-r--r--tests/mir-opt/remove_storage_markers.rs1
-rw-r--r--tests/mir-opt/remove_unneeded_drops.rs1
-rw-r--r--tests/mir-opt/remove_zsts.rs1
-rw-r--r--tests/mir-opt/retag.rs1
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir4
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir4
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir4
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir4
-rw-r--r--tests/mir-opt/return_an_array.rs1
-rw-r--r--tests/mir-opt/separate_const_switch.rs1
-rw-r--r--tests/mir-opt/simplify_arm.rs1
-rw-r--r--tests/mir-opt/simplify_arm_identity.rs1
-rw-r--r--tests/mir-opt/simplify_cfg.rs1
-rw-r--r--tests/mir-opt/simplify_duplicate_unreachable_blocks.rs1
-rw-r--r--tests/mir-opt/simplify_if.rs1
-rw-r--r--tests/mir-opt/simplify_locals.rs1
-rw-r--r--tests/mir-opt/simplify_locals_fixedpoint.rs1
-rw-r--r--tests/mir-opt/simplify_locals_removes_unused_consts.rs1
-rw-r--r--tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs1
-rw-r--r--tests/mir-opt/simplify_match.rs1
-rw-r--r--tests/mir-opt/simplify_try_if_let.rs1
-rw-r--r--tests/mir-opt/slice_drop_shim.rs1
-rw-r--r--tests/mir-opt/spanview_block.main.built.after.html6
-rw-r--r--tests/mir-opt/spanview_block.rs1
-rw-r--r--tests/mir-opt/spanview_statement.main.built.after.html6
-rw-r--r--tests/mir-opt/spanview_statement.rs1
-rw-r--r--tests/mir-opt/spanview_terminator.main.built.after.html4
-rw-r--r--tests/mir-opt/spanview_terminator.rs1
-rw-r--r--tests/mir-opt/sroa/lifetimes.rs1
-rw-r--r--tests/mir-opt/sroa/structs.rs1
-rw-r--r--tests/mir-opt/ssa_unreachable_116212.rs1
-rw-r--r--tests/mir-opt/storage_ranges.main.nll.0.mir2
-rw-r--r--tests/mir-opt/storage_ranges.rs1
-rw-r--r--tests/mir-opt/switch_to_self.rs1
-rw-r--r--tests/mir-opt/tls_access.rs1
-rw-r--r--tests/mir-opt/uninhabited_enum.rs1
-rw-r--r--tests/mir-opt/uninhabited_enum_branching.rs1
-rw-r--r--tests/mir-opt/uninhabited_enum_branching2.rs1
-rw-r--r--tests/mir-opt/uninhabited_fallthrough_elimination.rs1
-rw-r--r--tests/mir-opt/unreachable.rs1
-rw-r--r--tests/mir-opt/unreachable_diverging.rs1
-rw-r--r--tests/mir-opt/unusual_item_types.rs1
-rw-r--r--tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir4
-rw-r--r--tests/mir-opt/while_storage.rs1
353 files changed, 1444 insertions, 589 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 875671c64e0..8ce00e00b57 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -15,6 +15,7 @@ use crate::json;
 use crate::read2::{read2_abbreviated, Truncated};
 use crate::util::{add_dylib_path, dylib_env_var, logv, PathBufExt};
 use crate::ColorConfig;
+use miropt_test_tools::{files_for_miropt_test, MiroptTest, MiroptTestFile};
 use regex::{Captures, Regex};
 use rustfix::{apply_suggestions, get_suggestions_from_json, Filter};
 
@@ -229,6 +230,7 @@ enum Emit {
     None,
     Metadata,
     LlvmIr,
+    Mir,
     Asm,
     LinkArgsAsm,
 }
@@ -2506,6 +2508,9 @@ impl<'test> TestCx<'test> {
             Emit::LlvmIr => {
                 rustc.args(&["--emit", "llvm-ir"]);
             }
+            Emit::Mir => {
+                rustc.args(&["--emit", "mir"]);
+            }
             Emit::Asm => {
                 rustc.args(&["--emit", "asm"]);
             }
@@ -3984,11 +3989,17 @@ impl<'test> TestCx<'test> {
     fn run_mir_opt_test(&self) {
         let pm = self.pass_mode();
         let should_run = self.should_run(pm);
-        let emit_metadata = self.should_emit_metadata(pm);
-        let passes = self.get_passes();
 
-        let proc_res = self.compile_test_with_passes(should_run, emit_metadata, passes);
-        self.check_mir_dump();
+        let mut test_info = files_for_miropt_test(
+            &self.testpaths.file,
+            self.config.get_pointer_width(),
+            self.config.target_cfg().panic.for_miropt_test_tools(),
+        );
+
+        let passes = std::mem::take(&mut test_info.passes);
+
+        let proc_res = self.compile_test_with_passes(should_run, Emit::Mir, passes);
+        self.check_mir_dump(test_info);
         if !proc_res.status.success() {
             self.fatal_proc_rec("compilation failed!", &proc_res);
         }
@@ -4002,37 +4013,12 @@ impl<'test> TestCx<'test> {
         }
     }
 
-    fn get_passes(&self) -> Vec<String> {
-        let files = miropt_test_tools::files_for_miropt_test(
-            &self.testpaths.file,
-            self.config.get_pointer_width(),
-            self.config.target_cfg().panic.for_miropt_test_tools(),
-        );
-
-        let mut out = Vec::new();
-
-        for miropt_test_tools::MiroptTestFiles {
-            from_file: _,
-            to_file: _,
-            expected_file: _,
-            passes,
-        } in files
-        {
-            out.extend(passes);
-        }
-        out
-    }
-
-    fn check_mir_dump(&self) {
+    fn check_mir_dump(&self, test_info: MiroptTest) {
         let test_dir = self.testpaths.file.parent().unwrap();
         let test_crate =
             self.testpaths.file.file_stem().unwrap().to_str().unwrap().replace("-", "_");
 
-        let suffix = miropt_test_tools::output_file_suffix(
-            &self.testpaths.file,
-            self.config.get_pointer_width(),
-            self.config.target_cfg().panic.for_miropt_test_tools(),
-        );
+        let MiroptTest { run_filecheck, suffix, files, passes: _ } = test_info;
 
         if self.config.bless {
             for e in
@@ -4047,14 +4033,7 @@ impl<'test> TestCx<'test> {
             }
         }
 
-        let files = miropt_test_tools::files_for_miropt_test(
-            &self.testpaths.file,
-            self.config.get_pointer_width(),
-            self.config.target_cfg().panic.for_miropt_test_tools(),
-        );
-        for miropt_test_tools::MiroptTestFiles { from_file, to_file, expected_file, passes: _ } in
-            files
-        {
+        for MiroptTestFile { from_file, to_file, expected_file } in files {
             let dumped_string = if let Some(after) = to_file {
                 self.diff_mir_files(from_file.into(), after.into())
             } else {
@@ -4095,6 +4074,14 @@ impl<'test> TestCx<'test> {
                 }
             }
         }
+
+        if run_filecheck {
+            let output_path = self.output_base_name().with_extension("mir");
+            let proc_res = self.verify_with_filecheck(&output_path);
+            if !proc_res.status.success() {
+                self.fatal_proc_rec("verification with 'FileCheck' failed", &proc_res);
+            }
+        }
     }
 
     fn diff_mir_files(&self, before: PathBuf, after: PathBuf) -> String {
diff --git a/src/tools/miropt-test-tools/src/lib.rs b/src/tools/miropt-test-tools/src/lib.rs
index e33ecfe8eab..cae96f59319 100644
--- a/src/tools/miropt-test-tools/src/lib.rs
+++ b/src/tools/miropt-test-tools/src/lib.rs
@@ -1,10 +1,16 @@
 use std::fs;
 use std::path::Path;
 
-pub struct MiroptTestFiles {
+pub struct MiroptTestFile {
     pub expected_file: std::path::PathBuf,
     pub from_file: String,
     pub to_file: Option<String>,
+}
+
+pub struct MiroptTest {
+    pub run_filecheck: bool,
+    pub suffix: String,
+    pub files: Vec<MiroptTestFile>,
     /// Vec of passes under test to be dumped
     pub passes: Vec<String>,
 }
@@ -14,11 +20,7 @@ pub enum PanicStrategy {
     Abort,
 }
 
-pub fn output_file_suffix(
-    testfile: &Path,
-    bit_width: u32,
-    panic_strategy: PanicStrategy,
-) -> String {
+fn output_file_suffix(testfile: &Path, bit_width: u32, panic_strategy: PanicStrategy) -> String {
     let mut each_bit_width = false;
     let mut each_panic_strategy = false;
     for line in fs::read_to_string(testfile).unwrap().lines() {
@@ -47,7 +49,7 @@ pub fn files_for_miropt_test(
     testfile: &std::path::Path,
     bit_width: u32,
     panic_strategy: PanicStrategy,
-) -> Vec<MiroptTestFiles> {
+) -> MiroptTest {
     let mut out = Vec::new();
     let test_file_contents = fs::read_to_string(&testfile).unwrap();
 
@@ -55,8 +57,14 @@ pub fn files_for_miropt_test(
     let test_crate = testfile.file_stem().unwrap().to_str().unwrap().replace('-', "_");
 
     let suffix = output_file_suffix(testfile, bit_width, panic_strategy);
+    let mut run_filecheck = true;
+    let mut passes = Vec::new();
 
     for l in test_file_contents.lines() {
+        if l.starts_with("// skip-filecheck") {
+            run_filecheck = false;
+            continue;
+        }
         if l.starts_with("// EMIT_MIR ") {
             let test_name = l.trim_start_matches("// EMIT_MIR ").trim();
             let mut test_names = test_name.split(' ');
@@ -65,7 +73,6 @@ pub fn files_for_miropt_test(
             let mut expected_file;
             let from_file;
             let to_file;
-            let mut passes = Vec::new();
 
             if test_name.ends_with(".diff") {
                 let trimmed = test_name.trim_end_matches(".diff");
@@ -114,9 +121,9 @@ pub fn files_for_miropt_test(
             }
             let expected_file = test_dir.join(expected_file);
 
-            out.push(MiroptTestFiles { expected_file, from_file, to_file, passes });
+            out.push(MiroptTestFile { expected_file, from_file, to_file });
         }
     }
 
-    out
+    MiroptTest { run_filecheck, suffix, files: out, passes }
 }
diff --git a/src/tools/tidy/src/mir_opt_tests.rs b/src/tools/tidy/src/mir_opt_tests.rs
index c307bcb9390..76feeb34331 100644
--- a/src/tools/tidy/src/mir_opt_tests.rs
+++ b/src/tools/tidy/src/mir_opt_tests.rs
@@ -26,7 +26,8 @@ fn check_unused_files(path: &Path, bless: bool, bad: &mut bool) {
     for file in rs_files {
         for bw in [32, 64] {
             for ps in [PanicStrategy::Unwind, PanicStrategy::Abort] {
-                for output_file in miropt_test_tools::files_for_miropt_test(&file, bw, ps) {
+                let mir_opt_test = miropt_test_tools::files_for_miropt_test(&file, bw, ps);
+                for output_file in mir_opt_test.files {
                     output_files.remove(&output_file.expected_file);
                 }
             }
diff --git a/tests/mir-opt/README.md b/tests/mir-opt/README.md
index 0721d9f7019..39a7b5aea12 100644
--- a/tests/mir-opt/README.md
+++ b/tests/mir-opt/README.md
@@ -49,3 +49,21 @@ This exists mainly for completeness and is rarely useful.
 ```
 // EMIT_MIR $file_name_of_some_mir_dump.before.mir
 ```
+
+# FileCheck directives
+
+The LLVM FileCheck tool is used to verify the contents of output MIR against `CHECK` directives
+present in the test file. This works on the runtime MIR, generated by `--emit=mir`, and not
+on the output of a individual passes.
+
+Use `// skip-filecheck` to prevent FileCheck from running.
+
+To check MIR for function `foo`, start with a `// CHECK-LABEL fn foo(` directive.
+
+`{{regex}}` syntax allows to match `regex`.
+
+`[[name:regex]]` syntax allows to bind `name` to a string matching `regex`, and refer to it
+as `[[name]]` in later directives, `regex` should be written not to match a leading space.
+Use `[[my_local:_.*]]` to name a local, and `[[my_bb:bb.*]]` to name a block.
+
+Documentation for FileCheck is available here: https://www.llvm.org/docs/CommandGuide/FileCheck.html
diff --git a/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir b/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
index 61aa89e445f..76938c14e1e 100644
--- a/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
@@ -1,36 +1,36 @@
 // MIR for `address_of_reborrow` after SimplifyCfg-initial
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
-| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
-| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
-| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
-| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
-| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
-| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
-| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
-| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
-| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
-| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
-| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
-| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
-| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
-| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
-| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
-| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
-| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
-| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
-| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
-| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
-| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
-| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
-| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
-| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
-| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
-| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
-| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
-| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
-| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
+| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:8:5: 8:18, inferred_ty: *const [i32; 10]
+| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:10:5: 10:25, inferred_ty: *const dyn std::marker::Send
+| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
+| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
+| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
+| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
+| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
+| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
+| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
+| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
+| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:19:5: 19:18, inferred_ty: *const [i32; 10]
+| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:21:5: 21:25, inferred_ty: *const dyn std::marker::Send
+| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
+| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
+| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
+| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
+| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
+| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
+| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
+| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
+| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:29:5: 29:16, inferred_ty: *mut [i32; 10]
+| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:31:5: 31:23, inferred_ty: *mut dyn std::marker::Send
+| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
+| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
+| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
+| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
+| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
+| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
+| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
+| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
 |
 fn address_of_reborrow() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/address_of.rs b/tests/mir-opt/address_of.rs
index c4bea5613e4..57a317a4a90 100644
--- a/tests/mir-opt/address_of.rs
+++ b/tests/mir-opt/address_of.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
 
 fn address_of_reborrow() {
diff --git a/tests/mir-opt/array_index_is_temporary.rs b/tests/mir-opt/array_index_is_temporary.rs
index 950429fb6bc..f5edc68905b 100644
--- a/tests/mir-opt/array_index_is_temporary.rs
+++ b/tests/mir-opt/array_index_is_temporary.rs
@@ -1,3 +1,4 @@
+// unit-test: SimplifyCfg-elaborate-drops
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Retagging (from Stacked Borrows) relies on the array index being a fresh
 // temporary, so that side-effects cannot change it.
@@ -11,6 +12,12 @@ unsafe fn foo(z: *mut usize) -> u32 {
 
 // EMIT_MIR array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug x => [[x:_.*]];
+    // CHECK: debug y => [[y:_.*]];
+    // CHECK: [[y]] = const 1_usize;
+    // CHECK: [[tmp:_.*]] = [[y]];
+    // CHECK: [[x]][[[tmp]]] =
     let mut x = [42, 43, 44];
     let mut y = 1;
     let z: *mut usize = &mut y;
diff --git a/tests/mir-opt/asm_unwind_panic_abort.rs b/tests/mir-opt/asm_unwind_panic_abort.rs
index ad8f9398e7f..a80dcb385b3 100644
--- a/tests/mir-opt/asm_unwind_panic_abort.rs
+++ b/tests/mir-opt/asm_unwind_panic_abort.rs
@@ -9,6 +9,9 @@
 
 // EMIT_MIR asm_unwind_panic_abort.main.AbortUnwindingCalls.after.mir
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: asm!(
+    // CHECK-SAME: unwind terminate(abi)
     unsafe {
         std::arch::asm!("", options(may_unwind));
     }
diff --git a/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
index 75070ffda11..5df6633880e 100644
--- a/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after SimplifyCfg-initial
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
-| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
+| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
+| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/basic_assignment.rs b/tests/mir-opt/basic_assignment.rs
index 92434e44aa9..30a41098888 100644
--- a/tests/mir-opt/basic_assignment.rs
+++ b/tests/mir-opt/basic_assignment.rs
@@ -1,3 +1,4 @@
+// unit-test: ElaborateDrops
 // needs-unwind
 // this tests move up progration, which is not yet implemented
 
@@ -10,6 +11,23 @@
 // destruction.
 
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug nodrop_x => [[nodrop_x:_.*]];
+    // CHECK: debug nodrop_y => [[nodrop_y:_.*]];
+    // CHECK: debug drop_x => [[drop_x:_.*]];
+    // CHECK: debug drop_y => [[drop_y:_.*]];
+    // CHECK-NOT: drop([[nodrop_x]])
+    // CHECK-NOT: drop([[nodrop_y]])
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK: [[drop_tmp:_.*]] = move [[drop_x]];
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK-NOT: drop([[drop_tmp]])
+    // CHECK: [[drop_y]] = move [[drop_tmp]];
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK-NOT: drop([[drop_tmp]])
+    // CHECK: drop([[drop_y]])
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK-NOT: drop([[drop_tmp]])
     let nodrop_x = false;
     let nodrop_y;
 
diff --git a/tests/mir-opt/bool_compare.rs b/tests/mir-opt/bool_compare.rs
deleted file mode 100644
index 080f7f72d11..00000000000
--- a/tests/mir-opt/bool_compare.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// unit-test: InstSimplify
-
-// EMIT_MIR bool_compare.opt1.InstSimplify.diff
-fn opt1(x: bool) -> u32 {
-    if x != true { 0 } else { 1 }
-}
-
-// EMIT_MIR bool_compare.opt2.InstSimplify.diff
-fn opt2(x: bool) -> u32 {
-    if true != x { 0 } else { 1 }
-}
-
-// EMIT_MIR bool_compare.opt3.InstSimplify.diff
-fn opt3(x: bool) -> u32 {
-    if x == false { 0 } else { 1 }
-}
-
-// EMIT_MIR bool_compare.opt4.InstSimplify.diff
-fn opt4(x: bool) -> u32 {
-    if false == x { 0 } else { 1 }
-}
-
-fn main() {
-    opt1(false);
-    opt2(false);
-    opt3(false);
-    opt4(false);
-}
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir b/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir
deleted file mode 100644
index 1c7ef7f8345..00000000000
--- a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir
+++ /dev/null
@@ -1,71 +0,0 @@
-// MIR for `main` before ElaborateDrops
-
-fn main() -> () {
-    let mut _0: ();
-    let _1: std::boxed::Box<S>;
-    let mut _2: usize;
-    let mut _3: usize;
-    let mut _4: *mut u8;
-    let mut _5: std::boxed::Box<S>;
-    let _6: ();
-    let mut _7: std::boxed::Box<S>;
-    scope 1 {
-        debug x => _1;
-    }
-    scope 2 {
-    }
-
-    bb0: {
-        StorageLive(_1);
-        _2 = SizeOf(S);
-        _3 = AlignOf(S);
-        _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind: bb9];
-    }
-
-    bb1: {
-        StorageLive(_5);
-        _5 = ShallowInitBox(move _4, S);
-        (*_5) = S::new() -> [return: bb2, unwind: bb8];
-    }
-
-    bb2: {
-        _1 = move _5;
-        drop(_5) -> [return: bb3, unwind: bb9];
-    }
-
-    bb3: {
-        StorageDead(_5);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = move _1;
-        _6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
-    }
-
-    bb4: {
-        StorageDead(_7);
-        StorageDead(_6);
-        _0 = const ();
-        drop(_1) -> [return: bb5, unwind: bb9];
-    }
-
-    bb5: {
-        StorageDead(_1);
-        return;
-    }
-
-    bb6 (cleanup): {
-        drop(_7) -> [return: bb7, unwind terminate(cleanup)];
-    }
-
-    bb7 (cleanup): {
-        drop(_1) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb8 (cleanup): {
-        drop(_5) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb9 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir b/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir
deleted file mode 100644
index 4ad1c2de129..00000000000
--- a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir
+++ /dev/null
@@ -1,71 +0,0 @@
-// MIR for `main` before ElaborateDrops
-
-fn main() -> () {
-    let mut _0: ();
-    let _1: std::boxed::Box<S>;
-    let mut _2: usize;
-    let mut _3: usize;
-    let mut _4: *mut u8;
-    let mut _5: std::boxed::Box<S>;
-    let _6: ();
-    let mut _7: std::boxed::Box<S>;
-    scope 1 {
-        debug x => _1;
-    }
-    scope 2 {
-    }
-
-    bb0: {
-        StorageLive(_1);
-        _2 = SizeOf(S);
-        _3 = AlignOf(S);
-        _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind continue];
-    }
-
-    bb1: {
-        StorageLive(_5);
-        _5 = ShallowInitBox(move _4, S);
-        (*_5) = S::new() -> [return: bb2, unwind: bb8];
-    }
-
-    bb2: {
-        _1 = move _5;
-        drop(_5) -> [return: bb3, unwind continue];
-    }
-
-    bb3: {
-        StorageDead(_5);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = move _1;
-        _6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
-    }
-
-    bb4: {
-        StorageDead(_7);
-        StorageDead(_6);
-        _0 = const ();
-        drop(_1) -> [return: bb5, unwind continue];
-    }
-
-    bb5: {
-        StorageDead(_1);
-        return;
-    }
-
-    bb6 (cleanup): {
-        drop(_7) -> [return: bb7, unwind terminate(cleanup)];
-    }
-
-    bb7 (cleanup): {
-        drop(_1) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb8 (cleanup): {
-        drop(_5) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb9 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.diff b/tests/mir-opt/box_expr.main.ElaborateDrops.diff
new file mode 100644
index 00000000000..88b12f19e64
--- /dev/null
+++ b/tests/mir-opt/box_expr.main.ElaborateDrops.diff
@@ -0,0 +1,89 @@
+- // MIR for `main` before ElaborateDrops
++ // MIR for `main` after ElaborateDrops
+  
+  fn main() -> () {
+      let mut _0: ();
+      let _1: std::boxed::Box<S>;
+      let mut _2: usize;
+      let mut _3: usize;
+      let mut _4: *mut u8;
+      let mut _5: std::boxed::Box<S>;
+      let _6: ();
+      let mut _7: std::boxed::Box<S>;
++     let mut _8: &mut std::boxed::Box<S>;
++     let mut _9: ();
+      scope 1 {
+          debug x => _1;
+      }
+      scope 2 {
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _2 = SizeOf(S);
+          _3 = AlignOf(S);
+          _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          StorageLive(_5);
+          _5 = ShallowInitBox(move _4, S);
+          (*_5) = S::new() -> [return: bb2, unwind: bb8];
+      }
+  
+      bb2: {
+          _1 = move _5;
+-         drop(_5) -> [return: bb3, unwind continue];
++         goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_5);
+          StorageLive(_6);
+          StorageLive(_7);
+          _7 = move _1;
+          _6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
+      }
+  
+      bb4: {
+          StorageDead(_7);
+          StorageDead(_6);
+          _0 = const ();
+-         drop(_1) -> [return: bb5, unwind continue];
++         goto -> bb5;
+      }
+  
+      bb5: {
+          StorageDead(_1);
+          return;
+      }
+  
+      bb6 (cleanup): {
+-         drop(_7) -> [return: bb7, unwind terminate(cleanup)];
++         goto -> bb7;
+      }
+  
+      bb7 (cleanup): {
+-         drop(_1) -> [return: bb9, unwind terminate(cleanup)];
++         goto -> bb9;
+      }
+  
+      bb8 (cleanup): {
+-         drop(_5) -> [return: bb9, unwind terminate(cleanup)];
++         goto -> bb11;
+      }
+  
+      bb9 (cleanup): {
+          resume;
++     }
++ 
++     bb10 (cleanup): {
++         _8 = &mut _5;
++         _9 = <Box<S> as Drop>::drop(move _8) -> [return: bb9, unwind terminate(cleanup)];
++     }
++ 
++     bb11 (cleanup): {
++         goto -> bb10;
+      }
+  }
+  
diff --git a/tests/mir-opt/box_expr.rs b/tests/mir-opt/box_expr.rs
index 780420bda9f..0421e232ae4 100644
--- a/tests/mir-opt/box_expr.rs
+++ b/tests/mir-opt/box_expr.rs
@@ -1,9 +1,22 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// unit-test: ElaborateDrops
+// needs-unwind
 
 #![feature(rustc_attrs, stmt_expr_attributes)]
 
-// EMIT_MIR box_expr.main.ElaborateDrops.before.mir
+// EMIT_MIR box_expr.main.ElaborateDrops.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK:   [[box:_.*]] = ShallowInitBox(
+    // CHECK:   [[ptr:_.*]] = ((([[box]].0: std::ptr::Unique<S>).0: std::ptr::NonNull<S>).0: *const S);
+    // CHECK:   (*[[ptr]]) = S::new() -> [return: [[ret:bb.*]], unwind: [[unwind:bb.*]]];
+    // CHECK: [[ret]]: {
+    // CHECK:   [[box2:_.*]] = move [[box]];
+    // CHECK:   [[box3:_.*]] = move [[box2]];
+    // CHECK:   std::mem::drop::<Box<S>>(move [[box3]])
+    // CHECK: [[unwind]] (cleanup): {
+    // CHECK:   [[boxref:_.*]] = &mut [[box]];
+    // CHECK:   <Box<S> as Drop>::drop(move [[boxref]])
+
     let x = #[rustc_box]
     Box::new(S::new());
     drop(x);
diff --git a/tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir
index 98b1befc3bf..bc4ca06c113 100644
--- a/tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir
@@ -9,7 +9,7 @@
     storage_conflicts: BitMatrix(0x0) {},
 } */
 
-fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>, _2: &mut Context<'_>) -> Poll<()> {
+fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>, _2: &mut Context<'_>) -> Poll<()> {
     debug _task_context => _4;
     let mut _0: std::task::Poll<()>;
     let mut _3: ();
@@ -17,7 +17,7 @@ fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>
     let mut _5: u32;
 
     bb0: {
-        _5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16})));
+        _5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16})));
         switchInt(move _5) -> [0: bb1, 1: bb4, otherwise: bb5];
     }
 
@@ -29,7 +29,7 @@ fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>
 
     bb2: {
         _0 = Poll::<()>::Ready(move _3);
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16}))) = 1;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16}))) = 1;
         return;
     }
 
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
index 15330b13cc2..4a60e353bf2 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
@@ -14,7 +14,7 @@
                 Static,
             ),
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:15:9: 15:14 (#8),
+                span: $DIR/async_await.rs:16:9: 16:14 (#8),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -32,7 +32,7 @@
                 Static,
             ),
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:16:9: 16:14 (#10),
+                span: $DIR/async_await.rs:17:9: 17:14 (#10),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -51,19 +51,19 @@
     },
 } */
 
-fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>, _2: &mut Context<'_>) -> Poll<()> {
+fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>, _2: &mut Context<'_>) -> Poll<()> {
     debug _task_context => _38;
     let mut _0: std::task::Poll<()>;
     let _3: ();
-    let mut _4: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _5: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _6: {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _4: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _5: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _6: {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let mut _7: ();
     let _8: ();
     let mut _9: std::task::Poll<()>;
-    let mut _10: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>;
-    let mut _11: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _12: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _10: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>;
+    let mut _11: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _12: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let mut _13: &mut std::task::Context<'_>;
     let mut _14: &mut std::task::Context<'_>;
     let mut _15: &mut std::task::Context<'_>;
@@ -71,14 +71,14 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     let mut _18: !;
     let mut _19: &mut std::task::Context<'_>;
     let mut _20: ();
-    let mut _21: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _22: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _23: {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _21: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _22: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _23: {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let _24: ();
     let mut _25: std::task::Poll<()>;
-    let mut _26: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>;
-    let mut _27: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _28: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _26: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>;
+    let mut _27: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _28: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let mut _29: &mut std::task::Context<'_>;
     let mut _30: &mut std::task::Context<'_>;
     let mut _31: &mut std::task::Context<'_>;
@@ -90,7 +90,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     let mut _38: &mut std::task::Context<'_>;
     let mut _39: u32;
     scope 1 {
-        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         let _17: ();
         scope 2 {
         }
@@ -99,7 +99,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         }
     }
     scope 4 {
-        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         let _33: ();
         scope 5 {
         }
@@ -109,7 +109,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     }
 
     bb0: {
-        _39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})));
+        _39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})));
         switchInt(move _39) -> [0: bb1, 1: bb29, 3: bb27, 4: bb28, otherwise: bb30];
     }
 
@@ -122,13 +122,13 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     }
 
     bb2: {
-        _4 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
+        _4 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
         StorageDead(_5);
         nop;
-        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16}) = move _4;
+        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16}) = move _4;
         goto -> bb4;
     }
 
@@ -138,9 +138,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_10);
         StorageLive(_11);
         StorageLive(_12);
-        _12 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        _12 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         _11 = &mut (*_12);
-        _10 = Pin::<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
+        _10 = Pin::<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
     }
 
     bb5: {
@@ -156,7 +156,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     bb6: {
         _13 = &mut (*_14);
         StorageDead(_15);
-        _9 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
+        _9 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
     }
 
     bb7: {
@@ -176,7 +176,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_20);
         _20 = ();
         _0 = Poll::<()>::Pending;
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 3;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 3;
         return;
     }
 
@@ -193,7 +193,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageDead(_12);
         StorageDead(_9);
         StorageDead(_8);
-        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16})) -> [return: bb12, unwind unreachable];
+        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16})) -> [return: bb12, unwind unreachable];
     }
 
     bb11: {
@@ -218,13 +218,13 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     }
 
     bb14: {
-        _21 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
+        _21 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
     }
 
     bb15: {
         StorageDead(_22);
         nop;
-        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16}) = move _21;
+        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16}) = move _21;
         goto -> bb16;
     }
 
@@ -234,9 +234,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_26);
         StorageLive(_27);
         StorageLive(_28);
-        _28 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        _28 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         _27 = &mut (*_28);
-        _26 = Pin::<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
+        _26 = Pin::<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
     }
 
     bb17: {
@@ -252,7 +252,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     bb18: {
         _29 = &mut (*_30);
         StorageDead(_31);
-        _25 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
+        _25 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
     }
 
     bb19: {
@@ -272,7 +272,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_36);
         _36 = ();
         _0 = Poll::<()>::Pending;
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 4;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 4;
         return;
     }
 
@@ -285,7 +285,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageDead(_28);
         StorageDead(_25);
         StorageDead(_24);
-        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16})) -> [return: bb23, unwind unreachable];
+        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16})) -> [return: bb23, unwind unreachable];
     }
 
     bb22: {
@@ -308,7 +308,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
 
     bb25: {
         _0 = Poll::<()>::Ready(move _37);
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 1;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 1;
         return;
     }
 
diff --git a/tests/mir-opt/building/async_await.rs b/tests/mir-opt/building/async_await.rs
index 0b991e3b8f8..74b15f2b98f 100644
--- a/tests/mir-opt/building/async_await.rs
+++ b/tests/mir-opt/building/async_await.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This test makes sure that the generator MIR pass eliminates all calls to
 // `get_context`, and that the MIR argument type for an async fn and all locals
 // related to `yield` are `&mut Context`, and its return type is `Poll`.
diff --git a/tests/mir-opt/building/custom/aggregate_exprs.rs b/tests/mir-opt/building/custom/aggregate_exprs.rs
index 554c9c03ba4..d581886247f 100644
--- a/tests/mir-opt/building/custom/aggregate_exprs.rs
+++ b/tests/mir-opt/building/custom/aggregate_exprs.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/arbitrary_let.rs b/tests/mir-opt/building/custom/arbitrary_let.rs
index 776df3151ff..f8ee8504e32 100644
--- a/tests/mir-opt/building/custom/arbitrary_let.rs
+++ b/tests/mir-opt/building/custom/arbitrary_let.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/arrays.rs b/tests/mir-opt/building/custom/arrays.rs
index 8e0a1fd7a43..fe6abc54687 100644
--- a/tests/mir-opt/building/custom/arrays.rs
+++ b/tests/mir-opt/building/custom/arrays.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics, inline_const)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/as_cast.rs b/tests/mir-opt/building/custom/as_cast.rs
index b4b5ac6aa3b..92aea64db07 100644
--- a/tests/mir-opt/building/custom/as_cast.rs
+++ b/tests/mir-opt/building/custom/as_cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/composite_return.rs b/tests/mir-opt/building/custom/composite_return.rs
index 701d6b1ab71..33c903fa0f8 100644
--- a/tests/mir-opt/building/custom/composite_return.rs
+++ b/tests/mir-opt/building/custom/composite_return.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/consts.rs b/tests/mir-opt/building/custom/consts.rs
index 16d10eb5968..42abf5019e5 100644
--- a/tests/mir-opt/building/custom/consts.rs
+++ b/tests/mir-opt/building/custom/consts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics, inline_const)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/debuginfo.rs b/tests/mir-opt/building/custom/debuginfo.rs
index bfdc3d3eacd..3671a1ef061 100644
--- a/tests/mir-opt/building/custom/debuginfo.rs
+++ b/tests/mir-opt/building/custom/debuginfo.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/enums.rs b/tests/mir-opt/building/custom/enums.rs
index eca5b792ec0..6aab1503c0a 100644
--- a/tests/mir-opt/building/custom/enums.rs
+++ b/tests/mir-opt/building/custom/enums.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/operators.rs b/tests/mir-opt/building/custom/operators.rs
index db7a48317d9..91bdf2b9113 100644
--- a/tests/mir-opt/building/custom/operators.rs
+++ b/tests/mir-opt/building/custom/operators.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: --crate-type=lib
 #![feature(custom_mir, core_intrinsics, inline_const)]
 use std::intrinsics::mir::*;
diff --git a/tests/mir-opt/building/custom/projections.rs b/tests/mir-opt/building/custom/projections.rs
index 3c155deae4b..ac23fe59097 100644
--- a/tests/mir-opt/building/custom/projections.rs
+++ b/tests/mir-opt/building/custom/projections.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/references.rs b/tests/mir-opt/building/custom/references.rs
index f87f6664c7a..04afe6e6494 100644
--- a/tests/mir-opt/building/custom/references.rs
+++ b/tests/mir-opt/building/custom/references.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/simple_assign.rs b/tests/mir-opt/building/custom/simple_assign.rs
index db041aab239..8442272291e 100644
--- a/tests/mir-opt/building/custom/simple_assign.rs
+++ b/tests/mir-opt/building/custom/simple_assign.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs
index 123118f654e..9e442e0f98a 100644
--- a/tests/mir-opt/building/custom/terminators.rs
+++ b/tests/mir-opt/building/custom/terminators.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/enum_cast.rs b/tests/mir-opt/building/enum_cast.rs
index 431b5c708b9..df8e397c8fe 100644
--- a/tests/mir-opt/building/enum_cast.rs
+++ b/tests/mir-opt/building/enum_cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR enum_cast.foo.built.after.mir
 // EMIT_MIR enum_cast.bar.built.after.mir
 // EMIT_MIR enum_cast.boo.built.after.mir
diff --git a/tests/mir-opt/building/issue_101867.main.built.after.mir b/tests/mir-opt/building/issue_101867.main.built.after.mir
index 915c5ef112c..fb60f0f0c2b 100644
--- a/tests/mir-opt/building/issue_101867.main.built.after.mir
+++ b/tests/mir-opt/building/issue_101867.main.built.after.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
-| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
+| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
+| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/building/issue_101867.rs b/tests/mir-opt/building/issue_101867.rs
index a32d8cb3714..f8a531e8982 100644
--- a/tests/mir-opt/building/issue_101867.rs
+++ b/tests/mir-opt/building/issue_101867.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR issue_101867.main.built.after.mir
 fn main() {
     let x: Option<u8> = Some(1);
diff --git a/tests/mir-opt/building/issue_110508.rs b/tests/mir-opt/building/issue_110508.rs
index bcbb1c29830..e597cd5d06b 100644
--- a/tests/mir-opt/building/issue_110508.rs
+++ b/tests/mir-opt/building/issue_110508.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR issue_110508.{impl#0}-BAR.built.after.mir
 // EMIT_MIR issue_110508.{impl#0}-SELF_BAR.built.after.mir
 
diff --git a/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir b/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir
index 5fc6d911af3..c3d28fae518 100644
--- a/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir
+++ b/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR` after built
+// MIR for `<impl at $DIR/issue_110508.rs:9:1: 9:9>::BAR` after built
 
-const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR: Foo = {
+const <impl at $DIR/issue_110508.rs:9:1: 9:9>::BAR: Foo = {
     let mut _0: Foo;
     let mut _1: ();
 
diff --git a/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir b/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir
index 1a892559971..177518c30af 100644
--- a/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir
+++ b/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::SELF_BAR` after built
+// MIR for `<impl at $DIR/issue_110508.rs:9:1: 9:9>::SELF_BAR` after built
 
-const <impl at $DIR/issue_110508.rs:8:1: 8:9>::SELF_BAR: Foo = {
+const <impl at $DIR/issue_110508.rs:9:1: 9:9>::SELF_BAR: Foo = {
     let mut _0: Foo;
     let mut _1: ();
 
diff --git a/tests/mir-opt/building/issue_49232.rs b/tests/mir-opt/building/issue_49232.rs
index 7e9f0de81f7..ac06e02778f 100644
--- a/tests/mir-opt/building/issue_49232.rs
+++ b/tests/mir-opt/building/issue_49232.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // We must mark a variable whose initialization fails due to an
 // abort statement as StorageDead.
 
diff --git a/tests/mir-opt/building/logical_or_in_conditional.rs b/tests/mir-opt/building/logical_or_in_conditional.rs
index ae159f7e122..00e666ed94f 100644
--- a/tests/mir-opt/building/logical_or_in_conditional.rs
+++ b/tests/mir-opt/building/logical_or_in_conditional.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z validate-mir
 #![feature(let_chains)]
 struct Droppy(u8);
diff --git a/tests/mir-opt/building/match_false_edges.rs b/tests/mir-opt/building/match_false_edges.rs
index ddfcc149319..839eda40c85 100644
--- a/tests/mir-opt/building/match_false_edges.rs
+++ b/tests/mir-opt/building/match_false_edges.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 fn guard() -> bool {
     false
 }
diff --git a/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir b/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
index fed5e68c3c9..e07c2b6fa9d 100644
--- a/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
+++ b/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
@@ -1,10 +1,10 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
-| 1: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
-| 2: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
-| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
+| 0: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:15:14: 15:23, inferred_ty: *mut Test
+| 1: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:15:14: 15:23, inferred_ty: *mut Test
+| 2: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:19:18: 19:31, inferred_ty: &&&&*mut Test
+| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:19:18: 19:31, inferred_ty: &&&&*mut Test
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/building/receiver_ptr_mutability.rs b/tests/mir-opt/building/receiver_ptr_mutability.rs
index 668530968fe..4bb3b4cade5 100644
--- a/tests/mir-opt/building/receiver_ptr_mutability.rs
+++ b/tests/mir-opt/building/receiver_ptr_mutability.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR receiver_ptr_mutability.main.built.after.mir
 
 #![feature(arbitrary_self_types)]
diff --git a/tests/mir-opt/building/shifts.rs b/tests/mir-opt/building/shifts.rs
index 4b63a00a304..c94a142d336 100644
--- a/tests/mir-opt/building/shifts.rs
+++ b/tests/mir-opt/building/shifts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -C debug-assertions=yes
 
 // EMIT_MIR shifts.shift_signed.built.after.mir
diff --git a/tests/mir-opt/building/simple_match.rs b/tests/mir-opt/building/simple_match.rs
index 0ef97dde636..4f0a3046a06 100644
--- a/tests/mir-opt/building/simple_match.rs
+++ b/tests/mir-opt/building/simple_match.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that we don't generate unnecessarily large MIR for very simple matches
 
 
diff --git a/tests/mir-opt/building/storage_live_dead_in_statics.rs b/tests/mir-opt/building/storage_live_dead_in_statics.rs
index 79f709148e3..1f569211854 100644
--- a/tests/mir-opt/building/storage_live_dead_in_statics.rs
+++ b/tests/mir-opt/building/storage_live_dead_in_statics.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Check that when we compile the static `XXX` into MIR, we do not
 // generate `StorageStart` or `StorageEnd` statements.
 
diff --git a/tests/mir-opt/building/uniform_array_move_out.rs b/tests/mir-opt/building/uniform_array_move_out.rs
index 4ba107c8704..0682891611d 100644
--- a/tests/mir-opt/building/uniform_array_move_out.rs
+++ b/tests/mir-opt/building/uniform_array_move_out.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(stmt_expr_attributes, rustc_attrs)]
 
 // EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir
diff --git a/tests/mir-opt/byte_slice.rs b/tests/mir-opt/byte_slice.rs
index 48e9c48c120..813d9ccfdc2 100644
--- a/tests/mir-opt/byte_slice.rs
+++ b/tests/mir-opt/byte_slice.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=0
 
 // EMIT_MIR byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
diff --git a/tests/mir-opt/casts.redundant.PreCodegen.after.mir b/tests/mir-opt/casts.redundant.PreCodegen.after.mir
deleted file mode 100644
index 2084f44f248..00000000000
--- a/tests/mir-opt/casts.redundant.PreCodegen.after.mir
+++ /dev/null
@@ -1,14 +0,0 @@
-// MIR for `redundant` after PreCodegen
-
-fn redundant(_1: *const &u8) -> *const &u8 {
-    debug x => _1;
-    let mut _0: *const &u8;
-    scope 1 (inlined generic_cast::<&u8, &u8>) {
-        debug x => _1;
-    }
-
-    bb0: {
-        _0 = _1;
-        return;
-    }
-}
diff --git a/tests/mir-opt/casts.roundtrip.PreCodegen.after.mir b/tests/mir-opt/casts.roundtrip.PreCodegen.after.mir
deleted file mode 100644
index f0c35fe9782..00000000000
--- a/tests/mir-opt/casts.roundtrip.PreCodegen.after.mir
+++ /dev/null
@@ -1,15 +0,0 @@
-// MIR for `roundtrip` after PreCodegen
-
-fn roundtrip(_1: *const u8) -> *const u8 {
-    debug x => _1;
-    let mut _0: *const u8;
-    let mut _2: *mut u8;
-
-    bb0: {
-        StorageLive(_2);
-        _2 = _1 as *mut u8 (PtrToPtr);
-        _0 = move _2 as *const u8 (PointerCoercion(MutToConstPointer));
-        StorageDead(_2);
-        return;
-    }
-}
diff --git a/tests/mir-opt/casts.rs b/tests/mir-opt/casts.rs
deleted file mode 100644
index 413b0e09d3f..00000000000
--- a/tests/mir-opt/casts.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-#![crate_type = "lib"]
-
-// EMIT_MIR casts.redundant.InstSimplify.diff
-// EMIT_MIR casts.redundant.PreCodegen.after.mir
-pub fn redundant<'a, 'b: 'a>(x: *const &'a u8) -> *const &'a u8 {
-    generic_cast::<&'a u8, &'b u8>(x) as *const &'a u8
-}
-
-#[inline]
-fn generic_cast<T, U>(x: *const T) -> *const U {
-    x as *const U
-}
-
-// EMIT_MIR casts.roundtrip.PreCodegen.after.mir
-pub fn roundtrip(x: *const u8) -> *const u8 {
-    x as *mut u8 as *const u8
-}
diff --git a/tests/mir-opt/const_allocation.rs b/tests/mir-opt/const_allocation.rs
index 91a2455eb83..577c61aeb7d 100644
--- a/tests/mir-opt/const_allocation.rs
+++ b/tests/mir-opt/const_allocation.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_allocation2.rs b/tests/mir-opt/const_allocation2.rs
index f2870aa47c5..0fcfaad842c 100644
--- a/tests/mir-opt/const_allocation2.rs
+++ b/tests/mir-opt/const_allocation2.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_allocation3.rs b/tests/mir-opt/const_allocation3.rs
index da3fd089b02..b8c9f50977e 100644
--- a/tests/mir-opt/const_allocation3.rs
+++ b/tests/mir-opt/const_allocation3.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_debuginfo.rs b/tests/mir-opt/const_debuginfo.rs
index a188da38526..d8ae08a0723 100644
--- a/tests/mir-opt/const_debuginfo.rs
+++ b/tests/mir-opt/const_debuginfo.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -C overflow-checks=no -Zunsound-mir-opts
 
 struct Point {
diff --git a/tests/mir-opt/const_goto.rs b/tests/mir-opt/const_goto.rs
index 6f84f186b31..93cb71c3a0f 100644
--- a/tests/mir-opt/const_goto.rs
+++ b/tests/mir-opt/const_goto.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstGoto
 
 pub enum Foo {
diff --git a/tests/mir-opt/const_goto_const_eval_fail.rs b/tests/mir-opt/const_goto_const_eval_fail.rs
index b2357663a90..869f916001c 100644
--- a/tests/mir-opt/const_goto_const_eval_fail.rs
+++ b/tests/mir-opt/const_goto_const_eval_fail.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(min_const_generics)]
 #![crate_type = "lib"]
 
diff --git a/tests/mir-opt/const_goto_storage.rs b/tests/mir-opt/const_goto_storage.rs
index 459599c73eb..9d43da23990 100644
--- a/tests/mir-opt/const_goto_storage.rs
+++ b/tests/mir-opt/const_goto_storage.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstGoto
 
 // EMIT_MIR const_goto_storage.match_nested_if.ConstGoto.diff
diff --git a/tests/mir-opt/const_promotion_extern_static.rs b/tests/mir-opt/const_promotion_extern_static.rs
index e4261cfe504..edc3a522338 100644
--- a/tests/mir-opt/const_promotion_extern_static.rs
+++ b/tests/mir-opt/const_promotion_extern_static.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // ignore-endian-big
 extern "C" {
     static X: i32;
diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs
index 43dc9bae625..169469a0739 100644
--- a/tests/mir-opt/const_prop/address_of_pair.rs
+++ b/tests/mir-opt/const_prop/address_of_pair.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR address_of_pair.fn0.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/aggregate.rs b/tests/mir-opt/const_prop/aggregate.rs
index 62cd3dd6889..2e043af08bf 100644
--- a/tests/mir-opt/const_prop/aggregate.rs
+++ b/tests/mir-opt/const_prop/aggregate.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -O
diff --git a/tests/mir-opt/const_prop/array_index.rs b/tests/mir-opt/const_prop/array_index.rs
index f85d23b9789..3bd2321653d 100644
--- a/tests/mir-opt/const_prop/array_index.rs
+++ b/tests/mir-opt/const_prop/array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
index 963084bf7e5..ab41f64a573 100644
--- a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
+++ b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // EMIT_MIR bad_op_div_by_zero.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
index 9d7d2aa1044..e747b21cf9b 100644
--- a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
+++ b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
index d6b1a93f304..38c97a4cf0e 100644
--- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
+++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/boolean_identities.rs b/tests/mir-opt/const_prop/boolean_identities.rs
index c7b609949cd..781cce8c7dd 100644
--- a/tests/mir-opt/const_prop/boolean_identities.rs
+++ b/tests/mir-opt/const_prop/boolean_identities.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -O -Zmir-opt-level=4
 
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
index 78599174b42..c6807ece199 100644
--- a/tests/mir-opt/const_prop/boxes.rs
+++ b/tests/mir-opt/const_prop/boxes.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -O
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/const_prop/cast.rs b/tests/mir-opt/const_prop/cast.rs
index 984086eda48..3d543badace 100644
--- a/tests/mir-opt/const_prop/cast.rs
+++ b/tests/mir-opt/const_prop/cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR cast.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/checked_add.rs b/tests/mir-opt/const_prop/checked_add.rs
index fd40876cbc2..6a53aced091 100644
--- a/tests/mir-opt/const_prop/checked_add.rs
+++ b/tests/mir-opt/const_prop/checked_add.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -C overflow-checks=on
diff --git a/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs b/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
index c92831f926d..5bd4731bf08 100644
--- a/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
+++ b/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 #[inline(never)]
diff --git a/tests/mir-opt/const_prop/control_flow_simplification.rs b/tests/mir-opt/const_prop/control_flow_simplification.rs
index 21d727b3e50..5fc13e20275 100644
--- a/tests/mir-opt/const_prop/control_flow_simplification.rs
+++ b/tests/mir-opt/const_prop/control_flow_simplification.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Zmir-opt-level=1
diff --git a/tests/mir-opt/const_prop/discriminant.rs b/tests/mir-opt/const_prop/discriminant.rs
index fdd67ca8ac4..11405f38bdc 100644
--- a/tests/mir-opt/const_prop/discriminant.rs
+++ b/tests/mir-opt/const_prop/discriminant.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -O
 
diff --git a/tests/mir-opt/const_prop/indirect.rs b/tests/mir-opt/const_prop/indirect.rs
index 72af6cd95b8..0e6e1d78d1e 100644
--- a/tests/mir-opt/const_prop/indirect.rs
+++ b/tests/mir-opt/const_prop/indirect.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -C overflow-checks=on
diff --git a/tests/mir-opt/const_prop/inherit_overflow.rs b/tests/mir-opt/const_prop/inherit_overflow.rs
index 6ebd364121a..41989462deb 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.rs
+++ b/tests/mir-opt/const_prop/inherit_overflow.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+Inline
diff --git a/tests/mir-opt/const_prop/invalid_constant.rs b/tests/mir-opt/const_prop/invalid_constant.rs
index bdbc5a1990e..ff6b31a1ee2 100644
--- a/tests/mir-opt/const_prop/invalid_constant.rs
+++ b/tests/mir-opt/const_prop/invalid_constant.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+RemoveZsts
 // Verify that we can pretty print invalid constants.
diff --git a/tests/mir-opt/const_prop/issue_66971.rs b/tests/mir-opt/const_prop/issue_66971.rs
index a0242ec633f..386c95b5b69 100644
--- a/tests/mir-opt/const_prop/issue_66971.rs
+++ b/tests/mir-opt/const_prop/issue_66971.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Z mir-opt-level=3
diff --git a/tests/mir-opt/const_prop/issue_67019.rs b/tests/mir-opt/const_prop/issue_67019.rs
index 66b577f5b5f..2f61298bb98 100644
--- a/tests/mir-opt/const_prop/issue_67019.rs
+++ b/tests/mir-opt/const_prop/issue_67019.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Z mir-opt-level=3
diff --git a/tests/mir-opt/const_prop/large_array_index.rs b/tests/mir-opt/const_prop/large_array_index.rs
index d226bd54671..d98d166ff7c 100644
--- a/tests/mir-opt/const_prop/large_array_index.rs
+++ b/tests/mir-opt/const_prop/large_array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/mult_by_zero.rs b/tests/mir-opt/const_prop/mult_by_zero.rs
index 7bd30975a73..47e15205ea9 100644
--- a/tests/mir-opt/const_prop/mult_by_zero.rs
+++ b/tests/mir-opt/const_prop/mult_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mult_by_zero.test.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs
index 95987ef7fa9..175d63d46f5 100644
--- a/tests/mir-opt/const_prop/mutable_variable.rs
+++ b/tests/mir-opt/const_prop/mutable_variable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
index a145c035438..f926771ae38 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
index 3099e659f3f..a81aa7b4979 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
index 30ea5714ae4..54a5d922321 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 
diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
index e51c6223555..a7aeeccd861 100644
--- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 static mut STATIC: u32 = 0x42424242;
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
index 4e7c0597a29..6bdb136a949 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 
diff --git a/tests/mir-opt/const_prop/offset_of.rs b/tests/mir-opt/const_prop/offset_of.rs
index 164db59572b..21911f8dbb5 100644
--- a/tests/mir-opt/const_prop/offset_of.rs
+++ b/tests/mir-opt/const_prop/offset_of.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs
index fb8f9fe996a..a8d8cfacc7c 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.rs
+++ b/tests/mir-opt/const_prop/read_immutable_static.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 static FOO: u8 = 2;
diff --git a/tests/mir-opt/const_prop/ref_deref.rs b/tests/mir-opt/const_prop/ref_deref.rs
index 76e56916af0..f2fa024f722 100644
--- a/tests/mir-opt/const_prop/ref_deref.rs
+++ b/tests/mir-opt/const_prop/ref_deref.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR ref_deref.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs
index 04fc7f8daa1..1b9e0acb2c0 100644
--- a/tests/mir-opt/const_prop/ref_deref_project.rs
+++ b/tests/mir-opt/const_prop/ref_deref_project.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR ref_deref_project.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.rs b/tests/mir-opt/const_prop/reify_fn_ptr.rs
index 5f63820669b..da7de80c5f4 100644
--- a/tests/mir-opt/const_prop/reify_fn_ptr.rs
+++ b/tests/mir-opt/const_prop/reify_fn_ptr.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR reify_fn_ptr.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/repeat.rs b/tests/mir-opt/const_prop/repeat.rs
index fb8b825ee36..92194d6bb58 100644
--- a/tests/mir-opt/const_prop/repeat.rs
+++ b/tests/mir-opt/const_prop/repeat.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs
index 0576b02a845..1263de7931f 100644
--- a/tests/mir-opt/const_prop/return_place.rs
+++ b/tests/mir-opt/const_prop/return_place.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -C overflow-checks=on
diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.rs b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
index dfe41e6145b..9dcddf7c770 100644
--- a/tests/mir-opt/const_prop/scalar_literal_propagation.rs
+++ b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index e91724536f9..3b551b6b173 100644
--- a/tests/mir-opt/const_prop/slice_len.rs
+++ b/tests/mir-opt/const_prop/slice_len.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+InstSimplify
diff --git a/tests/mir-opt/const_prop/switch_int.rs b/tests/mir-opt/const_prop/switch_int.rs
index bf708c8298e..7ec56e11e85 100644
--- a/tests/mir-opt/const_prop/switch_int.rs
+++ b/tests/mir-opt/const_prop/switch_int.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/const_prop/transmute.rs b/tests/mir-opt/const_prop/transmute.rs
index 762c421715a..99988d05994 100644
--- a/tests/mir-opt/const_prop/transmute.rs
+++ b/tests/mir-opt/const_prop/transmute.rs
@@ -7,55 +7,77 @@ use std::mem::transmute;
 
 // EMIT_MIR transmute.less_as_i8.ConstProp.diff
 pub fn less_as_i8() -> i8 {
+    // CHECK-LABEL: fn less_as_i8(
+    // CHECK: _0 = const -1_i8;
     unsafe { transmute(std::cmp::Ordering::Less) }
 }
 
 // EMIT_MIR transmute.from_char.ConstProp.diff
 pub fn from_char() -> i32 {
+    // CHECK-LABEL: fn from_char(
+    // CHECK: _0 = const 82_i32;
     unsafe { transmute('R') }
 }
 
 // EMIT_MIR transmute.valid_char.ConstProp.diff
 pub fn valid_char() -> char {
+    // CHECK-LABEL: fn valid_char(
+    // CHECK: _0 = const 'R';
     unsafe { transmute(0x52_u32) }
 }
 
 // EMIT_MIR transmute.invalid_char.ConstProp.diff
 pub unsafe fn invalid_char() -> char {
+    // CHECK-LABEL: fn invalid_char(
+    // CHECK: _0 = const {transmute(0x7fffffff): char};
     unsafe { transmute(i32::MAX) }
 }
 
 // EMIT_MIR transmute.invalid_bool.ConstProp.diff
 pub unsafe fn invalid_bool() -> bool {
+    // CHECK-LABEL: fn invalid_bool(
+    // CHECK: _0 = const {transmute(0xff): bool};
     unsafe { transmute(-1_i8) }
 }
 
 // EMIT_MIR transmute.undef_union_as_integer.ConstProp.diff
 pub unsafe fn undef_union_as_integer() -> u32 {
+    // CHECK-LABEL: fn undef_union_as_integer(
+    // CHECK: _1 = Union32 {
+    // CHECK: _0 = move _1 as u32 (Transmute);
     union Union32 { value: u32, unit: () }
     unsafe { transmute(Union32 { unit: () }) }
 }
 
 // EMIT_MIR transmute.unreachable_direct.ConstProp.diff
 pub unsafe fn unreachable_direct() -> ! {
+    // CHECK-LABEL: fn unreachable_direct(
+    // CHECK: [[unit:_.*]] = ();
+    // CHECK: move [[unit]] as Never (Transmute);
     let x: Never = unsafe { transmute(()) };
     match x {}
 }
 
 // EMIT_MIR transmute.unreachable_ref.ConstProp.diff
 pub unsafe fn unreachable_ref() -> ! {
+    // CHECK-LABEL: fn unreachable_ref(
+    // CHECK: = const {0x1 as &Never};
     let x: &Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_mut.ConstProp.diff
 pub unsafe fn unreachable_mut() -> ! {
+    // CHECK-LABEL: fn unreachable_mut(
+    // CHECK: = const {0x1 as &mut Never};
     let x: &mut Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_box.ConstProp.diff
 pub unsafe fn unreachable_box() -> ! {
+    // CHECK-LABEL: fn unreachable_box(
+    // CHECK: = const Box::<Never>(
     let x: Box<Never> = unsafe { transmute(1_usize) };
     match *x {}
 }
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
index 5890a343f26..e0bc6e1be37 100644
--- a/tests/mir-opt/const_prop/tuple_literal_propagation.rs
+++ b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/while_let_loops.rs b/tests/mir-opt/const_prop/while_let_loops.rs
index 595a94b88be..39081c3550a 100644
--- a/tests/mir-opt/const_prop/while_let_loops.rs
+++ b/tests/mir-opt/const_prop/while_let_loops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR while_let_loops.change_loop_body.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop_miscompile.rs b/tests/mir-opt/const_prop_miscompile.rs
index dbbe5ee0840..00696535ac1 100644
--- a/tests/mir-opt/const_prop_miscompile.rs
+++ b/tests/mir-opt/const_prop_miscompile.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 #![feature(raw_ref_op)]
 
diff --git a/tests/mir-opt/copy-prop/borrowed_local.rs b/tests/mir-opt/copy-prop/borrowed_local.rs
index bf94dc57d33..c6b8ad3571f 100644
--- a/tests/mir-opt/copy-prop/borrowed_local.rs
+++ b/tests/mir-opt/copy-prop/borrowed_local.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/branch.rs b/tests/mir-opt/copy-prop/branch.rs
index c8af1aa7bf9..2785089579f 100644
--- a/tests/mir-opt/copy-prop/branch.rs
+++ b/tests/mir-opt/copy-prop/branch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that we bail out when there are multiple assignments to the same local.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/copy-prop/calls.rs b/tests/mir-opt/copy-prop/calls.rs
index c1f86f1f412..2970f5f0b8d 100644
--- a/tests/mir-opt/copy-prop/calls.rs
+++ b/tests/mir-opt/copy-prop/calls.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Check that CopyProp does propagate return values of call terminators.
 // unit-test: CopyProp
 // needs-unwind
diff --git a/tests/mir-opt/copy-prop/copy_propagation_arg.rs b/tests/mir-opt/copy-prop/copy_propagation_arg.rs
index 671860da50d..83bbefe09ed 100644
--- a/tests/mir-opt/copy-prop/copy_propagation_arg.rs
+++ b/tests/mir-opt/copy-prop/copy_propagation_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that CopyProp does not propagate an assignment to a function argument
 // (doing so can break usages of the original argument value)
diff --git a/tests/mir-opt/copy-prop/custom_move_arg.rs b/tests/mir-opt/copy-prop/custom_move_arg.rs
index d1c5ffdff0d..2077874ee9a 100644
--- a/tests/mir-opt/copy-prop/custom_move_arg.rs
+++ b/tests/mir-opt/copy-prop/custom_move_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/cycle.rs b/tests/mir-opt/copy-prop/cycle.rs
index 56ec7539734..58e049fde4b 100644
--- a/tests/mir-opt/copy-prop/cycle.rs
+++ b/tests/mir-opt/copy-prop/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/copy-prop/dead_stores_79191.rs b/tests/mir-opt/copy-prop/dead_stores_79191.rs
index 4260d35b194..81306ab613a 100644
--- a/tests/mir-opt/copy-prop/dead_stores_79191.rs
+++ b/tests/mir-opt/copy-prop/dead_stores_79191.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/dead_stores_better.rs b/tests/mir-opt/copy-prop/dead_stores_better.rs
index c5962db6a40..7addf6af23b 100644
--- a/tests/mir-opt/copy-prop/dead_stores_better.rs
+++ b/tests/mir-opt/copy-prop/dead_stores_better.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
 // that that pass enables this one to do more optimizations.
diff --git a/tests/mir-opt/copy-prop/issue_107511.rs b/tests/mir-opt/copy-prop/issue_107511.rs
index ce6fcc17b57..53fd9366276 100644
--- a/tests/mir-opt/copy-prop/issue_107511.rs
+++ b/tests/mir-opt/copy-prop/issue_107511.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/move_arg.rs b/tests/mir-opt/copy-prop/move_arg.rs
index a3a04e57bc1..fc2932a65dd 100644
--- a/tests/mir-opt/copy-prop/move_arg.rs
+++ b/tests/mir-opt/copy-prop/move_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Test that we do not move multiple times from the same local.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/copy-prop/move_projection.rs b/tests/mir-opt/copy-prop/move_projection.rs
index f94addb5629..8629d535bcf 100644
--- a/tests/mir-opt/copy-prop/move_projection.rs
+++ b/tests/mir-opt/copy-prop/move_projection.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/mutate_through_pointer.rs b/tests/mir-opt/copy-prop/mutate_through_pointer.rs
index 753787089b5..e36a10846a6 100644
--- a/tests/mir-opt/copy-prop/mutate_through_pointer.rs
+++ b/tests/mir-opt/copy-prop/mutate_through_pointer.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: CopyProp
 //
 // This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB
diff --git a/tests/mir-opt/copy-prop/non_dominate.rs b/tests/mir-opt/copy-prop/non_dominate.rs
index c0ea838e1c8..c26ac444e5c 100644
--- a/tests/mir-opt/copy-prop/non_dominate.rs
+++ b/tests/mir-opt/copy-prop/non_dominate.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: CopyProp
 
 #![feature(custom_mir, core_intrinsics)]
diff --git a/tests/mir-opt/copy-prop/partial_init.rs b/tests/mir-opt/copy-prop/partial_init.rs
index f5ab9974f71..44cc203de0d 100644
--- a/tests/mir-opt/copy-prop/partial_init.rs
+++ b/tests/mir-opt/copy-prop/partial_init.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: CopyProp
 // Verify that we do not ICE on partial initializations.
 
diff --git a/tests/mir-opt/copy-prop/reborrow.rs b/tests/mir-opt/copy-prop/reborrow.rs
index c37ba5e5c4c..57c4fb8ade9 100644
--- a/tests/mir-opt/copy-prop/reborrow.rs
+++ b/tests/mir-opt/copy-prop/reborrow.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that CopyProp considers reborrows as not mutating the pointer.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs
index ddb3646ca9b..3d420f93007 100644
--- a/tests/mir-opt/dataflow-const-prop/array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs
index 9e911e85b88..2605c7019e6 100644
--- a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs
+++ b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR boolean_identities.test.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/cast.rs b/tests/mir-opt/dataflow-const-prop/cast.rs
index 484403f7f0e..c87872609dc 100644
--- a/tests/mir-opt/dataflow-const-prop/cast.rs
+++ b/tests/mir-opt/dataflow-const-prop/cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR cast.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/checked.rs b/tests/mir-opt/dataflow-const-prop/checked.rs
index 1c301460f5d..b41ac0b3d2a 100644
--- a/tests/mir-opt/dataflow-const-prop/checked.rs
+++ b/tests/mir-opt/dataflow-const-prop/checked.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // compile-flags: -Coverflow-checks=on
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
index dfeccd3eb94..1bb052736c0 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // compile-flags: -Zmir-enable-passes=+ConstProp,+Inline
 // ignore-debug assertions change the output MIR
diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs
index 5a10e9e883d..e35c0e6e85b 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.rs
+++ b/tests/mir-opt/dataflow-const-prop/enum.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
diff --git a/tests/mir-opt/dataflow-const-prop/if.rs b/tests/mir-opt/dataflow-const-prop/if.rs
index 34fc35790c1..72aabbccf56 100644
--- a/tests/mir-opt/dataflow-const-prop/if.rs
+++ b/tests/mir-opt/dataflow-const-prop/if.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR if.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs
index 964c58966f0..664cbcb2c25 100644
--- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs
+++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // compile-flags: -Zmir-enable-passes=+Inline
diff --git a/tests/mir-opt/dataflow-const-prop/issue_81605.rs b/tests/mir-opt/dataflow-const-prop/issue_81605.rs
index d75e2a28bef..7c5eceb8a2b 100644
--- a/tests/mir-opt/dataflow-const-prop/issue_81605.rs
+++ b/tests/mir-opt/dataflow-const-prop/issue_81605.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR issue_81605.f.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/large_array_index.rs b/tests/mir-opt/dataflow-const-prop/large_array_index.rs
index af13c7d1020..d611a54ba71 100644
--- a/tests/mir-opt/dataflow-const-prop/large_array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/large_array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs
index dbea1480445..16a45c8e9fb 100644
--- a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs
+++ b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR mult_by_zero.test.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.rs b/tests/mir-opt/dataflow-const-prop/offset_of.rs
index ccc90790e52..e71b3f59eca 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.rs
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
diff --git a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
index 4ac0a5b3298..2851c0590ad 100644
--- a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
+++ b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 
diff --git a/tests/mir-opt/dataflow-const-prop/repeat.rs b/tests/mir-opt/dataflow-const-prop/repeat.rs
index 9fa353e44c5..b8244819481 100644
--- a/tests/mir-opt/dataflow-const-prop/repeat.rs
+++ b/tests/mir-opt/dataflow-const-prop/repeat.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs
index 4ce0ca4dff4..8cbed6fbb62 100644
--- a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs
+++ b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // The struct has scalar ABI, but is not a scalar type.
diff --git a/tests/mir-opt/dataflow-const-prop/self_assign.rs b/tests/mir-opt/dataflow-const-prop/self_assign.rs
index 8de2195f93b..c5866c4a9fd 100644
--- a/tests/mir-opt/dataflow-const-prop/self_assign.rs
+++ b/tests/mir-opt/dataflow-const-prop/self_assign.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR self_assign.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs
index e3282762459..cfe1458e44b 100644
--- a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs
+++ b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR self_assign_add.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
index 87842f347e4..68aff528695 100644
--- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
+++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This attempts to modify `x.1` via a pointer derived from `addr_of_mut!(x.0)`.
 // According to Miri, that is UB. However, T-opsem has not finalized that
diff --git a/tests/mir-opt/dataflow-const-prop/slice_len.rs b/tests/mir-opt/dataflow-const-prop/slice_len.rs
index 41367e48497..86266ef5d4e 100644
--- a/tests/mir-opt/dataflow-const-prop/slice_len.rs
+++ b/tests/mir-opt/dataflow-const-prop/slice_len.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // compile-flags: -Zmir-enable-passes=+InstSimplify
diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs
index e92a1676d3f..7b0646a5356 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.rs
+++ b/tests/mir-opt/dataflow-const-prop/struct.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
diff --git a/tests/mir-opt/dataflow-const-prop/terminator.rs b/tests/mir-opt/dataflow-const-prop/terminator.rs
index 114dbeca5ac..92a42f22c21 100644
--- a/tests/mir-opt/dataflow-const-prop/terminator.rs
+++ b/tests/mir-opt/dataflow-const-prop/terminator.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.rs b/tests/mir-opt/dataflow-const-prop/transmute.rs
index c25e33ab0b6..02e4f1e5013 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.rs
+++ b/tests/mir-opt/dataflow-const-prop/transmute.rs
@@ -7,55 +7,77 @@ use std::mem::transmute;
 
 // EMIT_MIR transmute.less_as_i8.DataflowConstProp.diff
 pub fn less_as_i8() -> i8 {
+    // CHECK-LABEL: fn less_as_i8(
+    // FIXME-CHECK: _0 = const -1_i8;
     unsafe { transmute(std::cmp::Ordering::Less) }
 }
 
 // EMIT_MIR transmute.from_char.DataflowConstProp.diff
 pub fn from_char() -> i32 {
+    // CHECK-LABEL: fn from_char(
+    // CHECK: _0 = const 82_i32;
     unsafe { transmute('R') }
 }
 
 // EMIT_MIR transmute.valid_char.DataflowConstProp.diff
 pub fn valid_char() -> char {
+    // CHECK-LABEL: fn valid_char(
+    // CHECK: _0 = const 'R';
     unsafe { transmute(0x52_u32) }
 }
 
 // EMIT_MIR transmute.invalid_char.DataflowConstProp.diff
 pub unsafe fn invalid_char() -> char {
+    // CHECK-LABEL: fn invalid_char(
+    // CHECK: _0 = const {transmute(0x7fffffff): char};
     unsafe { transmute(i32::MAX) }
 }
 
 // EMIT_MIR transmute.invalid_bool.DataflowConstProp.diff
 pub unsafe fn invalid_bool() -> bool {
+    // CHECK-LABEL: fn invalid_bool(
+    // CHECK: _0 = const {transmute(0xff): bool};
     unsafe { transmute(-1_i8) }
 }
 
 // EMIT_MIR transmute.undef_union_as_integer.DataflowConstProp.diff
 pub unsafe fn undef_union_as_integer() -> u32 {
+    // CHECK-LABEL: fn undef_union_as_integer(
+    // CHECK: _1 = Union32 {
+    // CHECK: _0 = move _1 as u32 (Transmute);
     union Union32 { value: u32, unit: () }
     unsafe { transmute(Union32 { unit: () }) }
 }
 
 // EMIT_MIR transmute.unreachable_direct.DataflowConstProp.diff
 pub unsafe fn unreachable_direct() -> ! {
+    // CHECK-LABEL: fn unreachable_direct(
+    // CHECK: [[unit:_.*]] = ();
+    // CHECK: move [[unit]] as Never (Transmute);
     let x: Never = unsafe { transmute(()) };
     match x {}
 }
 
 // EMIT_MIR transmute.unreachable_ref.DataflowConstProp.diff
 pub unsafe fn unreachable_ref() -> ! {
+    // CHECK-LABEL: fn unreachable_ref(
+    // CHECK: = const {0x1 as &Never};
     let x: &Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_mut.DataflowConstProp.diff
 pub unsafe fn unreachable_mut() -> ! {
+    // CHECK-LABEL: fn unreachable_mut(
+    // CHECK: = const {0x1 as &mut Never};
     let x: &mut Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_box.DataflowConstProp.diff
 pub unsafe fn unreachable_box() -> ! {
+    // CHECK-LABEL: fn unreachable_box(
+    // CHECK: = const Box::<Never>(
     let x: Box<Never> = unsafe { transmute(1_usize) };
     match *x {}
 }
diff --git a/tests/mir-opt/dataflow-const-prop/tuple.rs b/tests/mir-opt/dataflow-const-prop/tuple.rs
index 92c70eab0ff..c63ce8b140f 100644
--- a/tests/mir-opt/dataflow-const-prop/tuple.rs
+++ b/tests/mir-opt/dataflow-const-prop/tuple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR tuple.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
index f09cdee1482..dcd15fb2b09 100644
--- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
+++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DeadStoreElimination
 // compile-flags: -Zmir-enable-passes=+CopyProp
diff --git a/tests/mir-opt/dead-store-elimination/cycle.rs b/tests/mir-opt/dead-store-elimination/cycle.rs
index e3def2f65da..8896f5ff345 100644
--- a/tests/mir-opt/dead-store-elimination/cycle.rs
+++ b/tests/mir-opt/dead-store-elimination/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This example is interesting because the non-transitive version of `MaybeLiveLocals` would
 // report that *all* of these stores are live.
 //
diff --git a/tests/mir-opt/dead-store-elimination/place_mention.rs b/tests/mir-opt/dead-store-elimination/place_mention.rs
index 59dc74454a4..4813cf7ee2b 100644
--- a/tests/mir-opt/dead-store-elimination/place_mention.rs
+++ b/tests/mir-opt/dead-store-elimination/place_mention.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DeadStoreElimination
 // compile-flags: -Zmir-keep-place-mention
 
diff --git a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs
index 11314e99098..24ffbe980eb 100644
--- a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs
+++ b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DeadStoreElimination
 // compile-flags: -Zmir-emit-retag
 
diff --git a/tests/mir-opt/deduplicate_blocks.rs b/tests/mir-opt/deduplicate_blocks.rs
index 0c38c7f215e..d3b89102f0c 100644
--- a/tests/mir-opt/deduplicate_blocks.rs
+++ b/tests/mir-opt/deduplicate_blocks.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DeduplicateBlocks
 
diff --git a/tests/mir-opt/deref-patterns/string.rs b/tests/mir-opt/deref-patterns/string.rs
index 3a99c44aa0e..0c8385b5c48 100644
--- a/tests/mir-opt/deref-patterns/string.rs
+++ b/tests/mir-opt/deref-patterns/string.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=0 -C panic=abort
 
 #![feature(string_deref_patterns)]
diff --git a/tests/mir-opt/derefer_complex_case.rs b/tests/mir-opt/derefer_complex_case.rs
index cc619879ef3..6097d8739fb 100644
--- a/tests/mir-opt/derefer_complex_case.rs
+++ b/tests/mir-opt/derefer_complex_case.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_complex_case.main.Derefer.diff
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/derefer_inline_test.rs b/tests/mir-opt/derefer_inline_test.rs
index 7ac330e5102..713c051f44a 100644
--- a/tests/mir-opt/derefer_inline_test.rs
+++ b/tests/mir-opt/derefer_inline_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_inline_test.main.Derefer.diff
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/derefer_terminator_test.rs b/tests/mir-opt/derefer_terminator_test.rs
index 164aa733a24..3780ff5df7d 100644
--- a/tests/mir-opt/derefer_terminator_test.rs
+++ b/tests/mir-opt/derefer_terminator_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_terminator_test.main.Derefer.diff
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/derefer_test.rs b/tests/mir-opt/derefer_test.rs
index fad0fe8eb6f..171925bb19d 100644
--- a/tests/mir-opt/derefer_test.rs
+++ b/tests/mir-opt/derefer_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_test.main.Derefer.diff
 fn main() {
diff --git a/tests/mir-opt/derefer_test_multiple.rs b/tests/mir-opt/derefer_test_multiple.rs
index 0b3888b07ab..ac778a9c9b7 100644
--- a/tests/mir-opt/derefer_test_multiple.rs
+++ b/tests/mir-opt/derefer_test_multiple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_test_multiple.main.Derefer.diff
 fn main () {
diff --git a/tests/mir-opt/dest-prop/branch.rs b/tests/mir-opt/dest-prop/branch.rs
index 5007aafb62f..d8c74a0aa91 100644
--- a/tests/mir-opt/dest-prop/branch.rs
+++ b/tests/mir-opt/dest-prop/branch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that assignment in both branches of an `if` are eliminated.
 // unit-test: DestinationPropagation
diff --git a/tests/mir-opt/dest-prop/copy_propagation_arg.rs b/tests/mir-opt/dest-prop/copy_propagation_arg.rs
index 1f8d588925c..435cf07ab0c 100644
--- a/tests/mir-opt/dest-prop/copy_propagation_arg.rs
+++ b/tests/mir-opt/dest-prop/copy_propagation_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that DestinationPropagation does not propagate an assignment to a function argument
 // (doing so can break usages of the original argument value)
diff --git a/tests/mir-opt/dest-prop/cycle.rs b/tests/mir-opt/dest-prop/cycle.rs
index 9bc0cb05a35..77cff062cc4 100644
--- a/tests/mir-opt/dest-prop/cycle.rs
+++ b/tests/mir-opt/dest-prop/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code.
 // unit-test: DestinationPropagation
diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.rs b/tests/mir-opt/dest-prop/dead_stores_79191.rs
index 2f95ba0e326..a6fd542d3b5 100644
--- a/tests/mir-opt/dest-prop/dead_stores_79191.rs
+++ b/tests/mir-opt/dest-prop/dead_stores_79191.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DestinationPropagation
 
diff --git a/tests/mir-opt/dest-prop/dead_stores_better.rs b/tests/mir-opt/dest-prop/dead_stores_better.rs
index e67653c57e4..c9895f35cf1 100644
--- a/tests/mir-opt/dest-prop/dead_stores_better.rs
+++ b/tests/mir-opt/dest-prop/dead_stores_better.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
 // that that pass enables this one to do more optimizations.
diff --git a/tests/mir-opt/dest-prop/simple.rs b/tests/mir-opt/dest-prop/simple.rs
index 0bcb2924f1d..03d20962690 100644
--- a/tests/mir-opt/dest-prop/simple.rs
+++ b/tests/mir-opt/dest-prop/simple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too.
 // unit-test: DestinationPropagation
diff --git a/tests/mir-opt/dest-prop/union.rs b/tests/mir-opt/dest-prop/union.rs
index 4bc6f28c6c2..6d3e6d7fa76 100644
--- a/tests/mir-opt/dest-prop/union.rs
+++ b/tests/mir-opt/dest-prop/union.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that we can propagate into places that are projections into unions
 // compile-flags: -Zunsound-mir-opts
diff --git a/tests/mir-opt/dest-prop/unreachable.rs b/tests/mir-opt/dest-prop/unreachable.rs
index e950dbbf5c9..a47d2a0c8e2 100644
--- a/tests/mir-opt/dest-prop/unreachable.rs
+++ b/tests/mir-opt/dest-prop/unreachable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that unreachable code is removed after the destination propagation.
 // Regression test for issue #105428.
diff --git a/tests/mir-opt/dont_inline_type_id.rs b/tests/mir-opt/dont_inline_type_id.rs
index d8a56636094..788c2f55dc0 100644
--- a/tests/mir-opt/dont_inline_type_id.rs
+++ b/tests/mir-opt/dont_inline_type_id.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Inline
 // compile-flags: --crate-type=lib -C panic=abort
 
diff --git a/tests/mir-opt/dont_yeet_assert.rs b/tests/mir-opt/dont_yeet_assert.rs
deleted file mode 100644
index 38cc5a293e8..00000000000
--- a/tests/mir-opt/dont_yeet_assert.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// compile-flags: --crate-type=lib
-// unit-test: InstSimplify
-
-#![feature(core_intrinsics)]
-
-// Want to make sure this assertion isn't compiled away in generic code.
-
-// EMIT_MIR dont_yeet_assert.generic.InstSimplify.diff
-pub fn generic<T>() {
-    core::intrinsics::assert_mem_uninitialized_valid::<&T>();
-}
diff --git a/tests/mir-opt/early_otherwise_branch.rs b/tests/mir-opt/early_otherwise_branch.rs
index 7be9fbd0326..b48516c5aa1 100644
--- a/tests/mir-opt/early_otherwise_branch.rs
+++ b/tests/mir-opt/early_otherwise_branch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 // EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
 fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
diff --git a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs
index 76055e1330f..2a0fba9bea4 100644
--- a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs
+++ b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff
diff --git a/tests/mir-opt/early_otherwise_branch_68867.rs b/tests/mir-opt/early_otherwise_branch_68867.rs
index a6a56f3a95d..f27527b96ab 100644
--- a/tests/mir-opt/early_otherwise_branch_68867.rs
+++ b/tests/mir-opt/early_otherwise_branch_68867.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // FIXME: This test was broken by the derefer change.
diff --git a/tests/mir-opt/early_otherwise_branch_noopt.rs b/tests/mir-opt/early_otherwise_branch_noopt.rs
index ef766bbd4a6..351640c27c5 100644
--- a/tests/mir-opt/early_otherwise_branch_noopt.rs
+++ b/tests/mir-opt/early_otherwise_branch_noopt.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // must not optimize as it does not follow the pattern of
diff --git a/tests/mir-opt/early_otherwise_branch_soundness.rs b/tests/mir-opt/early_otherwise_branch_soundness.rs
index cd458923245..02c25a1bd59 100644
--- a/tests/mir-opt/early_otherwise_branch_soundness.rs
+++ b/tests/mir-opt/early_otherwise_branch_soundness.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // Tests various cases that the `early_otherwise_branch` opt should *not* optimize
diff --git a/tests/mir-opt/enum_opt.rs b/tests/mir-opt/enum_opt.rs
index 2768d708049..7738c431040 100644
--- a/tests/mir-opt/enum_opt.rs
+++ b/tests/mir-opt/enum_opt.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EnumSizeOpt
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 // compile-flags: -Zunsound-mir-opts
diff --git a/tests/mir-opt/equal_true.opt.InstSimplify.diff b/tests/mir-opt/equal_true.opt.InstSimplify.diff
deleted file mode 100644
index 88a51000c93..00000000000
--- a/tests/mir-opt/equal_true.opt.InstSimplify.diff
+++ /dev/null
@@ -1,36 +0,0 @@
-- // MIR for `opt` before InstSimplify
-+ // MIR for `opt` after InstSimplify
-  
-  fn opt(_1: bool) -> i32 {
-      debug x => _1;
-      let mut _0: i32;
-      let mut _2: bool;
-      let mut _3: bool;
-  
-      bb0: {
-          StorageLive(_2);
-          StorageLive(_3);
-          _3 = _1;
--         _2 = Eq(move _3, const true);
-+         _2 = move _3;
-          switchInt(move _2) -> [0: bb2, otherwise: bb1];
-      }
-  
-      bb1: {
-          StorageDead(_3);
-          _0 = const 0_i32;
-          goto -> bb3;
-      }
-  
-      bb2: {
-          StorageDead(_3);
-          _0 = const 1_i32;
-          goto -> bb3;
-      }
-  
-      bb3: {
-          StorageDead(_2);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/equal_true.rs b/tests/mir-opt/equal_true.rs
deleted file mode 100644
index fbb5d8d37db..00000000000
--- a/tests/mir-opt/equal_true.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// unit-test InstSimplify
-
-// EMIT_MIR equal_true.opt.InstSimplify.diff
-
-fn opt(x: bool) -> i32 {
-    if x == true { 0 } else { 1 }
-}
-
-fn main() {
-    opt(true);
-}
diff --git a/tests/mir-opt/exponential_or.rs b/tests/mir-opt/exponential_or.rs
index 0b8be8385dd..89963b9bdf4 100644
--- a/tests/mir-opt/exponential_or.rs
+++ b/tests/mir-opt/exponential_or.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that simple or-patterns don't get expanded to exponentially large CFGs
 
 // EMIT_MIR exponential_or.match_tuple.SimplifyCfg-initial.after.mir
diff --git a/tests/mir-opt/fn_ptr_shim.rs b/tests/mir-opt/fn_ptr_shim.rs
index 64fbdc9ded1..c82260baefe 100644
--- a/tests/mir-opt/fn_ptr_shim.rs
+++ b/tests/mir-opt/fn_ptr_shim.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=0
 
 // Tests that the `<fn() as Fn>` shim does not create a `Call` terminator with a `Self` callee
diff --git a/tests/mir-opt/funky_arms.rs b/tests/mir-opt/funky_arms.rs
index 79fd9457ce1..14aad039946 100644
--- a/tests/mir-opt/funky_arms.rs
+++ b/tests/mir-opt/funky_arms.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: --crate-type lib -Cdebug-assertions=no
 
diff --git a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir b/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir
index d8bea14204d..524fbeb0fea 100644
--- a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir
+++ b/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir
@@ -4,7 +4,7 @@
         _0: GeneratorSavedTy {
             ty: std::string::String,
             source_info: SourceInfo {
-                span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0),
+                span: $DIR/generator_drop_cleanup.rs:12:13: 12:15 (#0),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -21,7 +21,7 @@
     },
 } */
 
-fn main::{closure#0}(_1: *mut {generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17}) -> () {
+fn main::{closure#0}(_1: *mut {generator@$DIR/generator_drop_cleanup.rs:11:15: 11:17}) -> () {
     let mut _0: ();
     let mut _2: ();
     let _3: std::string::String;
diff --git a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir b/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir
index d8b27eda8f2..c3f61169bfb 100644
--- a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir
+++ b/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir
@@ -4,7 +4,7 @@
         _0: GeneratorSavedTy {
             ty: std::string::String,
             source_info: SourceInfo {
-                span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0),
+                span: $DIR/generator_drop_cleanup.rs:12:13: 12:15 (#0),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -21,7 +21,7 @@
     },
 } */
 
-fn main::{closure#0}(_1: *mut {generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17}) -> () {
+fn main::{closure#0}(_1: *mut {generator@$DIR/generator_drop_cleanup.rs:11:15: 11:17}) -> () {
     let mut _0: ();
     let mut _2: ();
     let _3: std::string::String;
diff --git a/tests/mir-opt/generator_drop_cleanup.rs b/tests/mir-opt/generator_drop_cleanup.rs
index 7e0d7bb59a5..fb67031f774 100644
--- a/tests/mir-opt/generator_drop_cleanup.rs
+++ b/tests/mir-opt/generator_drop_cleanup.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(generators, generator_trait)]
 
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir b/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir
index 4587282de93..169d817675e 100644
--- a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir
+++ b/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir
@@ -1,6 +1,6 @@
 // MIR for `main::{closure#0}` before StateTransform
 
-fn main::{closure#0}(_1: {generator@$DIR/generator_storage_dead_unwind.rs:22:16: 22:18}, _2: ()) -> ()
+fn main::{closure#0}(_1: {generator@$DIR/generator_storage_dead_unwind.rs:23:16: 23:18}, _2: ()) -> ()
 yields ()
  {
     let mut _0: ();
diff --git a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir b/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir
index 38026f65bbd..45e9c01b931 100644
--- a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir
+++ b/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir
@@ -1,6 +1,6 @@
 // MIR for `main::{closure#0}` before StateTransform
 
-fn main::{closure#0}(_1: {generator@$DIR/generator_storage_dead_unwind.rs:22:16: 22:18}, _2: ()) -> ()
+fn main::{closure#0}(_1: {generator@$DIR/generator_storage_dead_unwind.rs:23:16: 23:18}, _2: ()) -> ()
 yields ()
  {
     let mut _0: ();
diff --git a/tests/mir-opt/generator_storage_dead_unwind.rs b/tests/mir-opt/generator_storage_dead_unwind.rs
index 664f7ef67e3..91f3a20befd 100644
--- a/tests/mir-opt/generator_storage_dead_unwind.rs
+++ b/tests/mir-opt/generator_storage_dead_unwind.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // Test that we generate StorageDead on unwind paths for generators.
diff --git a/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir b/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
index ac7549f93b1..7047a5baae5 100644
--- a/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
@@ -4,7 +4,7 @@
         _0: GeneratorSavedTy {
             ty: HasDrop,
             source_info: SourceInfo {
-                span: $DIR/generator_tiny.rs:20:13: 20:15 (#0),
+                span: $DIR/generator_tiny.rs:21:13: 21:15 (#0),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -21,7 +21,7 @@
     },
 } */
 
-fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:19:16: 19:24}>, _2: u8) -> GeneratorState<(), ()> {
+fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:20:16: 20:24}>, _2: u8) -> GeneratorState<(), ()> {
     debug _x => _10;
     let mut _0: std::ops::GeneratorState<(), ()>;
     let _3: HasDrop;
@@ -34,18 +34,18 @@ fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:19:16: 19:24
     let _10: u8;
     let mut _11: u32;
     scope 1 {
-        debug _d => (((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24})) as variant#3).0: HasDrop);
+        debug _d => (((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:20:16: 20:24})) as variant#3).0: HasDrop);
     }
 
     bb0: {
-        _11 = discriminant((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24})));
+        _11 = discriminant((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:20:16: 20:24})));
         switchInt(move _11) -> [0: bb1, 3: bb5, otherwise: bb6];
     }
 
     bb1: {
         _10 = move _2;
         nop;
-        (((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24})) as variant#3).0: HasDrop) = HasDrop;
+        (((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:20:16: 20:24})) as variant#3).0: HasDrop) = HasDrop;
         StorageLive(_4);
         goto -> bb2;
     }
@@ -55,7 +55,7 @@ fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:19:16: 19:24
         StorageLive(_7);
         _7 = ();
         _0 = GeneratorState::<(), ()>::Yielded(move _7);
-        discriminant((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24}))) = 3;
+        discriminant((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:20:16: 20:24}))) = 3;
         return;
     }
 
diff --git a/tests/mir-opt/generator_tiny.rs b/tests/mir-opt/generator_tiny.rs
index 7dad63a61d6..e5570d74bbb 100644
--- a/tests/mir-opt/generator_tiny.rs
+++ b/tests/mir-opt/generator_tiny.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 //! Tests that generators that cannot return or unwind don't have unnecessary
 //! panic branches.
 
diff --git a/tests/mir-opt/graphviz.rs b/tests/mir-opt/graphviz.rs
index 6906b86c2a5..61b5a2fb3d8 100644
--- a/tests/mir-opt/graphviz.rs
+++ b/tests/mir-opt/graphviz.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test graphviz output
 // compile-flags: -Z dump-mir-graphviz
 
diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
index a85e2ae368b..fd24edc676c 100644
--- a/tests/mir-opt/gvn.rs
+++ b/tests/mir-opt/gvn.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: GVN
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
diff --git a/tests/mir-opt/if_condition_int.rs b/tests/mir-opt/if_condition_int.rs
index 398311e6bb8..a3dd74d9a37 100644
--- a/tests/mir-opt/if_condition_int.rs
+++ b/tests/mir-opt/if_condition_int.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: SimplifyComparisonIntegral
 // EMIT_MIR if_condition_int.opt_u32.SimplifyComparisonIntegral.diff
 // EMIT_MIR if_condition_int.opt_negative.SimplifyComparisonIntegral.diff
diff --git a/tests/mir-opt/inline/asm_unwind.rs b/tests/mir-opt/inline/asm_unwind.rs
index 573ae1ba68d..0cf21fda72f 100644
--- a/tests/mir-opt/inline/asm_unwind.rs
+++ b/tests/mir-opt/inline/asm_unwind.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Tests inlining of `may_unwind` inline assembly.
 //
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/inline/caller_with_trivial_bound.rs b/tests/mir-opt/inline/caller_with_trivial_bound.rs
index a8f101d488c..3829cbdd302 100644
--- a/tests/mir-opt/inline/caller_with_trivial_bound.rs
+++ b/tests/mir-opt/inline/caller_with_trivial_bound.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // needs-unwind
 
diff --git a/tests/mir-opt/inline/cycle.rs b/tests/mir-opt/inline/cycle.rs
index 1b74d818451..3e4f0683435 100644
--- a/tests/mir-opt/inline/cycle.rs
+++ b/tests/mir-opt/inline/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zinline-mir-hint-threshold=1000
 
diff --git a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs
index 971223c72ca..4147325ec44 100644
--- a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs
+++ b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib
 
diff --git a/tests/mir-opt/inline/dyn_trait.rs b/tests/mir-opt/inline/dyn_trait.rs
index 0faeec0bbab..7b41b1e1171 100644
--- a/tests/mir-opt/inline/dyn_trait.rs
+++ b/tests/mir-opt/inline/dyn_trait.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![crate_type = "lib"]
 
diff --git a/tests/mir-opt/inline/exponential_runtime.rs b/tests/mir-opt/inline/exponential_runtime.rs
index cfa9ff210f8..6d3af8b9c57 100644
--- a/tests/mir-opt/inline/exponential_runtime.rs
+++ b/tests/mir-opt/inline/exponential_runtime.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Checks that code with exponential runtime does not have exponential behavior in inlining.
 
diff --git a/tests/mir-opt/inline/inline_any_operand.rs b/tests/mir-opt/inline/inline_any_operand.rs
index fb0de020f73..e131cd6ef7e 100644
--- a/tests/mir-opt/inline/inline_any_operand.rs
+++ b/tests/mir-opt/inline/inline_any_operand.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z span_free_formats
 
 // Tests that MIR inliner works for any operand
diff --git a/tests/mir-opt/inline/inline_async.rs b/tests/mir-opt/inline/inline_async.rs
index 5c838159b98..932dc5635f0 100644
--- a/tests/mir-opt/inline/inline_async.rs
+++ b/tests/mir-opt/inline/inline_async.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Checks that inliner doesn't introduce cycles when optimizing generators.
 // The outcome of optimization is not verfied, just the absence of the cycle.
 // Regression test for #76181.
diff --git a/tests/mir-opt/inline/inline_box_fn.rs b/tests/mir-opt/inline/inline_box_fn.rs
index 348f0e77f92..f6a90b92c91 100644
--- a/tests/mir-opt/inline/inline_box_fn.rs
+++ b/tests/mir-opt/inline/inline_box_fn.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: Inline
 // compile-flags: --crate-type=lib
diff --git a/tests/mir-opt/inline/inline_closure.rs b/tests/mir-opt/inline/inline_closure.rs
index 715fd0138a7..bd4c84ff0ca 100644
--- a/tests/mir-opt/inline/inline_closure.rs
+++ b/tests/mir-opt/inline/inline_closure.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z span_free_formats
 
 // Tests that MIR inliner can handle closure arguments. (#45894)
diff --git a/tests/mir-opt/inline/inline_closure_borrows_arg.rs b/tests/mir-opt/inline/inline_closure_borrows_arg.rs
index d76bc33f52e..a5cc7d10365 100644
--- a/tests/mir-opt/inline/inline_closure_borrows_arg.rs
+++ b/tests/mir-opt/inline/inline_closure_borrows_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z span_free_formats -Zunsound-mir-opts
 
 // Tests that MIR inliner can handle closure arguments,
diff --git a/tests/mir-opt/inline/inline_closure_captures.rs b/tests/mir-opt/inline/inline_closure_captures.rs
index 52b6817e401..0d95564e5dd 100644
--- a/tests/mir-opt/inline/inline_closure_captures.rs
+++ b/tests/mir-opt/inline/inline_closure_captures.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z span_free_formats
 
 // Tests that MIR inliner can handle closure captures.
diff --git a/tests/mir-opt/inline/inline_compatibility.rs b/tests/mir-opt/inline/inline_compatibility.rs
index 1527fea1c93..52f4debf5db 100644
--- a/tests/mir-opt/inline/inline_compatibility.rs
+++ b/tests/mir-opt/inline/inline_compatibility.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Checks that only functions with compatible attributes are inlined.
 //
 // only-x86_64
diff --git a/tests/mir-opt/inline/inline_cycle.rs b/tests/mir-opt/inline/inline_cycle.rs
index 42a6914c965..e3dd082556b 100644
--- a/tests/mir-opt/inline/inline_cycle.rs
+++ b/tests/mir-opt/inline/inline_cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that inliner handles various forms of recursion and doesn't fall into
 // an infinite inlining cycle. The particular outcome of inlining is not
diff --git a/tests/mir-opt/inline/inline_cycle_generic.rs b/tests/mir-opt/inline/inline_cycle_generic.rs
index ef261b04c80..667bf7f9254 100644
--- a/tests/mir-opt/inline/inline_cycle_generic.rs
+++ b/tests/mir-opt/inline/inline_cycle_generic.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that inliner handles various forms of recursion and doesn't fall into
 // an infinite inlining cycle. The particular outcome of inlining is not
diff --git a/tests/mir-opt/inline/inline_diverging.rs b/tests/mir-opt/inline/inline_diverging.rs
index e01c4c1dd02..9e50b1ead2b 100644
--- a/tests/mir-opt/inline/inline_diverging.rs
+++ b/tests/mir-opt/inline/inline_diverging.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Tests inlining of diverging calls.
 //
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff
index 06ee8c464d5..48d908fad88 100644
--- a/tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff
@@ -4,26 +4,26 @@
   fn main() -> () {
       let mut _0: ();
       let _1: std::ops::GeneratorState<i32, bool>;
-      let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>;
-      let mut _3: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
-      let mut _4: {generator@$DIR/inline_generator.rs:16:5: 16:8};
+      let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>;
+      let mut _3: &mut {generator@$DIR/inline_generator.rs:17:5: 17:8};
+      let mut _4: {generator@$DIR/inline_generator.rs:17:5: 17:8};
 +     let mut _5: bool;
       scope 1 {
           debug _r => _1;
       }
 +     scope 2 (inlined g) {
 +     }
-+     scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new) {
++     scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>::new) {
 +         debug pointer => _3;
 +         scope 4 {
-+             scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new_unchecked) {
++             scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>::new_unchecked) {
 +                 debug pointer => _3;
 +             }
 +         }
 +     }
 +     scope 6 (inlined g::{closure#0}) {
 +         debug a => _5;
-+         let mut _6: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
++         let mut _6: &mut {generator@$DIR/inline_generator.rs:17:5: 17:8};
 +         let mut _7: u32;
 +         let mut _8: i32;
 +     }
@@ -34,22 +34,22 @@
           StorageLive(_3);
           StorageLive(_4);
 -         _4 = g() -> [return: bb1, unwind unreachable];
-+         _4 = {generator@$DIR/inline_generator.rs:16:5: 16:8 (#0)};
++         _4 = {generator@$DIR/inline_generator.rs:17:5: 17:8 (#0)};
 +         _3 = &mut _4;
-+         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}> { pointer: move _3 };
++         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}> { pointer: move _3 };
 +         StorageDead(_3);
 +         StorageLive(_5);
 +         _5 = const false;
 +         StorageLive(_6);
 +         StorageLive(_7);
-+         _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
++         _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:17:5: 17:8});
 +         _7 = discriminant((*_6));
 +         switchInt(move _7) -> [0: bb3, 1: bb7, 3: bb8, otherwise: bb9];
       }
   
       bb1: {
 -         _3 = &mut _4;
--         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind unreachable];
+-         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>::new(move _3) -> [return: bb2, unwind unreachable];
 +         StorageDead(_7);
 +         StorageDead(_6);
 +         StorageDead(_5);
@@ -59,7 +59,7 @@
   
       bb2: {
 -         StorageDead(_3);
--         _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
+-         _1 = <{generator@$DIR/inline_generator.rs:17:5: 17:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
 +         StorageDead(_4);
 +         _0 = const ();
 +         StorageDead(_1);
diff --git a/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff
index da29ba5f50d..9cb84b314de 100644
--- a/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff
@@ -4,26 +4,26 @@
   fn main() -> () {
       let mut _0: ();
       let _1: std::ops::GeneratorState<i32, bool>;
-      let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>;
-      let mut _3: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
-      let mut _4: {generator@$DIR/inline_generator.rs:16:5: 16:8};
+      let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>;
+      let mut _3: &mut {generator@$DIR/inline_generator.rs:17:5: 17:8};
+      let mut _4: {generator@$DIR/inline_generator.rs:17:5: 17:8};
 +     let mut _5: bool;
       scope 1 {
           debug _r => _1;
       }
 +     scope 2 (inlined g) {
 +     }
-+     scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new) {
++     scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>::new) {
 +         debug pointer => _3;
 +         scope 4 {
-+             scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new_unchecked) {
++             scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>::new_unchecked) {
 +                 debug pointer => _3;
 +             }
 +         }
 +     }
 +     scope 6 (inlined g::{closure#0}) {
 +         debug a => _5;
-+         let mut _6: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
++         let mut _6: &mut {generator@$DIR/inline_generator.rs:17:5: 17:8};
 +         let mut _7: u32;
 +         let mut _8: i32;
 +     }
@@ -37,20 +37,20 @@
 -     }
 - 
 -     bb1: {
-+         _4 = {generator@$DIR/inline_generator.rs:16:5: 16:8 (#0)};
++         _4 = {generator@$DIR/inline_generator.rs:17:5: 17:8 (#0)};
           _3 = &mut _4;
--         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind: bb5];
+-         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}>::new(move _3) -> [return: bb2, unwind: bb5];
 -     }
 - 
 -     bb2: {
-+         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}> { pointer: move _3 };
++         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:17:5: 17:8}> { pointer: move _3 };
           StorageDead(_3);
--         _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
+-         _1 = <{generator@$DIR/inline_generator.rs:17:5: 17:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
 +         StorageLive(_5);
 +         _5 = const false;
 +         StorageLive(_6);
 +         StorageLive(_7);
-+         _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
++         _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:17:5: 17:8});
 +         _7 = discriminant((*_6));
 +         switchInt(move _7) -> [0: bb5, 1: bb9, 3: bb10, otherwise: bb11];
       }
diff --git a/tests/mir-opt/inline/inline_generator.rs b/tests/mir-opt/inline/inline_generator.rs
index 2d71458c174..d96d1f98f14 100644
--- a/tests/mir-opt/inline/inline_generator.rs
+++ b/tests/mir-opt/inline/inline_generator.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zinline-mir-hint-threshold=1000
 #![feature(generators, generator_trait)]
diff --git a/tests/mir-opt/inline/inline_instruction_set.rs b/tests/mir-opt/inline/inline_instruction_set.rs
index 5dfb04943e3..4ac4d462f82 100644
--- a/tests/mir-opt/inline/inline_instruction_set.rs
+++ b/tests/mir-opt/inline/inline_instruction_set.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Checks that only functions with the compatible instruction_set attributes are inlined.
 //
 // A function is "compatible" when the *callee* has the same attribute or no attribute.
diff --git a/tests/mir-opt/inline/inline_into_box_place.rs b/tests/mir-opt/inline/inline_into_box_place.rs
index 56f174e515b..b755692afc2 100644
--- a/tests/mir-opt/inline/inline_into_box_place.rs
+++ b/tests/mir-opt/inline/inline_into_box_place.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // ignore-debug MIR alignment checks in std alter the diff, breaking the test
diff --git a/tests/mir-opt/inline/inline_options.rs b/tests/mir-opt/inline/inline_options.rs
index b247ecd0bc0..394a8c4945c 100644
--- a/tests/mir-opt/inline/inline_options.rs
+++ b/tests/mir-opt/inline/inline_options.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Checks that inlining threshold can be controlled with
 // inline-mir-threshold and inline-hint-threshold options.
diff --git a/tests/mir-opt/inline/inline_retag.rs b/tests/mir-opt/inline/inline_retag.rs
index c6950f26925..f695b9f22e6 100644
--- a/tests/mir-opt/inline/inline_retag.rs
+++ b/tests/mir-opt/inline/inline_retag.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z span_free_formats -Z mir-emit-retag
 
 // Tests that MIR inliner fixes up `Retag`'s `fn_entry` flag
diff --git a/tests/mir-opt/inline/inline_shims.rs b/tests/mir-opt/inline/inline_shims.rs
index eafbb962efb..a223c2d2614 100644
--- a/tests/mir-opt/inline/inline_shims.rs
+++ b/tests/mir-opt/inline/inline_shims.rs
@@ -3,11 +3,15 @@
 
 // EMIT_MIR inline_shims.clone.Inline.diff
 pub fn clone<A, B>(f: fn(A, B)) -> fn(A, B) {
+    // CHECK-LABEL: fn clone(
+    // CHECK: (inlined <fn(A, B) as Clone>::clone - shim(fn(A, B)))
     f.clone()
 }
 
 // EMIT_MIR inline_shims.drop.Inline.diff
 pub fn drop<A, B>(a: *mut Vec<A>, b: *mut Option<B>) {
+    // CHECK-LABEL: fn drop(
+    // CHECK: (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>)))
     unsafe { std::ptr::drop_in_place(a) }
     unsafe { std::ptr::drop_in_place(b) }
 }
diff --git a/tests/mir-opt/inline/inline_specialization.rs b/tests/mir-opt/inline/inline_specialization.rs
index 0311531dc3f..eb0cf891dad 100644
--- a/tests/mir-opt/inline/inline_specialization.rs
+++ b/tests/mir-opt/inline/inline_specialization.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![feature(specialization)]
 
diff --git a/tests/mir-opt/inline/inline_trait_method.rs b/tests/mir-opt/inline/inline_trait_method.rs
index a9d2168c2ec..8a95adf3713 100644
--- a/tests/mir-opt/inline/inline_trait_method.rs
+++ b/tests/mir-opt/inline/inline_trait_method.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Z span_free_formats
 
diff --git a/tests/mir-opt/inline/inline_trait_method_2.rs b/tests/mir-opt/inline/inline_trait_method_2.rs
index 62ec7ebde6a..e87609a8c7e 100644
--- a/tests/mir-opt/inline/inline_trait_method_2.rs
+++ b/tests/mir-opt/inline/inline_trait_method_2.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Z span_free_formats -Z mir-opt-level=4
 
diff --git a/tests/mir-opt/inline/issue_106141.rs b/tests/mir-opt/inline/issue_106141.rs
index e442f8a7522..592b4d9b723 100644
--- a/tests/mir-opt/inline/issue_106141.rs
+++ b/tests/mir-opt/inline/issue_106141.rs
@@ -1,5 +1,9 @@
+// Verify that we do not ICE inlining a function which uses _0 as an index.
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
 pub fn outer() -> usize {
+    // CHECK-LABEL: fn outer(
+    // CHECK: = {{.*}}[_0];
     inner()
 }
 
@@ -10,6 +14,8 @@ fn index() -> usize {
 
 #[inline]
 fn inner() -> usize {
+    // CHECK-LABEL: fn inner(
+    // CHECK: = {{.*}}[_0];
     let buffer = &[true];
     let index = index();
     if buffer[index] {
diff --git a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
index 94f926d3964..da779fed76f 100644
--- a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
+++ b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // 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()
diff --git a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
index 4d170c41f97..d28c0441f63 100644
--- a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
+++ b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
@@ -2,8 +2,8 @@
 
 fn main() -> () {
     let mut _0: ();
-    let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16};
-    let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16};
+    let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:6:13: 6:16};
+    let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:6:13: 6:16};
     let mut _3: ((),);
     let mut _4: ();
     let mut _5: ();
@@ -19,7 +19,7 @@ fn main() -> () {
 
     bb0: {
         StorageLive(_1);
-        _1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16};
+        _1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:6:13: 6:16};
         StorageLive(_2);
         _2 = &_1;
         StorageLive(_3);
diff --git a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
index 76d806acc63..c7147d42df9 100644
--- a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
+++ b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Tests that MIR inliner can handle `SourceScopeData` parenting correctly. (#76997)
 
 // EMIT_MIR issue_76997_inline_scopes_parenting.main.Inline.after.mir
diff --git a/tests/mir-opt/inline/issue_78442.rs b/tests/mir-opt/inline/issue_78442.rs
index d956e62414c..f83ed70d0db 100644
--- a/tests/mir-opt/inline/issue_78442.rs
+++ b/tests/mir-opt/inline/issue_78442.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=3 -Z inline-mir
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/inline/polymorphic_recursion.rs b/tests/mir-opt/inline/polymorphic_recursion.rs
index 7388722b776..f71e382e867 100644
--- a/tests/mir-opt/inline/polymorphic_recursion.rs
+++ b/tests/mir-opt/inline/polymorphic_recursion.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Make sure that the MIR inliner does not loop indefinitely on polymorphic recursion.
 // compile-flags: --crate-type lib
 
diff --git a/tests/mir-opt/inline/unchecked_shifts.rs b/tests/mir-opt/inline/unchecked_shifts.rs
index 22f84e44a64..67666f2f713 100644
--- a/tests/mir-opt/inline/unchecked_shifts.rs
+++ b/tests/mir-opt/inline/unchecked_shifts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![crate_type = "lib"]
 #![feature(unchecked_math)]
diff --git a/tests/mir-opt/inline/unsized_argument.rs b/tests/mir-opt/inline/unsized_argument.rs
index b2c51407fd5..22c88b83f9b 100644
--- a/tests/mir-opt/inline/unsized_argument.rs
+++ b/tests/mir-opt/inline/unsized_argument.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // needs-unwind
 #![feature(unsized_fn_params)]
 
diff --git a/tests/mir-opt/inline/unwrap_unchecked.rs b/tests/mir-opt/inline/unwrap_unchecked.rs
index f28aef7a808..f8964eba227 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.rs
+++ b/tests/mir-opt/inline/unwrap_unchecked.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![crate_type = "lib"]
 
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/inline_generically_if_sized.rs b/tests/mir-opt/inline_generically_if_sized.rs
index 1acfff7a56b..1a7512a4b8d 100644
--- a/tests/mir-opt/inline_generically_if_sized.rs
+++ b/tests/mir-opt/inline_generically_if_sized.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Inline
 // compile-flags: --crate-type=lib -C panic=abort
 
diff --git a/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff b/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
index 13ff1e284d9..1ef6b69ef5b 100644
--- a/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
+++ b/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
@@ -4,7 +4,7 @@
   fn bar() -> bool {
       let mut _0: bool;
   
-+     coverage Counter(0) => /the/src/instrument_coverage.rs:20:1 - 22:2;
++     coverage Counter(0) => /the/src/instrument_coverage.rs:21:1 - 23:2;
 + 
       bb0: {
 +         Coverage::CounterIncrement(0);
diff --git a/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff b/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
index f5c59c84693..14b4833a515 100644
--- a/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
+++ b/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
@@ -9,11 +9,11 @@
   
 +     coverage ExpressionId(0) => Expression { lhs: Counter(0), op: Add, rhs: Counter(1) };
 +     coverage ExpressionId(1) => Expression { lhs: Expression(0), op: Subtract, rhs: Counter(1) };
-+     coverage Counter(0) => /the/src/instrument_coverage.rs:11:1 - 11:11;
-+     coverage Expression(0) => /the/src/instrument_coverage.rs:12:5 - 13:17;
-+     coverage Expression(1) => /the/src/instrument_coverage.rs:14:13 - 14:18;
-+     coverage Expression(1) => /the/src/instrument_coverage.rs:17:1 - 17:2;
-+     coverage Counter(1) => /the/src/instrument_coverage.rs:15:10 - 15:11;
++     coverage Counter(0) => /the/src/instrument_coverage.rs:12:1 - 12:11;
++     coverage Expression(0) => /the/src/instrument_coverage.rs:13:5 - 14:17;
++     coverage Expression(1) => /the/src/instrument_coverage.rs:15:13 - 15:18;
++     coverage Expression(1) => /the/src/instrument_coverage.rs:18:1 - 18:2;
++     coverage Counter(1) => /the/src/instrument_coverage.rs:16:10 - 16:11;
 + 
       bb0: {
 +         Coverage::CounterIncrement(0);
diff --git a/tests/mir-opt/instrument_coverage.rs b/tests/mir-opt/instrument_coverage.rs
index 7f6a0a0eb09..f131fc0a324 100644
--- a/tests/mir-opt/instrument_coverage.rs
+++ b/tests/mir-opt/instrument_coverage.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that `-C instrument-coverage` injects Coverage statements. The Coverage Counter statements
 // are later converted into LLVM instrprof.increment intrinsics, during codegen.
 
diff --git a/tests/mir-opt/bool_compare.opt3.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.eq_false.InstSimplify.diff
index 034d5e44013..5c09963d433 100644
--- a/tests/mir-opt/bool_compare.opt3.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.eq_false.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt3` before InstSimplify
-+ // MIR for `opt3` after InstSimplify
+- // MIR for `eq_false` before InstSimplify
++ // MIR for `eq_false` after InstSimplify
   
-  fn opt3(_1: bool) -> u32 {
+  fn eq_false(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff
new file mode 100644
index 00000000000..a80133b0eb0
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff
@@ -0,0 +1,36 @@
+- // MIR for `eq_true` before InstSimplify
++ // MIR for `eq_true` after InstSimplify
+  
+  fn eq_true(_1: bool) -> u32 {
+      debug x => _1;
+      let mut _0: u32;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = Eq(move _3, const true);
++         _2 = move _3;
+          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 0_u32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 1_u32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/bool_compare.opt4.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.false_eq.InstSimplify.diff
index d3096da6c5a..8235d5263bb 100644
--- a/tests/mir-opt/bool_compare.opt4.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.false_eq.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt4` before InstSimplify
-+ // MIR for `opt4` after InstSimplify
+- // MIR for `false_eq` before InstSimplify
++ // MIR for `false_eq` after InstSimplify
   
-  fn opt4(_1: bool) -> u32 {
+  fn false_eq(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff
new file mode 100644
index 00000000000..77d076c6c14
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff
@@ -0,0 +1,36 @@
+- // MIR for `false_ne` before InstSimplify
++ // MIR for `false_ne` after InstSimplify
+  
+  fn false_ne(_1: bool) -> u32 {
+      debug x => _1;
+      let mut _0: u32;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = Ne(const false, move _3);
++         _2 = move _3;
+          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 0_u32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 1_u32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/not_equal_false.opt.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.ne_false.InstSimplify.diff
index 1342966aa15..2362b11297e 100644
--- a/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.ne_false.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt` before InstSimplify
-+ // MIR for `opt` after InstSimplify
+- // MIR for `ne_false` before InstSimplify
++ // MIR for `ne_false` after InstSimplify
   
-  fn opt(_1: bool) -> u32 {
+  fn ne_false(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/bool_compare.opt1.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.ne_true.InstSimplify.diff
index 657c11516a1..6ccbd2fb7a1 100644
--- a/tests/mir-opt/bool_compare.opt1.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.ne_true.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt1` before InstSimplify
-+ // MIR for `opt1` after InstSimplify
+- // MIR for `ne_true` before InstSimplify
++ // MIR for `ne_true` after InstSimplify
   
-  fn opt1(_1: bool) -> u32 {
+  fn ne_true(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/instsimplify/bool_compare.rs b/tests/mir-opt/instsimplify/bool_compare.rs
new file mode 100644
index 00000000000..77f427b0d7c
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.rs
@@ -0,0 +1,68 @@
+// unit-test: InstSimplify
+
+// EMIT_MIR bool_compare.eq_true.InstSimplify.diff
+fn eq_true(x: bool) -> u32 {
+    // CHECK-LABEL: fn eq_true(
+    // CHECK-NOT: Eq(
+    if x == true { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.true_eq.InstSimplify.diff
+fn true_eq(x: bool) -> u32 {
+    // CHECK-LABEL: fn true_eq(
+    // CHECK-NOT: Eq(
+    if true == x { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.ne_true.InstSimplify.diff
+fn ne_true(x: bool) -> u32 {
+    // CHECK-LABEL: fn ne_true(
+    // CHECK: Not(
+    if x != true { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.true_ne.InstSimplify.diff
+fn true_ne(x: bool) -> u32 {
+    // CHECK-LABEL: fn true_ne(
+    // CHECK: Not(
+    if true != x { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.eq_false.InstSimplify.diff
+fn eq_false(x: bool) -> u32 {
+    // CHECK-LABEL: fn eq_false(
+    // CHECK: Not(
+    if x == false { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.false_eq.InstSimplify.diff
+fn false_eq(x: bool) -> u32 {
+    // CHECK-LABEL: fn false_eq(
+    // CHECK: Not(
+    if false == x { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.ne_false.InstSimplify.diff
+fn ne_false(x: bool) -> u32 {
+    // CHECK-LABEL: fn ne_false(
+    // CHECK-NOT: Ne(
+    if x != false { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.false_ne.InstSimplify.diff
+fn false_ne(x: bool) -> u32 {
+    // CHECK-LABEL: fn false_ne(
+    // CHECK-NOT: Ne(
+    if false != x { 0 } else { 1 }
+}
+
+fn main() {
+    eq_true(false);
+    true_eq(false);
+    ne_true(false);
+    true_ne(false);
+    eq_false(false);
+    false_eq(false);
+    ne_false(false);
+    false_ne(false);
+}
diff --git a/tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff
new file mode 100644
index 00000000000..18675329a2e
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff
@@ -0,0 +1,36 @@
+- // MIR for `true_eq` before InstSimplify
++ // MIR for `true_eq` after InstSimplify
+  
+  fn true_eq(_1: bool) -> u32 {
+      debug x => _1;
+      let mut _0: u32;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = Eq(const true, move _3);
++         _2 = move _3;
+          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 0_u32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 1_u32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/bool_compare.opt2.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.true_ne.InstSimplify.diff
index bc8be62bd49..dc91cf8a5c4 100644
--- a/tests/mir-opt/bool_compare.opt2.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.true_ne.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt2` before InstSimplify
-+ // MIR for `opt2` after InstSimplify
+- // MIR for `true_ne` before InstSimplify
++ // MIR for `true_ne` after InstSimplify
   
-  fn opt2(_1: bool) -> u32 {
+  fn true_ne(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/casts.redundant.InstSimplify.diff b/tests/mir-opt/instsimplify/casts.redundant.InstSimplify.diff
index f5ea78aecbe..1c417d4346d 100644
--- a/tests/mir-opt/casts.redundant.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/casts.redundant.InstSimplify.diff
@@ -7,15 +7,19 @@
       let mut _2: *const &u8;
       let mut _3: *const &u8;
       scope 1 (inlined generic_cast::<&u8, &u8>) {
-          debug x => _1;
+          debug x => _3;
+          let mut _4: *const &u8;
       }
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
           _3 = _1;
--         _2 = _3 as *const &u8 (PtrToPtr);
-+         _2 = _3;
+          StorageLive(_4);
+          _4 = _3;
+-         _2 = move _4 as *const &u8 (PtrToPtr);
++         _2 = move _4;
+          StorageDead(_4);
           StorageDead(_3);
           _0 = _2;
           StorageDead(_2);
diff --git a/tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff b/tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff
new file mode 100644
index 00000000000..1ae9d45e66c
--- /dev/null
+++ b/tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff
@@ -0,0 +1,21 @@
+- // MIR for `roundtrip` before InstSimplify
++ // MIR for `roundtrip` after InstSimplify
+  
+  fn roundtrip(_1: *const u8) -> *const u8 {
+      debug x => _1;
+      let mut _0: *const u8;
+      let mut _2: *mut u8;
+      let mut _3: *const u8;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+          _2 = move _3 as *mut u8 (PtrToPtr);
+          _0 = move _2 as *const u8 (PointerCoercion(MutToConstPointer));
+          StorageDead(_3);
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/instsimplify/casts.rs b/tests/mir-opt/instsimplify/casts.rs
new file mode 100644
index 00000000000..18bab524c64
--- /dev/null
+++ b/tests/mir-opt/instsimplify/casts.rs
@@ -0,0 +1,25 @@
+// unit-test: InstSimplify
+// compile-flags: -Zinline-mir
+#![crate_type = "lib"]
+
+#[inline(always)]
+fn generic_cast<T, U>(x: *const T) -> *const U {
+    x as *const U
+}
+
+// EMIT_MIR casts.redundant.InstSimplify.diff
+pub fn redundant<'a, 'b: 'a>(x: *const &'a u8) -> *const &'a u8 {
+    // CHECK-LABEL: fn redundant(
+    // CHECK: inlined generic_cast
+    // CHECK-NOT: as
+    generic_cast::<&'a u8, &'b u8>(x) as *const &'a u8
+}
+
+// EMIT_MIR casts.roundtrip.InstSimplify.diff
+pub fn roundtrip(x: *const u8) -> *const u8 {
+    // CHECK-LABEL: fn roundtrip(
+    // CHECK: _3 = _1;
+    // CHECK: _2 = move _3 as *mut u8 (PtrToPtr);
+    // CHECK: _0 = move _2 as *const u8 (PointerCoercion(MutToConstPointer));
+    x as *mut u8 as *const u8
+}
diff --git a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-abort.diff b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-abort.diff
index 3e7d0ce51e2..3e7d0ce51e2 100644
--- a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-abort.diff
+++ b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-abort.diff
diff --git a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-unwind.diff
index 4833c1089e3..4833c1089e3 100644
--- a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff
+++ b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-unwind.diff
diff --git a/tests/mir-opt/combine_array_len.rs b/tests/mir-opt/instsimplify/combine_array_len.rs
index e971ab4781e..3b6795bc943 100644
--- a/tests/mir-opt/combine_array_len.rs
+++ b/tests/mir-opt/instsimplify/combine_array_len.rs
@@ -1,8 +1,10 @@
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: InstSimplify
-// EMIT_MIR combine_array_len.norm2.InstSimplify.diff
 
+// EMIT_MIR combine_array_len.norm2.InstSimplify.diff
 fn norm2(x: [f32; 2]) -> f32 {
+    // CHECK-LABEL: fn norm2(
+    // CHECK-NOT: Len(
     let a = x[0];
     let b = x[1];
     a*a + b*b
diff --git a/tests/mir-opt/combine_clone_of_primitives.rs b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs
index c19f9ee105f..2adbe778d23 100644
--- a/tests/mir-opt/combine_clone_of_primitives.rs
+++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs
@@ -2,7 +2,6 @@
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
-
 #[derive(Clone)]
 struct MyThing<T> {
     v: T,
@@ -10,6 +9,11 @@ struct MyThing<T> {
     a: [f32; 3],
 }
 
+// CHECK-LABEL: ::clone(
+// CHECK: <T as Clone>::clone(
+// CHECK-NOT: <u64 as Clone>::clone(
+// CHECK-NOT: <[f32; 3] as Clone>::clone(
+
 fn main() {
     let x = MyThing::<i16> { v: 2, i: 3, a: [0.0; 3] };
     let y = x.clone();
diff --git a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff
index 124c2dc7e4b..48586f8b334 100644
--- a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff
+++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff
@@ -1,7 +1,7 @@
-- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstSimplify
-+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
+- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
++ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
   
-  fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
+  fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
       debug self => _1;
       let mut _0: MyThing<T>;
       let mut _2: T;
diff --git a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff
index f2b87221f2b..a57266e9c12 100644
--- a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff
+++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff
@@ -1,7 +1,7 @@
-- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstSimplify
-+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
+- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
++ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
   
-  fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
+  fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
       debug self => _1;
       let mut _0: MyThing<T>;
       let mut _2: T;
diff --git a/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff b/tests/mir-opt/instsimplify/combine_transmutes.adt_transmutes.InstSimplify.diff
index cb623e83f52..cb623e83f52 100644
--- a/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/combine_transmutes.adt_transmutes.InstSimplify.diff
diff --git a/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff b/tests/mir-opt/instsimplify/combine_transmutes.identity_transmutes.InstSimplify.diff
index 58ae5919071..58ae5919071 100644
--- a/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/combine_transmutes.identity_transmutes.InstSimplify.diff
diff --git a/tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff b/tests/mir-opt/instsimplify/combine_transmutes.integer_transmutes.InstSimplify.diff
index 8eff802dd3c..8eff802dd3c 100644
--- a/tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/combine_transmutes.integer_transmutes.InstSimplify.diff
diff --git a/tests/mir-opt/combine_transmutes.rs b/tests/mir-opt/instsimplify/combine_transmutes.rs
index 403f9356ce2..b8e15da905b 100644
--- a/tests/mir-opt/combine_transmutes.rs
+++ b/tests/mir-opt/instsimplify/combine_transmutes.rs
@@ -10,6 +10,10 @@ use std::mem::{MaybeUninit, ManuallyDrop, transmute};
 
 // EMIT_MIR combine_transmutes.identity_transmutes.InstSimplify.diff
 pub unsafe fn identity_transmutes() {
+    // CHECK-LABEL: fn identity_transmutes(
+    // CHECK-NOT: as i32 (Transmute);
+    // CHECK-NOT: as Vec<i32> (Transmute);
+
     // These are nops and should be removed
     let _a = transmute::<i32, i32>(1);
     let _a = transmute::<Vec<i32>, Vec<i32>>(Vec::new());
@@ -18,6 +22,16 @@ pub unsafe fn identity_transmutes() {
 #[custom_mir(dialect = "runtime", phase = "initial")]
 // EMIT_MIR combine_transmutes.integer_transmutes.InstSimplify.diff
 pub unsafe fn integer_transmutes() {
+    // CHECK-LABEL: fn integer_transmutes(
+    // CHECK-NOT: _i32 as u32 (Transmute);
+    // CHECK: _i32 as u32 (IntToInt);
+    // CHECK: _i32 as i64 (Transmute);
+    // CHECK-NOT: _u64 as i64 (Transmute);
+    // CHECK: _u64 as i64 (IntToInt);
+    // CHECK: _u64 as u32 (Transmute);
+    // CHECK-NOT: _isize as usize (Transmute);
+    // CHECK: _isize as usize (IntToInt);
+
     mir! {
         {
             let A = CastTransmute::<i32, u32>(1); // Can be a cast
@@ -32,6 +46,14 @@ pub unsafe fn integer_transmutes() {
 
 // EMIT_MIR combine_transmutes.adt_transmutes.InstSimplify.diff
 pub unsafe fn adt_transmutes() {
+    // CHECK-LABEL: fn adt_transmutes(
+    // CHECK: as u8 (Transmute);
+    // CHECK: ({{_.*}}.0: i16);
+    // CHECK: as u16 (Transmute);
+    // CHECK: as u32 (Transmute);
+    // CHECK: as i32 (Transmute);
+    // CHECK: ({{_.*}}.1: std::mem::ManuallyDrop<std::string::String>);
+
     let _a: u8 = transmute(Some(std::num::NonZeroU8::MAX));
     let _a: i16 = transmute(std::num::Wrapping(0_i16));
     let _a: u16 = transmute(std::num::Wrapping(0_i16));
diff --git a/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff b/tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff
index e2b45c882d6..e2b45c882d6 100644
--- a/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff
diff --git a/tests/mir-opt/instsimplify_duplicate_switch_targets.rs b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs
index 3e280a40fda..e40bc7edaac 100644
--- a/tests/mir-opt/instsimplify_duplicate_switch_targets.rs
+++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs
@@ -1,13 +1,15 @@
+// unit-test: InstSimplify
+
 #![feature(custom_mir, core_intrinsics)]
 #![crate_type = "lib"]
 
 use std::intrinsics::mir::*;
 
-// unit-test: InstSimplify
-
-// EMIT_MIR instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
+// EMIT_MIR duplicate_switch_targets.assert_zero.InstSimplify.diff
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 pub unsafe fn assert_zero(x: u8) -> u8 {
+    // CHECK-LABEL: fn assert_zero(
+    // CHECK: switchInt({{.*}}) -> [0: {{bb.*}}, otherwise: {{bb.*}}]
     mir!(
         {
             match x {
diff --git a/tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.generic.InstSimplify.diff
index efa52798e65..2ecacb5e39f 100644
--- a/tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.generic.InstSimplify.diff
@@ -8,25 +8,25 @@
       let _3: ();
   
       bb0: {
-          nop;
+          StorageLive(_1);
           _1 = assert_inhabited::<T>() -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
-          nop;
-          nop;
+          StorageDead(_1);
+          StorageLive(_2);
           _2 = assert_zero_valid::<T>() -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
-          nop;
-          nop;
+          StorageDead(_2);
+          StorageLive(_3);
           _3 = assert_mem_uninitialized_valid::<T>() -> [return: bb3, unwind unreachable];
       }
   
       bb3: {
-          nop;
-          nop;
+          StorageDead(_3);
+          _0 = const ();
           return;
       }
   }
diff --git a/tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.generic_ref.InstSimplify.diff
index 98d9d24af34..d29af0945f7 100644
--- a/tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.generic_ref.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `generic` before InstSimplify
-+ // MIR for `generic` after InstSimplify
+- // MIR for `generic_ref` before InstSimplify
++ // MIR for `generic_ref` after InstSimplify
   
-  fn generic() -> () {
+  fn generic_ref() -> () {
       let mut _0: ();
       let _1: ();
   
diff --git a/tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.panics.InstSimplify.diff
index 46e05337809..1be386acfcc 100644
--- a/tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.panics.InstSimplify.diff
@@ -8,28 +8,28 @@
       let _3: ();
   
       bb0: {
-          nop;
+          StorageLive(_1);
 -         _1 = assert_inhabited::<Never>() -> [return: bb1, unwind unreachable];
 +         _1 = assert_inhabited::<Never>() -> unwind unreachable;
       }
   
       bb1: {
-          nop;
-          nop;
+          StorageDead(_1);
+          StorageLive(_2);
 -         _2 = assert_zero_valid::<&u8>() -> [return: bb2, unwind unreachable];
 +         _2 = assert_zero_valid::<&u8>() -> unwind unreachable;
       }
   
       bb2: {
-          nop;
-          nop;
+          StorageDead(_2);
+          StorageLive(_3);
 -         _3 = assert_mem_uninitialized_valid::<&u8>() -> [return: bb3, unwind unreachable];
 +         _3 = assert_mem_uninitialized_valid::<&u8>() -> unwind unreachable;
       }
   
       bb3: {
-          nop;
-          nop;
+          StorageDead(_3);
+          _0 = const ();
           return;
       }
   }
diff --git a/tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.removable.InstSimplify.diff
index 70c3e8830f4..f2e69783842 100644
--- a/tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.removable.InstSimplify.diff
@@ -8,28 +8,28 @@
       let _3: ();
   
       bb0: {
-          nop;
+          StorageLive(_1);
 -         _1 = assert_inhabited::<()>() -> [return: bb1, unwind unreachable];
 +         goto -> bb1;
       }
   
       bb1: {
-          nop;
-          nop;
+          StorageDead(_1);
+          StorageLive(_2);
 -         _2 = assert_zero_valid::<u8>() -> [return: bb2, unwind unreachable];
 +         goto -> bb2;
       }
   
       bb2: {
-          nop;
-          nop;
+          StorageDead(_2);
+          StorageLive(_3);
 -         _3 = assert_mem_uninitialized_valid::<u8>() -> [return: bb3, unwind unreachable];
 +         goto -> bb3;
       }
   
       bb3: {
-          nop;
-          nop;
+          StorageDead(_3);
+          _0 = const ();
           return;
       }
   }
diff --git a/tests/mir-opt/intrinsic_asserts.rs b/tests/mir-opt/instsimplify/intrinsic_asserts.rs
index 302d4bda188..43998b2dbf0 100644
--- a/tests/mir-opt/intrinsic_asserts.rs
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.rs
@@ -1,9 +1,15 @@
+// unit-test: InstSimplify
+
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
 
 // All these assertions pass, so all the intrinsic calls should be deleted.
 // EMIT_MIR intrinsic_asserts.removable.InstSimplify.diff
 pub fn removable() {
+    // CHECK-LABEL: fn removable(
+    // CHECK-NOT: assert_inhabited
+    // CHECK-NOT: assert_zero_valid
+    // CHECK-NOT: assert_mem_uninitialized_valid
     core::intrinsics::assert_inhabited::<()>();
     core::intrinsics::assert_zero_valid::<u8>();
     core::intrinsics::assert_mem_uninitialized_valid::<u8>();
@@ -14,6 +20,10 @@ enum Never {}
 // These assertions all diverge, so their target blocks should become None.
 // EMIT_MIR intrinsic_asserts.panics.InstSimplify.diff
 pub fn panics() {
+    // CHECK-LABEL: fn panics(
+    // CHECK: assert_inhabited::<Never>() -> unwind
+    // CHECK: assert_zero_valid::<&u8>() -> unwind
+    // CHECK: assert_mem_uninitialized_valid::<&u8>() -> unwind
     core::intrinsics::assert_inhabited::<Never>();
     core::intrinsics::assert_zero_valid::<&u8>();
     core::intrinsics::assert_mem_uninitialized_valid::<&u8>();
@@ -22,7 +32,19 @@ pub fn panics() {
 // Whether or not these asserts pass isn't known, so they shouldn't be modified.
 // EMIT_MIR intrinsic_asserts.generic.InstSimplify.diff
 pub fn generic<T>() {
+    // CHECK-LABEL: fn generic(
+    // CHECK: assert_inhabited::<T>() -> [return:
+    // CHECK: assert_zero_valid::<T>() -> [return:
+    // CHECK: assert_mem_uninitialized_valid::<T>() -> [return:
     core::intrinsics::assert_inhabited::<T>();
     core::intrinsics::assert_zero_valid::<T>();
     core::intrinsics::assert_mem_uninitialized_valid::<T>();
 }
+
+// Whether or not these asserts pass isn't known, so they shouldn't be modified.
+// EMIT_MIR intrinsic_asserts.generic_ref.InstSimplify.diff
+pub fn generic_ref<T>() {
+    // CHECK-LABEL: fn generic_ref(
+    // CHECK: assert_mem_uninitialized_valid::<&T>() -> [return:
+    core::intrinsics::assert_mem_uninitialized_valid::<&T>();
+}
diff --git a/tests/mir-opt/issue_101973.rs b/tests/mir-opt/issue_101973.rs
index 01b342f4dc3..3de325bc170 100644
--- a/tests/mir-opt/issue_101973.rs
+++ b/tests/mir-opt/issue_101973.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -O -C debug-assertions=on
 // This needs inlining followed by ConstProp to reproduce, so we cannot use "unit-test".
diff --git a/tests/mir-opt/issue_104451_unwindable_intrinsics.rs b/tests/mir-opt/issue_104451_unwindable_intrinsics.rs
index 54112627e4e..cd068f12236 100644
--- a/tests/mir-opt/issue_104451_unwindable_intrinsics.rs
+++ b/tests/mir-opt/issue_104451_unwindable_intrinsics.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Check that `UnwindAction::Unreachable` is not generated for unwindable intrinsics.
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![feature(core_intrinsics)]
diff --git a/tests/mir-opt/issue_38669.rs b/tests/mir-opt/issue_38669.rs
index db3f89472c9..9da4c89bb12 100644
--- a/tests/mir-opt/issue_38669.rs
+++ b/tests/mir-opt/issue_38669.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // check that we don't StorageDead booleans before they are used
 
 // EMIT_MIR issue_38669.main.SimplifyCfg-initial.after.mir
diff --git a/tests/mir-opt/issue_41110.rs b/tests/mir-opt/issue_41110.rs
index d8665b23d26..38602d5eaef 100644
--- a/tests/mir-opt/issue_41110.rs
+++ b/tests/mir-opt/issue_41110.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // check that we don't emit multiple drop flags when they are not needed.
diff --git a/tests/mir-opt/issue_41697.rs b/tests/mir-opt/issue_41697.rs
index cbd8633a345..92d382c3940 100644
--- a/tests/mir-opt/issue_41697.rs
+++ b/tests/mir-opt/issue_41697.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Regression test for #41697. Using dump-mir was triggering
 // artificial cycles: during type-checking, we had to get the MIR for
 // the constant expressions in `[u8; 2]`, which in turn would trigger
diff --git a/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir b/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
index 0b48e58dabd..7dafeabaacc 100644
--- a/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
+++ b/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue_41697.rs:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
+// MIR for `<impl at $DIR/issue_41697.rs:19:1: 19:23>::{constant#0}` after SimplifyCfg-promote-consts
 
-<impl at $DIR/issue_41697.rs:18:1: 18:23>::{constant#0}: usize = {
+<impl at $DIR/issue_41697.rs:19:1: 19:23>::{constant#0}: usize = {
     let mut _0: usize;
     let mut _1: (usize, bool);
 
diff --git a/tests/mir-opt/issue_41888.rs b/tests/mir-opt/issue_41888.rs
index 9b16caf92fe..70b20218633 100644
--- a/tests/mir-opt/issue_41888.rs
+++ b/tests/mir-opt/issue_41888.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // check that we clear the "ADT master drop flag" even when there are
 // no fields to be dropped.
diff --git a/tests/mir-opt/issue_62289.rs b/tests/mir-opt/issue_62289.rs
index fece6bb7cf5..40e8352cff4 100644
--- a/tests/mir-opt/issue_62289.rs
+++ b/tests/mir-opt/issue_62289.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // check that we don't forget to drop the Box if we early return before
 // initializing it
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/issue_72181.rs b/tests/mir-opt/issue_72181.rs
index 6a32d4bbee2..226709bab2f 100644
--- a/tests/mir-opt/issue_72181.rs
+++ b/tests/mir-opt/issue_72181.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=1
 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags.
 
diff --git a/tests/mir-opt/issue_72181_1.main.built.after.mir b/tests/mir-opt/issue_72181_1.main.built.after.mir
index f5ab5b526df..d35aada95f8 100644
--- a/tests/mir-opt/issue_72181_1.main.built.after.mir
+++ b/tests/mir-opt/issue_72181_1.main.built.after.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:16:12: 16:16, inferred_ty: Void
-| 1: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:16:12: 16:16, inferred_ty: Void
+| 0: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:17:12: 17:16, inferred_ty: Void
+| 1: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:17:12: 17:16, inferred_ty: Void
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/issue_72181_1.rs b/tests/mir-opt/issue_72181_1.rs
index 8ae2599ec73..f9ee33ef991 100644
--- a/tests/mir-opt/issue_72181_1.rs
+++ b/tests/mir-opt/issue_72181_1.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=1
 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags.
 
diff --git a/tests/mir-opt/issue_76432.rs b/tests/mir-opt/issue_76432.rs
index 2a8e1283b0c..f0f12c535c5 100644
--- a/tests/mir-opt/issue_76432.rs
+++ b/tests/mir-opt/issue_76432.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zmir-enable-passes=-NormalizeArrayLen
 // Check that we do not insert StorageDead at each target if StorageDead was never seen
diff --git a/tests/mir-opt/issue_78192.rs b/tests/mir-opt/issue_78192.rs
index 95142a3e463..b08c3615e8b 100644
--- a/tests/mir-opt/issue_78192.rs
+++ b/tests/mir-opt/issue_78192.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=1 -Zinline-mir
 pub fn f<T>(a: &T) -> *const T {
     let b: &*const T = &(a as *const T);
diff --git a/tests/mir-opt/issue_91633.rs b/tests/mir-opt/issue_91633.rs
index 9127cacc97c..047a0cd9bdb 100644
--- a/tests/mir-opt/issue_91633.rs
+++ b/tests/mir-opt/issue_91633.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=0
 // EMIT_MIR issue_91633.hey.built.after.mir
 fn hey<T> (it: &[T])
diff --git a/tests/mir-opt/issue_99325.main.built.after.32bit.mir b/tests/mir-opt/issue_99325.main.built.after.32bit.mir
index f8ac75513ba..188b53d28d7 100644
--- a/tests/mir-opt/issue_99325.main.built.after.32bit.mir
+++ b/tests/mir-opt/issue_99325.main.built.after.32bit.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:12:16: 12:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
-| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/issue_99325.main.built.after.64bit.mir b/tests/mir-opt/issue_99325.main.built.after.64bit.mir
index f8ac75513ba..188b53d28d7 100644
--- a/tests/mir-opt/issue_99325.main.built.after.64bit.mir
+++ b/tests/mir-opt/issue_99325.main.built.after.64bit.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:12:16: 12:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
-| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/issue_99325.rs b/tests/mir-opt/issue_99325.rs
index 3603228a502..2638b69e2ee 100644
--- a/tests/mir-opt/issue_99325.rs
+++ b/tests/mir-opt/issue_99325.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
 #![feature(adt_const_params)]
diff --git a/tests/mir-opt/issues/issue_59352.rs b/tests/mir-opt/issues/issue_59352.rs
index 7cadf8f227f..1cbeaec28bb 100644
--- a/tests/mir-opt/issues/issue_59352.rs
+++ b/tests/mir-opt/issues/issue_59352.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This test is a mirror of codegen/issue-59352.rs.
 // The LLVM inliner doesn't inline `char::method::is_digit()` and so it doesn't recognize this case
diff --git a/tests/mir-opt/issues/issue_75439.rs b/tests/mir-opt/issues/issue_75439.rs
index 4c749a150c0..0ab496e474d 100644
--- a/tests/mir-opt/issues/issue_75439.rs
+++ b/tests/mir-opt/issues/issue_75439.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR issue_75439.foo.MatchBranchSimplification.diff
 // ignore-endian-big
 
diff --git a/tests/mir-opt/loop_test.rs b/tests/mir-opt/loop_test.rs
index 7ded5b5757f..81a0d9df0a0 100644
--- a/tests/mir-opt/loop_test.rs
+++ b/tests/mir-opt/loop_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z identify_regions
 
 // Tests to make sure we correctly generate falseUnwind edges in loops
diff --git a/tests/mir-opt/lower_array_len.rs b/tests/mir-opt/lower_array_len.rs
index 7d69e175921..effd83b6af0 100644
--- a/tests/mir-opt/lower_array_len.rs
+++ b/tests/mir-opt/lower_array_len.rs
@@ -4,6 +4,9 @@
 
 // EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff
 pub fn array_bound<const N: usize>(index: usize, slice: &[u8; N]) -> u8 {
+    // CHECK-LABEL: fn array_bound(
+    // CHECK: [[len:_.*]] = const N;
+    // CHECK: Lt(move {{_.*}}, move [[len]]);
     if index < slice.len() {
         slice[index]
     } else {
@@ -13,6 +16,9 @@ pub fn array_bound<const N: usize>(index: usize, slice: &[u8; N]) -> u8 {
 
 // EMIT_MIR lower_array_len.array_bound_mut.NormalizeArrayLen.diff
 pub fn array_bound_mut<const N: usize>(index: usize, slice: &mut [u8; N]) -> u8 {
+    // CHECK-LABEL: fn array_bound_mut(
+    // CHECK: [[len:_.*]] = const N;
+    // CHECK: Lt(move {{_.*}}, move [[len]]);
     if index < slice.len() {
         slice[index]
     } else {
@@ -24,16 +30,22 @@ pub fn array_bound_mut<const N: usize>(index: usize, slice: &mut [u8; N]) -> u8
 
 // EMIT_MIR lower_array_len.array_len.NormalizeArrayLen.diff
 pub fn array_len<const N: usize>(arr: &[u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len(
+    // CHECK: _0 = const N;
     arr.len()
 }
 
 // EMIT_MIR lower_array_len.array_len_by_value.NormalizeArrayLen.diff
 pub fn array_len_by_value<const N: usize>(arr: [u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len_by_value(
+    // CHECK: _0 = const N;
     arr.len()
 }
 
 // EMIT_MIR lower_array_len.array_len_reborrow.NormalizeArrayLen.diff
 pub fn array_len_reborrow<const N: usize>(mut arr: [u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len_reborrow(
+    // CHECK: _0 = const N;
     let arr: &mut [_] = &mut arr;
     let arr = &*arr;
     arr.len()
@@ -41,6 +53,8 @@ pub fn array_len_reborrow<const N: usize>(mut arr: [u8; N]) -> usize {
 
 // EMIT_MIR lower_array_len.array_len_raw.NormalizeArrayLen.diff
 pub fn array_len_raw<const N: usize>(arr: [u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len_raw(
+    // CHECK: _0 = const N;
     let arr: &[_] = &arr;
     let arr = std::ptr::addr_of!(*arr);
     unsafe { &*arr }.len()
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index 0758e9b775b..913605cc2b2 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -6,6 +6,10 @@
 
 // EMIT_MIR lower_intrinsics.wrapping.LowerIntrinsics.diff
 pub fn wrapping(a: i32, b: i32) {
+    // CHECK-LABEL: fn wrapping(
+    // CHECK: {{_.*}} = Add(
+    // CHECK: {{_.*}} = Sub(
+    // CHECK: {{_.*}} = Mul(
     let _x = core::intrinsics::wrapping_add(a, b);
     let _y = core::intrinsics::wrapping_sub(a, b);
     let _z = core::intrinsics::wrapping_mul(a, b);
@@ -13,6 +17,14 @@ pub fn wrapping(a: i32, b: i32) {
 
 // EMIT_MIR lower_intrinsics.unchecked.LowerIntrinsics.diff
 pub unsafe fn unchecked(a: i32, b: i32) {
+    // CHECK-LABEL: fn unchecked(
+    // CHECK: {{_.*}} = AddUnchecked(
+    // CHECK: {{_.*}} = SubUnchecked(
+    // CHECK: {{_.*}} = MulUnchecked(
+    // CHECK: {{_.*}} = Div(
+    // CHECK: {{_.*}} = Rem(
+    // CHECK: {{_.*}} = ShlUnchecked(
+    // CHECK: {{_.*}} = ShrUnchecked(
     let _a = core::intrinsics::unchecked_add(a, b);
     let _b = core::intrinsics::unchecked_sub(a, b);
     let _c = core::intrinsics::unchecked_mul(a, b);
@@ -24,26 +36,39 @@ pub unsafe fn unchecked(a: i32, b: i32) {
 
 // EMIT_MIR lower_intrinsics.size_of.LowerIntrinsics.diff
 pub fn size_of<T>() -> usize {
+    // CHECK-LABEL: fn size_of(
+    // CHECK: {{_.*}} = SizeOf(T);
     core::intrinsics::size_of::<T>()
 }
 
 // EMIT_MIR lower_intrinsics.align_of.LowerIntrinsics.diff
 pub fn align_of<T>() -> usize {
+    // CHECK-LABEL: fn align_of(
+    // CHECK: {{_.*}} = AlignOf(T);
     core::intrinsics::min_align_of::<T>()
 }
 
 // EMIT_MIR lower_intrinsics.forget.LowerIntrinsics.diff
 pub fn forget<T>(t: T) {
+    // CHECK-LABEL: fn forget(
+    // CHECK-NOT: Drop(
+    // CHECK: return;
+    // CHECK-NOT: Drop(
     core::intrinsics::forget(t)
 }
 
 // EMIT_MIR lower_intrinsics.unreachable.LowerIntrinsics.diff
 pub fn unreachable() -> ! {
+    // CHECK-LABEL: fn unreachable(
+    // CHECK: unreachable;
     unsafe { core::intrinsics::unreachable() };
 }
 
 // EMIT_MIR lower_intrinsics.non_const.LowerIntrinsics.diff
 pub fn non_const<T>() -> usize {
+    // CHECK-LABEL: fn non_const(
+    // CHECK: SizeOf(T);
+
     // Check that lowering works with non-const operand as a func.
     let size_of_t = core::intrinsics::size_of::<T>;
     size_of_t()
@@ -51,33 +76,55 @@ pub fn non_const<T>() -> usize {
 
 // EMIT_MIR lower_intrinsics.transmute_inhabited.LowerIntrinsics.diff
 pub fn transmute_inhabited(c: std::cmp::Ordering) -> i8 {
+    // CHECK-LABEL: fn transmute_inhabited(
+    // CHECK: {{_.*}} = {{.*}} as i8 (Transmute);
+
     unsafe { std::mem::transmute(c) }
 }
 
 // EMIT_MIR lower_intrinsics.transmute_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_uninhabited(u: ()) -> Never {
+    // CHECK-LABEL: fn transmute_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as Never (Transmute);
+    // CHECK: unreachable;
+
     unsafe { std::mem::transmute::<(), Never>(u) }
 }
 
 // EMIT_MIR lower_intrinsics.transmute_ref_dst.LowerIntrinsics.diff
 pub unsafe fn transmute_ref_dst<T: ?Sized>(u: &T) -> *const T {
+    // CHECK-LABEL: fn transmute_ref_dst(
+    // CHECK: {{_.*}} = {{.*}} as *const T (Transmute);
+
     unsafe { std::mem::transmute(u) }
 }
 
 // EMIT_MIR lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_to_ref_uninhabited() -> ! {
+    // CHECK-LABEL: fn transmute_to_ref_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as &Never (Transmute);
+    // CHECK: unreachable;
+
     let x: &Never = std::mem::transmute(1usize);
     match *x {}
 }
 
 // EMIT_MIR lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_to_mut_uninhabited() -> ! {
+    // CHECK-LABEL: fn transmute_to_mut_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as &mut Never (Transmute);
+    // CHECK: unreachable;
+
     let x: &mut Never = std::mem::transmute(1usize);
     match *x {}
 }
 
 // EMIT_MIR lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_to_box_uninhabited() -> ! {
+    // CHECK-LABEL: fn transmute_to_box_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as std::boxed::Box<Never> (Transmute);
+    // CHECK: unreachable;
+
     let x: Box<Never> = std::mem::transmute(1usize);
     match *x {}
 }
@@ -90,6 +137,12 @@ pub enum E {
 
 // EMIT_MIR lower_intrinsics.discriminant.LowerIntrinsics.diff
 pub fn discriminant<T>(t: T) {
+    // CHECK-LABEL: fn discriminant(
+    // CHECK: {{_.*}} = discriminant(
+    // CHECK: {{_.*}} = discriminant(
+    // CHECK: {{_.*}} = discriminant(
+    // CHECK: {{_.*}} = discriminant(
+
     core::intrinsics::discriminant_value(&t);
     core::intrinsics::discriminant_value(&0);
     core::intrinsics::discriminant_value(&());
@@ -104,6 +157,9 @@ extern "rust-intrinsic" {
 
 // EMIT_MIR lower_intrinsics.f_copy_nonoverlapping.LowerIntrinsics.diff
 pub fn f_copy_nonoverlapping() {
+    // CHECK-LABEL: fn f_copy_nonoverlapping(
+    // CHECK: copy_nonoverlapping({{.*}});
+
     let src = ();
     let mut dst = ();
     unsafe {
@@ -113,6 +169,9 @@ pub fn f_copy_nonoverlapping() {
 
 // EMIT_MIR lower_intrinsics.assume.LowerIntrinsics.diff
 pub fn assume() {
+    // CHECK-LABEL: fn assume(
+    // CHECK: assume({{.*}});
+
     unsafe {
         std::intrinsics::assume(true);
     }
@@ -120,6 +179,11 @@ pub fn assume() {
 
 // EMIT_MIR lower_intrinsics.with_overflow.LowerIntrinsics.diff
 pub fn with_overflow(a: i32, b: i32) {
+    // CHECK-LABEL: fn with_overflow(
+    // CHECK: CheckedAdd(
+    // CHECK: CheckedSub(
+    // CHECK: CheckedMul(
+
     let _x = core::intrinsics::add_with_overflow(a, b);
     let _y = core::intrinsics::sub_with_overflow(a, b);
     let _z = core::intrinsics::mul_with_overflow(a, b);
@@ -127,16 +191,32 @@ pub fn with_overflow(a: i32, b: i32) {
 
 // EMIT_MIR lower_intrinsics.read_via_copy_primitive.LowerIntrinsics.diff
 pub fn read_via_copy_primitive(r: &i32) -> i32 {
+    // CHECK-LABEL: fn read_via_copy_primitive(
+    // CHECK: [[tmp:_.*]] = &raw const (*_1);
+    // CHECK: _0 = (*[[tmp]]);
+    // CHECK: return;
+
     unsafe { core::intrinsics::read_via_copy(r) }
 }
 
 // EMIT_MIR lower_intrinsics.read_via_copy_uninhabited.LowerIntrinsics.diff
 pub fn read_via_copy_uninhabited(r: &Never) -> Never {
+    // CHECK-LABEL: fn read_via_copy_uninhabited(
+    // CHECK: [[tmp:_.*]] = &raw const (*_1);
+    // CHECK: _0 = (*[[tmp]]);
+    // CHECK: unreachable;
+
     unsafe { core::intrinsics::read_via_copy(r) }
 }
 
 // EMIT_MIR lower_intrinsics.write_via_move_string.LowerIntrinsics.diff
 pub fn write_via_move_string(r: &mut String, v: String) {
+    // CHECK-LABEL: fn write_via_move_string(
+    // CHECK: [[ptr:_.*]] = &raw mut (*_1);
+    // CHECK: [[tmp:_.*]] = move _2;
+    // CHECK: (*[[ptr]]) = move [[tmp]];
+    // CHECK: return;
+
     unsafe { core::intrinsics::write_via_move(r, v) }
 }
 
@@ -144,6 +224,10 @@ pub enum Never {}
 
 // EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
 pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
+    // CHECK-LABEL: fn option_payload(
+    // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: usize);
+    // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: std::string::String);
+
     unsafe {
         let _x = core::intrinsics::option_payload_ptr(o);
         let _y = core::intrinsics::option_payload_ptr(p);
@@ -152,5 +236,8 @@ pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
 
 // EMIT_MIR lower_intrinsics.ptr_offset.LowerIntrinsics.diff
 pub unsafe fn ptr_offset(p: *const i32, d: isize) -> *const i32 {
+    // CHECK-LABEL: fn ptr_offset(
+    // CHECK: _0 = Offset(
+
     core::intrinsics::offset(p, d)
 }
diff --git a/tests/mir-opt/lower_slice_len.rs b/tests/mir-opt/lower_slice_len.rs
index b0c512aec89..7b967a16588 100644
--- a/tests/mir-opt/lower_slice_len.rs
+++ b/tests/mir-opt/lower_slice_len.rs
@@ -1,8 +1,10 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: LowerSliceLenCalls
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff
 pub fn bound(index: usize, slice: &[u8]) -> u8 {
+    // CHECK-LABEL: fn bound(
+    // CHECK-NOT: ::len(
     if index < slice.len() {
         slice[index]
     } else {
diff --git a/tests/mir-opt/match_arm_scopes.rs b/tests/mir-opt/match_arm_scopes.rs
index e0249de8601..43746e99398 100644
--- a/tests/mir-opt/match_arm_scopes.rs
+++ b/tests/mir-opt/match_arm_scopes.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Test that StorageDead and Drops are generated properly for bindings in
 // matches:
diff --git a/tests/mir-opt/match_test.rs b/tests/mir-opt/match_test.rs
index 3a21077905b..e465289e427 100644
--- a/tests/mir-opt/match_test.rs
+++ b/tests/mir-opt/match_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Make sure redundant testing paths in `match` expressions are sorted out.
 
 #![feature(exclusive_range_pattern)]
diff --git a/tests/mir-opt/matches_reduce_branches.rs b/tests/mir-opt/matches_reduce_branches.rs
index a81d5f7b4e8..13db7973414 100644
--- a/tests/mir-opt/matches_reduce_branches.rs
+++ b/tests/mir-opt/matches_reduce_branches.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: MatchBranchSimplification
 
 
diff --git a/tests/mir-opt/matches_u8.rs b/tests/mir-opt/matches_u8.rs
index 422c3a95e8e..47c4ffee024 100644
--- a/tests/mir-opt/matches_u8.rs
+++ b/tests/mir-opt/matches_u8.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: MatchBranchSimplification
 
 
diff --git a/tests/mir-opt/multiple_return_terminators.rs b/tests/mir-opt/multiple_return_terminators.rs
index a2b902d1483..f33243ecf73 100644
--- a/tests/mir-opt/multiple_return_terminators.rs
+++ b/tests/mir-opt/multiple_return_terminators.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=4
 // EMIT_MIR multiple_return_terminators.test.MultipleReturnTerminators.diff
 
diff --git a/tests/mir-opt/nll/named_lifetimes_basic.rs b/tests/mir-opt/nll/named_lifetimes_basic.rs
index 843716033ca..5a9312de284 100644
--- a/tests/mir-opt/nll/named_lifetimes_basic.rs
+++ b/tests/mir-opt/nll/named_lifetimes_basic.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Basic test for named lifetime translation. Check that we
 // instantiate the types that appear in function arguments with
 // suitable variables and that we setup the outlives relationship
diff --git a/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir b/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
index 1d6b8307390..49f0a43295a 100644
--- a/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
+++ b/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
@@ -24,14 +24,14 @@
 | '?2 live at {bb0[0..=1]}
 | '?3 live at {bb0[0..=1]}
 | '?4 live at {bb0[0..=1]}
-| '?1: '?5 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
-| '?1: '?7 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
-| '?2: '?6 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
-| '?3: '?8 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
-| '?5: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
-| '?6: '?2 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
-| '?7: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
-| '?8: '?3 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
+| '?1: '?5 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:26: 13:27) ($DIR/named_lifetimes_basic.rs:13:26: 13:27 (#0)
+| '?1: '?7 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:54: 13:55) ($DIR/named_lifetimes_basic.rs:13:54: 13:55 (#0)
+| '?2: '?6 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:42: 13:43) ($DIR/named_lifetimes_basic.rs:13:42: 13:43 (#0)
+| '?3: '?8 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:66: 13:67) ($DIR/named_lifetimes_basic.rs:13:66: 13:67 (#0)
+| '?5: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:26: 13:27) ($DIR/named_lifetimes_basic.rs:13:26: 13:27 (#0)
+| '?6: '?2 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:42: 13:43) ($DIR/named_lifetimes_basic.rs:13:42: 13:43 (#0)
+| '?7: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:54: 13:55) ($DIR/named_lifetimes_basic.rs:13:54: 13:55 (#0)
+| '?8: '?3 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:66: 13:67) ($DIR/named_lifetimes_basic.rs:13:66: 13:67 (#0)
 |
 fn use_x(_1: &'?5 mut i32, _2: &'?6 u32, _3: &'?7 u32, _4: &'?8 u32) -> bool {
     debug w => _1;
diff --git a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
index c581d0f8471..ad456600b0a 100644
--- a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
+++ b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
@@ -17,8 +17,8 @@
 | '?2 live at {bb1[0]}
 | '?3 live at {bb1[1..=3]}
 | '?4 live at {bb1[4..=7], bb2[0..=2]}
-| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
-| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
+| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:19:13: 19:18 (#0)
+| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:20:13: 20:14 (#0)
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
index 48243e34d08..a15d47cd66f 100644
--- a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
+++ b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
@@ -17,8 +17,8 @@
 | '?2 live at {bb1[0]}
 | '?3 live at {bb1[1..=3]}
 | '?4 live at {bb1[4..=7], bb2[0..=2]}
-| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
-| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
+| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:19:13: 19:18 (#0)
+| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:20:13: 20:14 (#0)
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/nll/region_subtyping_basic.rs b/tests/mir-opt/nll/region_subtyping_basic.rs
index 64332f302e8..83f756acdc3 100644
--- a/tests/mir-opt/nll/region_subtyping_basic.rs
+++ b/tests/mir-opt/nll/region_subtyping_basic.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Basic test for liveness constraints: the region (`R1`) that appears
 // in the type of `p` includes the points after `&v[0]` up to (but not
 // including) the call to `use_x`. The `else` branch is not included.
diff --git a/tests/mir-opt/no_drop_for_inactive_variant.rs b/tests/mir-opt/no_drop_for_inactive_variant.rs
index adbd1f353fc..dd20e4a548e 100644
--- a/tests/mir-opt/no_drop_for_inactive_variant.rs
+++ b/tests/mir-opt/no_drop_for_inactive_variant.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // Ensure that there are no drop terminators in `unwrap<T>` (except the one along the cleanup
diff --git a/tests/mir-opt/no_spurious_drop_after_call.rs b/tests/mir-opt/no_spurious_drop_after_call.rs
index 71f050502cb..cd7b8fb7942 100644
--- a/tests/mir-opt/no_spurious_drop_after_call.rs
+++ b/tests/mir-opt/no_spurious_drop_after_call.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // Test that after the call to `std::mem::drop` we do not generate a
diff --git a/tests/mir-opt/not_equal_false.rs b/tests/mir-opt/not_equal_false.rs
deleted file mode 100644
index e0560732900..00000000000
--- a/tests/mir-opt/not_equal_false.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// unit-test: InstSimplify
-// EMIT_MIR not_equal_false.opt.InstSimplify.diff
-
-fn opt(x: bool) -> u32 {
-    if x != false { 0 } else { 1 }
-}
-
-fn main() {
-    opt(false);
-}
diff --git a/tests/mir-opt/nrvo_miscompile_111005.rs b/tests/mir-opt/nrvo_miscompile_111005.rs
index a9f391b79d5..aff037ae4f2 100644
--- a/tests/mir-opt/nrvo_miscompile_111005.rs
+++ b/tests/mir-opt/nrvo_miscompile_111005.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This is a miscompilation, #111005 to track
 
 // unit-test: RenameReturnPlace
diff --git a/tests/mir-opt/nrvo_simple.rs b/tests/mir-opt/nrvo_simple.rs
index 9e822ed51d4..5b403c560a7 100644
--- a/tests/mir-opt/nrvo_simple.rs
+++ b/tests/mir-opt/nrvo_simple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: RenameReturnPlace
 
diff --git a/tests/mir-opt/packed_struct_drop_aligned.rs b/tests/mir-opt/packed_struct_drop_aligned.rs
index f88a683535c..079c4e68f50 100644
--- a/tests/mir-opt/packed_struct_drop_aligned.rs
+++ b/tests/mir-opt/packed_struct_drop_aligned.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 
diff --git a/tests/mir-opt/pre-codegen/chained_comparison.rs b/tests/mir-opt/pre-codegen/chained_comparison.rs
index 43030041983..d1d400af22f 100644
--- a/tests/mir-opt/pre-codegen/chained_comparison.rs
+++ b/tests/mir-opt/pre-codegen/chained_comparison.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
 
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/pre-codegen/checked_ops.rs b/tests/mir-opt/pre-codegen/checked_ops.rs
index 23d78e98777..d386219f4a6 100644
--- a/tests/mir-opt/pre-codegen/checked_ops.rs
+++ b/tests/mir-opt/pre-codegen/checked_ops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
 // needs-unwind
 // only-x86_64
diff --git a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
index d8af6b14dad..b1a00d29372 100644
--- a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
+++ b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0
 // ignore-debug: standard library debug assertions add a panic that breaks this optimization
 
diff --git a/tests/mir-opt/pre-codegen/intrinsics.rs b/tests/mir-opt/pre-codegen/intrinsics.rs
index e32e04384c4..565bd89e571 100644
--- a/tests/mir-opt/pre-codegen/intrinsics.rs
+++ b/tests/mir-opt/pre-codegen/intrinsics.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 
diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs
index f3ba409229d..7f9c26f4fff 100644
--- a/tests/mir-opt/pre-codegen/loops.rs
+++ b/tests/mir-opt/pre-codegen/loops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -g
 // needs-unwind
 
diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs
index a139848bab2..18c4653d4c6 100644
--- a/tests/mir-opt/pre-codegen/mem_replace.rs
+++ b/tests/mir-opt/pre-codegen/mem_replace.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // ignore-debug the standard library debug assertions leak into this test
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
index 704f8f887e3..bb089ea4455 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -C overflow-checks=on
 
diff --git a/tests/mir-opt/pre-codegen/range_iter.rs b/tests/mir-opt/pre-codegen/range_iter.rs
index 9552144787d..80b1a5b2fa5 100644
--- a/tests/mir-opt/pre-codegen/range_iter.rs
+++ b/tests/mir-opt/pre-codegen/range_iter.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
index 80a470c9482..af5d385a979 100644
--- a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
@@ -3,9 +3,9 @@
 fn ezmap(_1: Option<i32>) -> Option<i32> {
     debug x => _1;
     let mut _0: std::option::Option<i32>;
-    scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:17:12: 17:15}>) {
+    scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:18:12: 18:15}>) {
         debug slf => _1;
-        debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:17:12: 17:15};
+        debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:18:12: 18:15};
         let mut _2: isize;
         let _3: i32;
         let mut _4: i32;
diff --git a/tests/mir-opt/pre-codegen/simple_option_map.rs b/tests/mir-opt/pre-codegen/simple_option_map.rs
index d4f28dda6c6..35f9ab3e154 100644
--- a/tests/mir-opt/pre-codegen/simple_option_map.rs
+++ b/tests/mir-opt/pre-codegen/simple_option_map.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 
diff --git a/tests/mir-opt/pre-codegen/slice_filter.rs b/tests/mir-opt/pre-codegen/slice_filter.rs
index aba951acdd0..483e5876615 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.rs
+++ b/tests/mir-opt/pre-codegen/slice_filter.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
 // ignore-debug: standard library debug assertions add a panic that breaks this optimization
 
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
index b35d3a105ba..548767dca0d 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
@@ -1,6 +1,6 @@
 // MIR for `variant_a::{closure#0}` after PreCodegen
 
-fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2: &&(usize, usize, usize, usize)) -> bool {
+fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:8:25: 8:39}, _2: &&(usize, usize, usize, usize)) -> bool {
     let mut _0: bool;
     let mut _3: &(usize, usize, usize, usize);
     let _4: &usize;
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
index 80c8cebff45..e2ed1d101dc 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
@@ -1,6 +1,6 @@
 // MIR for `variant_b::{closure#0}` after PreCodegen
 
-fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41}, _2: &&(usize, usize, usize, usize)) -> bool {
+fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:12:25: 12:41}, _2: &&(usize, usize, usize, usize)) -> bool {
     let mut _0: bool;
     let mut _3: &(usize, usize, usize, usize);
     let _4: usize;
diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs
index 57ffb07e294..5225fc5c6e1 100644
--- a/tests/mir-opt/pre-codegen/slice_index.rs
+++ b/tests/mir-opt/pre-codegen/slice_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // ignore-debug the standard library debug assertions leak into this test
diff --git a/tests/mir-opt/pre-codegen/slice_iter.rs b/tests/mir-opt/pre-codegen/slice_iter.rs
index 1790056369c..10a5c3070d8 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.rs
+++ b/tests/mir-opt/pre-codegen/slice_iter.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // ignore-debug the standard library debug assertions leak into this test
diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
index 7af69e08ca1..485dc9179ce 100644
--- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
@@ -1,18 +1,18 @@
 // MIR for `outer` after PreCodegen
 
 fn outer(_1: u8) -> u8 {
-    debug v => _1;                       // in scope 0 at $DIR/spans.rs:9:14: 9:15
-    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:9:24: 9:26
-    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:10:11: 10:13
-    scope 1 (inlined inner) {            // at $DIR/spans.rs:10:5: 10:14
-        debug x => _2;                   // in scope 1 at $DIR/spans.rs:13:14: 13:15
+    debug v => _1;                       // in scope 0 at $DIR/spans.rs:10:14: 10:15
+    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:10:24: 10:26
+    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:11:11: 11:13
+    scope 1 (inlined inner) {            // at $DIR/spans.rs:11:5: 11:14
+        debug x => _2;                   // in scope 1 at $DIR/spans.rs:14:14: 14:15
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _2 = &_1;                        // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _0 = _1;                         // scope 1 at $DIR/spans.rs:14:5: 14:7
-        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:10:13: 10:14
-        return;                          // scope 0 at $DIR/spans.rs:11:2: 11:2
+        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _2 = &_1;                        // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _0 = _1;                         // scope 1 at $DIR/spans.rs:15:5: 15:7
+        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:11:13: 11:14
+        return;                          // scope 0 at $DIR/spans.rs:12:2: 12:2
     }
 }
diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
index 7af69e08ca1..485dc9179ce 100644
--- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
@@ -1,18 +1,18 @@
 // MIR for `outer` after PreCodegen
 
 fn outer(_1: u8) -> u8 {
-    debug v => _1;                       // in scope 0 at $DIR/spans.rs:9:14: 9:15
-    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:9:24: 9:26
-    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:10:11: 10:13
-    scope 1 (inlined inner) {            // at $DIR/spans.rs:10:5: 10:14
-        debug x => _2;                   // in scope 1 at $DIR/spans.rs:13:14: 13:15
+    debug v => _1;                       // in scope 0 at $DIR/spans.rs:10:14: 10:15
+    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:10:24: 10:26
+    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:11:11: 11:13
+    scope 1 (inlined inner) {            // at $DIR/spans.rs:11:5: 11:14
+        debug x => _2;                   // in scope 1 at $DIR/spans.rs:14:14: 14:15
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _2 = &_1;                        // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _0 = _1;                         // scope 1 at $DIR/spans.rs:14:5: 14:7
-        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:10:13: 10:14
-        return;                          // scope 0 at $DIR/spans.rs:11:2: 11:2
+        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _2 = &_1;                        // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _0 = _1;                         // scope 1 at $DIR/spans.rs:15:5: 15:7
+        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:11:13: 11:14
+        return;                          // scope 0 at $DIR/spans.rs:12:2: 12:2
     }
 }
diff --git a/tests/mir-opt/pre-codegen/spans.rs b/tests/mir-opt/pre-codegen/spans.rs
index 295eb0476db..aa36648ce39 100644
--- a/tests/mir-opt/pre-codegen/spans.rs
+++ b/tests/mir-opt/pre-codegen/spans.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that the comments we emit in MIR opts are accurate.
 //
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/pre-codegen/try_identity.rs b/tests/mir-opt/pre-codegen/try_identity.rs
index a227c82d6a3..b6e4eaad7e1 100644
--- a/tests/mir-opt/pre-codegen/try_identity.rs
+++ b/tests/mir-opt/pre-codegen/try_identity.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 
diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs
index 610660131b1..36134e019ad 100644
--- a/tests/mir-opt/reference_prop.rs
+++ b/tests/mir-opt/reference_prop.rs
@@ -8,16 +8,31 @@
 fn opaque(_: impl Sized) {}
 
 fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
+    // CHECK-LABEL: fn reference_propagation(
+
     // Propagation through a reference.
     {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 5_usize;
         let b = &a; // This borrow is only used once.
         let c = *b; // This should be optimized.
         opaque(()); // We use opaque to separate cases into basic blocks in the MIR.
     }
 
-    // Propagation through a two references.
+    // Propagation through two references.
     {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[btmp:_.*]] = &[[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let a2 = 7_usize;
         let mut b = &a;
@@ -29,6 +44,12 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation through a borrowed reference.
     {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &a;
         let d = &b;
@@ -36,8 +57,14 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &a;
         let d = &raw mut b;
@@ -47,6 +74,11 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation through an escaping borrow.
     {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 7_usize;
         let b = &a;
         let c = *b;
@@ -55,6 +87,14 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation through a transitively escaping borrow.
     {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &[[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+        // CHECK: [[b2:_.*]] = [[b1]];
+        // CHECK: [[c2:_.*]] = [[a]];
+        // CHECK: [[b3:_.*]] = [[b2]];
+
         let a = 7_usize;
         let b1 = &a;
         let c = *b1;
@@ -68,6 +108,10 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation a reborrow of an argument.
     {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &*single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -75,6 +119,12 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation a reborrow of a mutated argument.
     {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &(*_2);
+        // CHECK: [[tmp:_.*]] = &(*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &*multiple;
         multiple = &*single;
         let b = *a; // This should not be optimized.
@@ -83,6 +133,13 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Fixed-point propagation through a borrowed reference.
     {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -90,8 +147,15 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
         opaque(());
     }
 
-    // Fixed-point propagation through a borrowed reference.
+    // Fixed-point propagation through a mutably borrowed reference.
     {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -101,16 +165,31 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 }
 
 fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a mut T) {
+    // CHECK-LABEL: fn reference_propagation_mut(
+
     // Propagation through a reference.
     {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let mut a = 5_usize;
         let b = &mut a; // This borrow is only used once.
         let c = *b; // This should be optimized.
         opaque(());
     }
 
-    // Propagation through a two references.
+    // Propagation through two references.
     {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[btmp:_.*]] = &mut [[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut a2 = 7_usize;
         let mut b = &mut a;
@@ -122,6 +201,12 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation through a borrowed reference.
     {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &mut a;
         let d = &b;
@@ -129,8 +214,14 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &mut a;
         let d = &raw mut b;
@@ -140,6 +231,11 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation through an escaping borrow.
     {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 7_usize;
         let b = &mut a;
         let c = *b;
@@ -148,6 +244,14 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation through a transitively escaping borrow.
     {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b1]]);
+        // CHECK: [[b2:_.*]] = move [[b1]];
+        // CHECK: [[c2:_.*]] = (*[[b2]]);
+        // CHECK: [[b3:_.*]] = move [[b2]];
+
         let mut a = 7_usize;
         let b1 = &mut a;
         let c = *b1;
@@ -161,6 +265,10 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation a reborrow of an argument.
     {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &mut *single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -168,6 +276,12 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation a reborrow of a mutated argument.
     {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &mut (*_2);
+        // CHECK: [[tmp:_.*]] = &mut (*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &mut *multiple;
         multiple = &mut *single;
         let b = *a; // This should not be optimized.
@@ -176,6 +290,13 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Fixed-point propagation through a borrowed reference.
     {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &mut a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -183,8 +304,15 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
         opaque(());
     }
 
-    // Fixed-point propagation through a borrowed reference.
+    // Fixed-point propagation through a mutably borrowed reference.
     {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &mut a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -194,16 +322,31 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 }
 
 fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *const T) {
+    // CHECK-LABEL: fn reference_propagation_const_ptr(
+
     // Propagation through a reference.
     unsafe {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 5_usize;
         let b = &raw const a; // This borrow is only used once.
         let c = *b; // This should be optimized.
         opaque(());
     }
 
-    // Propagation through a two references.
+    // Propagation through two references.
     unsafe {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[btmp:_.*]] = &raw const [[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let a2 = 7_usize;
         let mut b = &raw const a;
@@ -215,6 +358,12 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &raw const a;
         let d = &b;
@@ -222,8 +371,14 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     unsafe {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &raw const a;
         let d = &raw mut b;
@@ -233,6 +388,11 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through an escaping borrow.
     unsafe {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 7_usize;
         let b = &raw const a;
         let c = *b;
@@ -241,6 +401,14 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through a transitively escaping borrow.
     unsafe {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+        // CHECK: [[b2:_.*]] = [[b1]];
+        // CHECK: [[c2:_.*]] = [[a]];
+        // CHECK: [[b3:_.*]] = [[b2]];
+
         let a = 7_usize;
         let b1 = &raw const a;
         let c = *b1;
@@ -254,6 +422,10 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation a reborrow of an argument.
     unsafe {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &raw const *single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -261,6 +433,12 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation a reborrow of a mutated argument.
     unsafe {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &raw const (*_2);
+        // CHECK: [[tmp:_.*]] = &raw const (*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &raw const *multiple;
         multiple = &raw const *single;
         let b = *a; // This should not be optimized.
@@ -269,6 +447,12 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through a reborrow.
     unsafe {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 13_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 13_usize;
         let b = &raw const a;
         let c = &raw const *b;
@@ -278,6 +462,13 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Fixed-point propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &raw const a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -287,6 +478,13 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Fixed-point propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb10: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &raw const a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -296,16 +494,31 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 }
 
 fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T) {
+    // CHECK-LABEL: fn reference_propagation_mut_ptr(
+
     // Propagation through a reference.
     unsafe {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let mut a = 5_usize;
         let b = &raw mut a; // This borrow is only used once.
         let c = *b; // This should be optimized.
         opaque(());
     }
 
-    // Propagation through a two references.
+    // Propagation through two references.
     unsafe {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[btmp:_.*]] = &raw mut [[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut a2 = 7_usize;
         let mut b = &raw mut a;
@@ -317,6 +530,12 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &raw mut a;
         let d = &b;
@@ -324,8 +543,14 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     unsafe {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &raw mut a;
         let d = &raw mut b;
@@ -335,6 +560,11 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation through an escaping borrow.
     unsafe {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 7_usize;
         let b = &raw mut a;
         let c = *b;
@@ -343,6 +573,14 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation through a transitively escaping borrow.
     unsafe {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &raw mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b1]]);
+        // CHECK: [[b2:_.*]] = [[b1]];
+        // CHECK: [[c2:_.*]] = (*[[b2]]);
+        // CHECK: [[b3:_.*]] = [[b2]];
+
         let mut a = 7_usize;
         let b1 = &raw mut a;
         let c = *b1;
@@ -356,6 +594,10 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation a reborrow of an argument.
     unsafe {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &raw mut *single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -363,6 +605,12 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation a reborrow of a mutated argument.
     unsafe {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &raw mut (*_2);
+        // CHECK: [[tmp:_.*]] = &raw mut (*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &raw mut *multiple;
         multiple = &raw mut *single;
         let b = *a; // This should not be optimized.
@@ -371,6 +619,13 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Fixed-point propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &raw mut a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -378,8 +633,15 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
         opaque(());
     }
 
-    // Fixed-point propagation through a borrowed reference.
+    // Fixed-point propagation through a mutably borrowed reference.
     unsafe {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &raw mut a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -390,8 +652,13 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn read_through_raw(x: &mut usize) -> usize {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: read_through_raw
+    // CHECK: bb0: {
+    // CHECK-NEXT: _0 = (*_1);
+    // CHECK-NEXT: _0 = (*_1);
+    // CHECK-NEXT: return;
 
+    use std::intrinsics::mir::*;
     mir!(
         let r1: &mut usize;
         let r2: &mut usize;
@@ -413,8 +680,10 @@ fn read_through_raw(x: &mut usize) -> usize {
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn multiple_storage() {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: multiple_storage
+    // CHECK: _3 = (*_2);
 
+    use std::intrinsics::mir::*;
     mir!(
         let x: i32;
         {
@@ -437,8 +706,10 @@ fn multiple_storage() {
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn dominate_storage() {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: dominate_storage
+    // CHECK: _5 = (*_2);
 
+    use std::intrinsics::mir::*;
     mir!(
         let x: i32;
         let r: &i32;
@@ -465,8 +736,10 @@ fn dominate_storage() {
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn maybe_dead(m: bool) {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: fn maybe_dead(
+    // CHECK: (*_5) = const 7_i32;
 
+    use std::intrinsics::mir::*;
     mir!(
         let x: i32;
         let y: i32;
@@ -506,6 +779,9 @@ fn maybe_dead(m: bool) {
 }
 
 fn mut_raw_then_mut_shr() -> (i32, i32) {
+    // CHECK-LABEL: fn mut_raw_then_mut_shr(
+    // CHECK-NOT: (*{{_.*}})
+
     let mut x = 2;
     let xref = &mut x;
     let xraw = &mut *xref as *mut _;
@@ -517,6 +793,18 @@ fn mut_raw_then_mut_shr() -> (i32, i32) {
 }
 
 fn unique_with_copies() {
+    // CHECK-LABEL: fn unique_with_copies(
+    // CHECK: [[a:_.*]] = const 0_i32;
+    // CHECK: [[x:_.*]] = &raw mut [[a]];
+    // CHECK-NOT: [[a]]
+    // CHECK: [[tmp:_.*]] = (*[[x]]);
+    // CHECK-NEXT: opaque::<i32>(move [[tmp]])
+    // CHECK-NOT: [[a]]
+    // CHECK: StorageDead([[a]]);
+    // CHECK-NOT: [[a]]
+    // CHECK: [[tmp:_.*]] = (*[[x]]);
+    // CHECK-NEXT: opaque::<i32>(move [[tmp]])
+
     let y = {
         let mut a = 0;
         let x = &raw mut a;
@@ -529,6 +817,17 @@ fn unique_with_copies() {
 }
 
 fn debuginfo() {
+    // CHECK-LABEL: fn debuginfo(
+    // FIXME: This features waits for DWARF implicit pointers in LLVM.
+    // CHECK: debug ref_mut_u8 => _{{.*}};
+    // CHECK: debug field => _{{.*}};
+    // CHECK: debug reborrow => _{{.*}};
+    // CHECK: debug variant_field => _{{.*}};
+    // CHECK: debug constant_index => _{{.*}};
+    // CHECK: debug subslice => _{{.*}};
+    // CHECK: debug constant_index_from_end => _{{.*}};
+    // CHECK: debug multiple_borrow => _{{.*}};
+
     struct T(u8);
 
     let ref_mut_u8 = &mut 5_u8;
@@ -551,6 +850,10 @@ fn debuginfo() {
 }
 
 fn many_debuginfo() {
+    // CHECK-LABEL: fn many_debuginfo(
+    // FIXME: This features waits for DWARF implicit pointers in LLVM.
+    // CHECK: debug many_borrow => _{{.*}};
+
     let a = 0;
 
     // Verify that we do not ICE on deeply nested borrows.
diff --git a/tests/mir-opt/remove_fake_borrows.rs b/tests/mir-opt/remove_fake_borrows.rs
index f0ee98f777c..21c7b46ee1a 100644
--- a/tests/mir-opt/remove_fake_borrows.rs
+++ b/tests/mir-opt/remove_fake_borrows.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that the fake borrows for matches are removed after borrow checking.
 
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/remove_never_const.rs b/tests/mir-opt/remove_never_const.rs
index 160cc955534..c144edaffaf 100644
--- a/tests/mir-opt/remove_never_const.rs
+++ b/tests/mir-opt/remove_never_const.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This was originally a regression test for #66975 - ensure that we do not generate never typed
 // consts in codegen. We also have tests for this that catches the error, see
 // tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs.
diff --git a/tests/mir-opt/remove_storage_markers.rs b/tests/mir-opt/remove_storage_markers.rs
index 330264461d7..6666ff3b726 100644
--- a/tests/mir-opt/remove_storage_markers.rs
+++ b/tests/mir-opt/remove_storage_markers.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: RemoveStorageMarkers
 
diff --git a/tests/mir-opt/remove_unneeded_drops.rs b/tests/mir-opt/remove_unneeded_drops.rs
index 178d0924c5e..cad79e0aa0c 100644
--- a/tests/mir-opt/remove_unneeded_drops.rs
+++ b/tests/mir-opt/remove_unneeded_drops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR remove_unneeded_drops.opt.RemoveUnneededDrops.diff
 fn opt(x: bool) {
diff --git a/tests/mir-opt/remove_zsts.rs b/tests/mir-opt/remove_zsts.rs
index 1cf7ad6e366..e33a272fe16 100644
--- a/tests/mir-opt/remove_zsts.rs
+++ b/tests/mir-opt/remove_zsts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 union Foo {
     x: (),
     y: u64,
diff --git a/tests/mir-opt/retag.rs b/tests/mir-opt/retag.rs
index e0696de4df3..1e4b017dad5 100644
--- a/tests/mir-opt/retag.rs
+++ b/tests/mir-opt/retag.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: AddRetag
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // ignore-tidy-linelength
diff --git a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir
index d7247744074..285db435f5a 100644
--- a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &mut i32;
diff --git a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
index d7247744074..285db435f5a 100644
--- a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &mut i32;
diff --git a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir
index de3eb0d52cf..9ad607b2fe2 100644
--- a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo_shr` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo_shr` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &i32;
diff --git a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
index de3eb0d52cf..9ad607b2fe2 100644
--- a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo_shr` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo_shr` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &i32;
diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs
index bea3c317c89..09146a824fc 100644
--- a/tests/mir-opt/return_an_array.rs
+++ b/tests/mir-opt/return_an_array.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // this tests move up progration, which is not yet implemented
 
 fn foo() -> [u8; 1024] {
diff --git a/tests/mir-opt/separate_const_switch.rs b/tests/mir-opt/separate_const_switch.rs
index d333d4b6be2..3f43cdf4350 100644
--- a/tests/mir-opt/separate_const_switch.rs
+++ b/tests/mir-opt/separate_const_switch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(control_flow_enum)]
 #![feature(try_trait_v2)]
 
diff --git a/tests/mir-opt/simplify_arm.rs b/tests/mir-opt/simplify_arm.rs
index 4c471ce0468..e933cb987d8 100644
--- a/tests/mir-opt/simplify_arm.rs
+++ b/tests/mir-opt/simplify_arm.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
 // EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff
 // EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff
diff --git a/tests/mir-opt/simplify_arm_identity.rs b/tests/mir-opt/simplify_arm_identity.rs
index e122cd50e00..1b546c3938e 100644
--- a/tests/mir-opt/simplify_arm_identity.rs
+++ b/tests/mir-opt/simplify_arm_identity.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Checks that `SimplifyArmIdentity` is not applied if enums have incompatible layouts.
 // Regression test for issue #66856.
 //
diff --git a/tests/mir-opt/simplify_cfg.rs b/tests/mir-opt/simplify_cfg.rs
index cf7eac4403a..a87aaca544c 100644
--- a/tests/mir-opt/simplify_cfg.rs
+++ b/tests/mir-opt/simplify_cfg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that the goto chain starting from bb0 is collapsed.
 // compile-flags: -Cpanic=abort
 // no-prefer-dynamic
diff --git a/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs b/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs
index e2578407fea..5c4277898cd 100644
--- a/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs
+++ b/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 #![crate_type = "lib"]
 
diff --git a/tests/mir-opt/simplify_if.rs b/tests/mir-opt/simplify_if.rs
index fff23b3ce7f..19b5806f720 100644
--- a/tests/mir-opt/simplify_if.rs
+++ b/tests/mir-opt/simplify_if.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #[inline(never)]
 fn noop() {}
diff --git a/tests/mir-opt/simplify_locals.rs b/tests/mir-opt/simplify_locals.rs
index 7bbc0481c68..d4052e521de 100644
--- a/tests/mir-opt/simplify_locals.rs
+++ b/tests/mir-opt/simplify_locals.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: SimplifyLocals-before-const-prop
 
 
diff --git a/tests/mir-opt/simplify_locals_fixedpoint.rs b/tests/mir-opt/simplify_locals_fixedpoint.rs
index 4da18b7fe58..b0c6e2d8eb5 100644
--- a/tests/mir-opt/simplify_locals_fixedpoint.rs
+++ b/tests/mir-opt/simplify_locals_fixedpoint.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zmir-opt-level=1
 
diff --git a/tests/mir-opt/simplify_locals_removes_unused_consts.rs b/tests/mir-opt/simplify_locals_removes_unused_consts.rs
index 1e404c3a48c..42879254d71 100644
--- a/tests/mir-opt/simplify_locals_removes_unused_consts.rs
+++ b/tests/mir-opt/simplify_locals_removes_unused_consts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: SimplifyLocals-before-const-prop
 // compile-flags: -C overflow-checks=no
diff --git a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
index de65857412c..615b972209c 100644
--- a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
+++ b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: SimplifyLocals-before-const-prop
 
 fn map(x: Option<Box<()>>) -> Option<Box<()>> {
diff --git a/tests/mir-opt/simplify_match.rs b/tests/mir-opt/simplify_match.rs
index 5d8e94b0935..eb385005cd9 100644
--- a/tests/mir-opt/simplify_match.rs
+++ b/tests/mir-opt/simplify_match.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #[inline(never)]
 fn noop() {}
diff --git a/tests/mir-opt/simplify_try_if_let.rs b/tests/mir-opt/simplify_try_if_let.rs
index fba67de4033..3a59d78500c 100644
--- a/tests/mir-opt/simplify_try_if_let.rs
+++ b/tests/mir-opt/simplify_try_if_let.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts
 // ignore-test
 // FIXME: the pass is unsound and causes ICEs in the MIR validator
diff --git a/tests/mir-opt/slice_drop_shim.rs b/tests/mir-opt/slice_drop_shim.rs
index 344c1af2c91..cac0a349128 100644
--- a/tests/mir-opt/slice_drop_shim.rs
+++ b/tests/mir-opt/slice_drop_shim.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=0
 
 
diff --git a/tests/mir-opt/spanview_block.main.built.after.html b/tests/mir-opt/spanview_block.main.built.after.html
index 56f4e4f9370..54ef00f56f3 100644
--- a/tests/mir-opt/spanview_block.main.built.after.html
+++ b/tests/mir-opt/spanview_block.main.built.after.html
@@ -60,8 +60,8 @@
 </style>
 </head>
 <body>
-<div class="code" style="counter-reset: line 4"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0: $DIR/spanview_block.rs:5:11: 5:13:
-    5:11-5:13: Assign: _0 = const ()
-    5:13-5:13: Return: return"><span class="annotation">0⦊</span>{}<span class="annotation">⦉0</span></span></span></span></div>
+<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0: $DIR/spanview_block.rs:6:11: 6:13:
+    6:11-6:13: Assign: _0 = const ()
+    6:13-6:13: Return: return"><span class="annotation">0⦊</span>{}<span class="annotation">⦉0</span></span></span></span></div>
 </body>
 </html>
diff --git a/tests/mir-opt/spanview_block.rs b/tests/mir-opt/spanview_block.rs
index 0ecf35ad6a2..e8bc3d16348 100644
--- a/tests/mir-opt/spanview_block.rs
+++ b/tests/mir-opt/spanview_block.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test spanview block output
 // compile-flags: -Z dump-mir-spanview=block
 
diff --git a/tests/mir-opt/spanview_statement.main.built.after.html b/tests/mir-opt/spanview_statement.main.built.after.html
index 91af08d80a8..5e782b05f3b 100644
--- a/tests/mir-opt/spanview_statement.main.built.after.html
+++ b/tests/mir-opt/spanview_statement.main.built.after.html
@@ -60,8 +60,8 @@
 </style>
 </head>
 <body>
-<div class="code" style="counter-reset: line 4"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0[0]: $DIR/spanview_statement.rs:5:11: 5:13:
-    5:11-5:13: Assign: _0 = const ()"><span class="annotation">0[0]⦊</span>{}<span class="annotation">⦉0[0]</span></span></span><span><span class="code odd" style="--layer: 1" title="0:Return: $DIR/spanview_statement.rs:5:13: 5:13:
-    5:13-5:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
+<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0[0]: $DIR/spanview_statement.rs:6:11: 6:13:
+    6:11-6:13: Assign: _0 = const ()"><span class="annotation">0[0]⦊</span>{}<span class="annotation">⦉0[0]</span></span></span><span><span class="code odd" style="--layer: 1" title="0:Return: $DIR/spanview_statement.rs:6:13: 6:13:
+    6:13-6:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
 </body>
 </html>
diff --git a/tests/mir-opt/spanview_statement.rs b/tests/mir-opt/spanview_statement.rs
index 457052617b7..d547e6cb1e0 100644
--- a/tests/mir-opt/spanview_statement.rs
+++ b/tests/mir-opt/spanview_statement.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test spanview output (the default value for `-Z dump-mir-spanview` is "statement")
 // compile-flags: -Z dump-mir-spanview
 
diff --git a/tests/mir-opt/spanview_terminator.main.built.after.html b/tests/mir-opt/spanview_terminator.main.built.after.html
index 1f42faedd1e..2a651489e23 100644
--- a/tests/mir-opt/spanview_terminator.main.built.after.html
+++ b/tests/mir-opt/spanview_terminator.main.built.after.html
@@ -60,7 +60,7 @@
 </style>
 </head>
 <body>
-<div class="code" style="counter-reset: line 4"><span class="line"><span class="code" style="--layer: 0">fn main() {}</span><span><span class="code even" style="--layer: 1" title="0:Return: $DIR/spanview_terminator.rs:5:13: 5:13:
-    5:13-5:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
+<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() {}</span><span><span class="code even" style="--layer: 1" title="0:Return: $DIR/spanview_terminator.rs:6:13: 6:13:
+    6:13-6:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
 </body>
 </html>
diff --git a/tests/mir-opt/spanview_terminator.rs b/tests/mir-opt/spanview_terminator.rs
index 76fced188f1..a2c68b98ef5 100644
--- a/tests/mir-opt/spanview_terminator.rs
+++ b/tests/mir-opt/spanview_terminator.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test spanview terminator output
 // compile-flags: -Z dump-mir-spanview=terminator
 
diff --git a/tests/mir-opt/sroa/lifetimes.rs b/tests/mir-opt/sroa/lifetimes.rs
index 2356d212f3f..cc5c0c9bbcd 100644
--- a/tests/mir-opt/sroa/lifetimes.rs
+++ b/tests/mir-opt/sroa/lifetimes.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ScalarReplacementOfAggregates
 // compile-flags: -Cpanic=abort
 // no-prefer-dynamic
diff --git a/tests/mir-opt/sroa/structs.rs b/tests/mir-opt/sroa/structs.rs
index 7946eeaeae4..73563e12c94 100644
--- a/tests/mir-opt/sroa/structs.rs
+++ b/tests/mir-opt/sroa/structs.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ScalarReplacementOfAggregates
 // compile-flags: -Cpanic=abort
 // no-prefer-dynamic
diff --git a/tests/mir-opt/ssa_unreachable_116212.rs b/tests/mir-opt/ssa_unreachable_116212.rs
index f588665876c..9f1cf223e26 100644
--- a/tests/mir-opt/ssa_unreachable_116212.rs
+++ b/tests/mir-opt/ssa_unreachable_116212.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Regression test for issue #116212.
 
 #![feature(never_type)]
diff --git a/tests/mir-opt/storage_ranges.main.nll.0.mir b/tests/mir-opt/storage_ranges.main.nll.0.mir
index 13732daa7ad..782efd5acc6 100644
--- a/tests/mir-opt/storage_ranges.main.nll.0.mir
+++ b/tests/mir-opt/storage_ranges.main.nll.0.mir
@@ -15,7 +15,7 @@
 | '?1 live at {bb0[0..=22]}
 | '?2 live at {bb0[10]}
 | '?3 live at {bb0[11]}
-| '?2: '?3 due to Assignment at Single(bb0[10]) ($DIR/storage_ranges.rs:6:17: 6:25 (#0)
+| '?2: '?3 due to Assignment at Single(bb0[10]) ($DIR/storage_ranges.rs:7:17: 7:25 (#0)
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/storage_ranges.rs b/tests/mir-opt/storage_ranges.rs
index 996051a2941..5a68d568465 100644
--- a/tests/mir-opt/storage_ranges.rs
+++ b/tests/mir-opt/storage_ranges.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR storage_ranges.main.nll.0.mir
 
 fn main() {
diff --git a/tests/mir-opt/switch_to_self.rs b/tests/mir-opt/switch_to_self.rs
index 6678e4b3bd2..fc270fd33cf 100644
--- a/tests/mir-opt/switch_to_self.rs
+++ b/tests/mir-opt/switch_to_self.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that MatchBranchSimplification doesn't ICE on a SwitchInt where
 // one of the targets is the block that the SwitchInt terminates.
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/tls_access.rs b/tests/mir-opt/tls_access.rs
index 19344c86862..450dd9b4730 100644
--- a/tests/mir-opt/tls_access.rs
+++ b/tests/mir-opt/tls_access.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR tls_access.main.PreCodegen.after.mir
 // compile-flags: -Zmir-opt-level=0
 
diff --git a/tests/mir-opt/uninhabited_enum.rs b/tests/mir-opt/uninhabited_enum.rs
index 19db548157a..8816f31f9df 100644
--- a/tests/mir-opt/uninhabited_enum.rs
+++ b/tests/mir-opt/uninhabited_enum.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(never_type)]
 
 pub enum Void {}
diff --git a/tests/mir-opt/uninhabited_enum_branching.rs b/tests/mir-opt/uninhabited_enum_branching.rs
index 0ef604c3088..96ae84eca50 100644
--- a/tests/mir-opt/uninhabited_enum_branching.rs
+++ b/tests/mir-opt/uninhabited_enum_branching.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 enum Empty { }
 
 // test matching an enum with uninhabited variants
diff --git a/tests/mir-opt/uninhabited_enum_branching2.rs b/tests/mir-opt/uninhabited_enum_branching2.rs
index e22e94314d9..751f2ae01f8 100644
--- a/tests/mir-opt/uninhabited_enum_branching2.rs
+++ b/tests/mir-opt/uninhabited_enum_branching2.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 enum Empty { }
 
 // test matching an enum with uninhabited variants
diff --git a/tests/mir-opt/uninhabited_fallthrough_elimination.rs b/tests/mir-opt/uninhabited_fallthrough_elimination.rs
index 0853883f8b8..7dd41aea5ed 100644
--- a/tests/mir-opt/uninhabited_fallthrough_elimination.rs
+++ b/tests/mir-opt/uninhabited_fallthrough_elimination.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 enum Empty {}
 
 enum S {
diff --git a/tests/mir-opt/unreachable.rs b/tests/mir-opt/unreachable.rs
index 23fad4737fe..5c0df09b752 100644
--- a/tests/mir-opt/unreachable.rs
+++ b/tests/mir-opt/unreachable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 enum Empty {}
 
diff --git a/tests/mir-opt/unreachable_diverging.rs b/tests/mir-opt/unreachable_diverging.rs
index b7d308b8630..3713bcaea16 100644
--- a/tests/mir-opt/unreachable_diverging.rs
+++ b/tests/mir-opt/unreachable_diverging.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 pub enum Empty {}
 
diff --git a/tests/mir-opt/unusual_item_types.rs b/tests/mir-opt/unusual_item_types.rs
index 6dad636416f..49b663b4f82 100644
--- a/tests/mir-opt/unusual_item_types.rs
+++ b/tests/mir-opt/unusual_item_types.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that we don't ICE when trying to dump MIR for unusual item types and
 // that we don't create filenames containing `<` and `>`
 // compile-flags: -Zmir-opt-level=0
diff --git a/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir b/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
index e2edbfcd4fa..a5121ae550d 100644
--- a/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
+++ b/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/unusual_item_types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` after built
+// MIR for `<impl at $DIR/unusual_item_types.rs:10:1: 10:7>::ASSOCIATED_CONSTANT` after built
 
-const <impl at $DIR/unusual_item_types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
+const <impl at $DIR/unusual_item_types.rs:10:1: 10:7>::ASSOCIATED_CONSTANT: i32 = {
     let mut _0: i32;
 
     bb0: {
diff --git a/tests/mir-opt/while_storage.rs b/tests/mir-opt/while_storage.rs
index d4fb54da575..3a3d451ee8d 100644
--- a/tests/mir-opt/while_storage.rs
+++ b/tests/mir-opt/while_storage.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Test that we correctly generate StorageDead statements for while loop
 // conditions on all branches