about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/aarch64-struct-align-128.rs14
-rw-r--r--tests/codegen/abi-efiapi.rs24
-rw-r--r--tests/codegen/abi-main-signature-16bit-c-int.rs6
-rw-r--r--tests/codegen/abi-main-signature-32bit-c-int.rs4
-rw-r--r--tests/codegen/abi-repr-ext.rs36
-rw-r--r--tests/codegen/abi-sysv64.rs4
-rw-r--r--tests/codegen/abi-x86-interrupt.rs4
-rw-r--r--tests/codegen/abi-x86_64_sysv.rs4
-rw-r--r--tests/codegen/addr-of-mutate.rs2
-rw-r--r--tests/codegen/adjustments.rs2
-rw-r--r--tests/codegen/align-byval-vector.rs10
-rw-r--r--tests/codegen/align-byval.rs28
-rw-r--r--tests/codegen/align-enum.rs2
-rw-r--r--tests/codegen/align-fn.rs2
-rw-r--r--tests/codegen/align-offset.rs4
-rw-r--r--tests/codegen/align-struct.rs2
-rw-r--r--tests/codegen/alloc-optimisation.rs2
-rw-r--r--tests/codegen/array-clone.rs2
-rw-r--r--tests/codegen/array-codegen.rs2
-rw-r--r--tests/codegen/array-equality.rs4
-rw-r--r--tests/codegen/array-map.rs6
-rw-r--r--tests/codegen/array-optimized.rs2
-rw-r--r--tests/codegen/ascii-char.rs4
-rw-r--r--tests/codegen/asm-clobber_abi.rs4
-rw-r--r--tests/codegen/asm-clobbers.rs4
-rw-r--r--tests/codegen/asm-may_unwind.rs4
-rw-r--r--tests/codegen/asm-maybe-uninit.rs4
-rw-r--r--tests/codegen/asm-multiple-options.rs4
-rw-r--r--tests/codegen/asm-options.rs4
-rw-r--r--tests/codegen/asm-powerpc-clobbers.rs14
-rw-r--r--tests/codegen/asm-sanitize-llvm.rs4
-rw-r--r--tests/codegen/asm-target-clobbers.rs6
-rw-r--r--tests/codegen/async-closure-debug.rs4
-rw-r--r--tests/codegen/async-fn-debug-awaitee-field.rs2
-rw-r--r--tests/codegen/async-fn-debug-msvc.rs4
-rw-r--r--tests/codegen/async-fn-debug.rs4
-rw-r--r--tests/codegen/atomic-operations.rs2
-rw-r--r--tests/codegen/autovectorize-f32x4.rs4
-rw-r--r--tests/codegen/avr/avr-func-addrspace.rs4
-rw-r--r--tests/codegen/binary-search-index-no-bound-check.rs4
-rw-r--r--tests/codegen/bool-cmp.rs2
-rw-r--r--tests/codegen/box-uninit-bytes.rs2
-rw-r--r--tests/codegen/bpf-alu32.rs2
-rw-r--r--tests/codegen/branch-protection.rs14
-rw-r--r--tests/codegen/call-llvm-intrinsics.rs6
-rw-r--r--tests/codegen/call-metadata.rs2
-rw-r--r--tests/codegen/catch-unwind.rs8
-rw-r--r--tests/codegen/cdylib-external-inline-fns.rs2
-rw-r--r--tests/codegen/cf-protection.rs16
-rw-r--r--tests/codegen/cffi/c-variadic-opt.rs2
-rw-r--r--tests/codegen/cffi/c-variadic.rs4
-rw-r--r--tests/codegen/cffi/ffi-const.rs2
-rw-r--r--tests/codegen/cffi/ffi-out-of-bounds-loads.rs6
-rw-r--r--tests/codegen/cffi/ffi-pure.rs2
-rw-r--r--tests/codegen/cfguard-checks.rs4
-rw-r--r--tests/codegen/cfguard-disabled.rs4
-rw-r--r--tests/codegen/cfguard-nochecks.rs4
-rw-r--r--tests/codegen/cfguard-non-msvc.rs4
-rw-r--r--tests/codegen/char-ascii-branchless.rs2
-rw-r--r--tests/codegen/codemodels.rs14
-rw-r--r--tests/codegen/coercions.rs2
-rw-r--r--tests/codegen/cold-call-declare-and-call.rs10
-rw-r--r--tests/codegen/comparison-operators-2-tuple.rs4
-rw-r--r--tests/codegen/comparison-operators-newtype.rs2
-rw-r--r--tests/codegen/const_scalar_pair.rs2
-rw-r--r--tests/codegen/consts.rs2
-rw-r--r--tests/codegen/coroutine-debug-msvc.rs4
-rw-r--r--tests/codegen/coroutine-debug.rs4
-rw-r--r--tests/codegen/cross-crate-inlining/always-inline.rs4
-rw-r--r--tests/codegen/cross-crate-inlining/auxiliary/always.rs2
-rw-r--r--tests/codegen/cross-crate-inlining/auxiliary/leaf.rs2
-rw-r--r--tests/codegen/cross-crate-inlining/auxiliary/never.rs2
-rw-r--r--tests/codegen/cross-crate-inlining/leaf-inlining.rs4
-rw-r--r--tests/codegen/cross-crate-inlining/never-inline.rs4
-rw-r--r--tests/codegen/dealloc-no-unwind.rs2
-rw-r--r--tests/codegen/debug-accessibility/crate-enum.rs2
-rw-r--r--tests/codegen/debug-accessibility/crate-struct.rs2
-rw-r--r--tests/codegen/debug-accessibility/private-enum.rs2
-rw-r--r--tests/codegen/debug-accessibility/private-struct.rs2
-rw-r--r--tests/codegen/debug-accessibility/public-enum.rs2
-rw-r--r--tests/codegen/debug-accessibility/public-struct.rs2
-rw-r--r--tests/codegen/debug-accessibility/struct-fields.rs2
-rw-r--r--tests/codegen/debug-accessibility/super-enum.rs2
-rw-r--r--tests/codegen/debug-accessibility/super-struct.rs2
-rw-r--r--tests/codegen/debug-accessibility/tuple-fields.rs2
-rw-r--r--tests/codegen/debug-alignment.rs2
-rw-r--r--tests/codegen/debug-column-msvc.rs4
-rw-r--r--tests/codegen/debug-column.rs4
-rw-r--r--tests/codegen/debug-compile-unit-path.rs2
-rw-r--r--tests/codegen/debug-fndef-size.rs4
-rw-r--r--tests/codegen/debug-limited.rs2
-rw-r--r--tests/codegen/debug-line-directives-only.rs2
-rw-r--r--tests/codegen/debug-line-tables-only.rs2
-rw-r--r--tests/codegen/debug-linkage-name.rs4
-rw-r--r--tests/codegen/debug-vtable.rs2
-rw-r--r--tests/codegen/debuginfo-constant-locals.rs2
-rw-r--r--tests/codegen/debuginfo-generic-closure-env-names.rs2
-rw-r--r--tests/codegen/debuginfo-inline-callsite-location.rs2
-rw-r--r--tests/codegen/deduced-param-attrs.rs2
-rw-r--r--tests/codegen/default-hidden-visibility.rs8
-rw-r--r--tests/codegen/default-requires-uwtable.rs12
-rw-r--r--tests/codegen/direct-access-external-data.rs10
-rw-r--r--tests/codegen/dllimports/auxiliary/dummy.rs2
-rw-r--r--tests/codegen/dllimports/auxiliary/wrapper.rs2
-rw-r--r--tests/codegen/dllimports/main.rs8
-rw-r--r--tests/codegen/drop-in-place-noalias.rs2
-rw-r--r--tests/codegen/drop.rs6
-rw-r--r--tests/codegen/dst-vtable-align-nonzero.rs2
-rw-r--r--tests/codegen/dst-vtable-size-range.rs2
-rw-r--r--tests/codegen/ehcontguard_disabled.rs2
-rw-r--r--tests/codegen/ehcontguard_enabled.rs2
-rw-r--r--tests/codegen/enable-lto-unit-splitting.rs2
-rw-r--r--tests/codegen/enum/enum-bounds-check-derived-idx.rs2
-rw-r--r--tests/codegen/enum/enum-bounds-check-issue-13926.rs2
-rw-r--r--tests/codegen/enum/enum-bounds-check-issue-82871.rs2
-rw-r--r--tests/codegen/enum/enum-bounds-check.rs2
-rw-r--r--tests/codegen/enum/enum-debug-clike.rs4
-rw-r--r--tests/codegen/enum/enum-debug-niche-2.rs4
-rw-r--r--tests/codegen/enum/enum-debug-niche.rs4
-rw-r--r--tests/codegen/enum/enum-debug-tagged.rs4
-rw-r--r--tests/codegen/enum/enum-discriminant-value.rs2
-rw-r--r--tests/codegen/enum/enum-match.rs4
-rw-r--r--tests/codegen/enum/enum-u128.rs4
-rw-r--r--tests/codegen/export-no-mangle.rs2
-rw-r--r--tests/codegen/external-no-mangle-fns.rs2
-rw-r--r--tests/codegen/external-no-mangle-statics.rs10
-rw-r--r--tests/codegen/fastcall-inreg.rs4
-rw-r--r--tests/codegen/fatptr.rs2
-rw-r--r--tests/codegen/fewer-names.rs8
-rw-r--r--tests/codegen/float_math.rs2
-rw-r--r--tests/codegen/fn-impl-trait-self.rs2
-rw-r--r--tests/codegen/force-frame-pointers.rs2
-rw-r--r--tests/codegen/force-no-unwind-tables.rs4
-rw-r--r--tests/codegen/force-unwind-tables.rs2
-rw-r--r--tests/codegen/frame-pointer.rs24
-rw-r--r--tests/codegen/function-arguments-noopt.rs2
-rw-r--r--tests/codegen/function-arguments.rs2
-rw-r--r--tests/codegen/function-return.rs14
-rw-r--r--tests/codegen/gdb_debug_script_load.rs10
-rw-r--r--tests/codegen/generic-debug.rs4
-rw-r--r--tests/codegen/global_asm.rs8
-rw-r--r--tests/codegen/global_asm_include.rs8
-rw-r--r--tests/codegen/global_asm_x2.rs8
-rw-r--r--tests/codegen/i128-x86-align.rs4
-rw-r--r--tests/codegen/infallible-unwrap-in-opt-z.rs4
-rw-r--r--tests/codegen/inherit_overflow.rs8
-rw-r--r--tests/codegen/inline-always-works-always.rs8
-rw-r--r--tests/codegen/inline-debuginfo.rs2
-rw-r--r--tests/codegen/inline-function-args-debug-info.rs2
-rw-r--r--tests/codegen/inline-hint.rs2
-rw-r--r--tests/codegen/instrument-coverage-off.rs14
-rw-r--r--tests/codegen/instrument-coverage.rs16
-rw-r--r--tests/codegen/instrument-mcount.rs2
-rw-r--r--tests/codegen/instrument-xray/basic.rs4
-rw-r--r--tests/codegen/instrument-xray/options-combine.rs8
-rw-r--r--tests/codegen/instrument-xray/options-override.rs6
-rw-r--r--tests/codegen/integer-cmp.rs2
-rw-r--r--tests/codegen/integer-overflow.rs2
-rw-r--r--tests/codegen/internalize-closures.rs2
-rw-r--r--tests/codegen/intrinsic-no-unnamed-attr.rs2
-rw-r--r--tests/codegen/intrinsics/compare_bytes.rs8
-rw-r--r--tests/codegen/intrinsics/const_eval_select.rs2
-rw-r--r--tests/codegen/intrinsics/exact_div.rs2
-rw-r--r--tests/codegen/intrinsics/likely.rs2
-rw-r--r--tests/codegen/intrinsics/mask.rs2
-rw-r--r--tests/codegen/intrinsics/nontemporal.rs2
-rw-r--r--tests/codegen/intrinsics/offset.rs2
-rw-r--r--tests/codegen/intrinsics/offset_from.rs4
-rw-r--r--tests/codegen/intrinsics/prefetch.rs2
-rw-r--r--tests/codegen/intrinsics/transmute-niched.rs8
-rw-r--r--tests/codegen/intrinsics/transmute-x64.rs4
-rw-r--r--tests/codegen/intrinsics/transmute.rs4
-rw-r--r--tests/codegen/intrinsics/volatile.rs2
-rw-r--r--tests/codegen/is_val_statically_known.rs2
-rw-r--r--tests/codegen/issue-97217.rs6
-rw-r--r--tests/codegen/issues/issue-101048.rs2
-rw-r--r--tests/codegen/issues/issue-101082.rs4
-rw-r--r--tests/codegen/issues/issue-101814.rs4
-rw-r--r--tests/codegen/issues/issue-103132.rs2
-rw-r--r--tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs2
-rw-r--r--tests/codegen/issues/issue-103327.rs2
-rw-r--r--tests/codegen/issues/issue-103840.rs2
-rw-r--r--tests/codegen/issues/issue-105386-ub-in-debuginfo.rs2
-rw-r--r--tests/codegen/issues/issue-106369.rs4
-rw-r--r--tests/codegen/issues/issue-111603.rs2
-rw-r--r--tests/codegen/issues/issue-114312.rs6
-rw-r--r--tests/codegen/issues/issue-115385-llvm-jump-threading.rs2
-rw-r--r--tests/codegen/issues/issue-116878.rs4
-rw-r--r--tests/codegen/issues/issue-119422.rs4
-rw-r--r--tests/codegen/issues/issue-13018.rs2
-rw-r--r--tests/codegen/issues/issue-27130.rs2
-rw-r--r--tests/codegen/issues/issue-32031.rs2
-rw-r--r--tests/codegen/issues/issue-32364.rs4
-rw-r--r--tests/codegen/issues/issue-34634.rs2
-rw-r--r--tests/codegen/issues/issue-34947-pow-i32.rs2
-rw-r--r--tests/codegen/issues/issue-37945.rs6
-rw-r--r--tests/codegen/issues/issue-44056-macos-tls-align.rs4
-rw-r--r--tests/codegen/issues/issue-45222.rs4
-rw-r--r--tests/codegen/issues/issue-45466.rs4
-rw-r--r--tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs4
-rw-r--r--tests/codegen/issues/issue-56267-2.rs2
-rw-r--r--tests/codegen/issues/issue-56267.rs2
-rw-r--r--tests/codegen/issues/issue-56927.rs2
-rw-r--r--tests/codegen/issues/issue-58881.rs6
-rw-r--r--tests/codegen/issues/issue-59352.rs2
-rw-r--r--tests/codegen/issues/issue-69101-bounds-check.rs4
-rw-r--r--tests/codegen/issues/issue-73031.rs2
-rw-r--r--tests/codegen/issues/issue-73258.rs4
-rw-r--r--tests/codegen/issues/issue-73338-effecient-cmp.rs2
-rw-r--r--tests/codegen/issues/issue-73396-bounds-check-after-position.rs4
-rw-r--r--tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs2
-rw-r--r--tests/codegen/issues/issue-75525-bounds-checks.rs2
-rw-r--r--tests/codegen/issues/issue-75546.rs2
-rw-r--r--tests/codegen/issues/issue-75659.rs4
-rw-r--r--tests/codegen/issues/issue-75978.rs2
-rw-r--r--tests/codegen/issues/issue-77812.rs2
-rw-r--r--tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs6
-rw-r--r--tests/codegen/issues/issue-84268.rs2
-rw-r--r--tests/codegen/issues/issue-85872-multiple-reverse.rs2
-rw-r--r--tests/codegen/issues/issue-86106.rs4
-rw-r--r--tests/codegen/issues/issue-96274.rs2
-rw-r--r--tests/codegen/issues/issue-96497-slice-size-nowrap.rs2
-rw-r--r--tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs2
-rw-r--r--tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs4
-rw-r--r--tests/codegen/issues/issue-99960.rs2
-rw-r--r--tests/codegen/iter-repeat-n-trivial-drop.rs6
-rw-r--r--tests/codegen/layout-size-checks.rs6
-rw-r--r--tests/codegen/lib-optimizations/iter-sum.rs6
-rw-r--r--tests/codegen/lifetime_start_end.rs2
-rw-r--r--tests/codegen/link-dead-code.rs2
-rw-r--r--tests/codegen/link_section.rs4
-rw-r--r--tests/codegen/llvm-ident.rs6
-rw-r--r--tests/codegen/llvm_module_flags.rs2
-rw-r--r--tests/codegen/loads.rs2
-rw-r--r--tests/codegen/local-generics-in-exe-internalized.rs2
-rw-r--r--tests/codegen/loongarch-abi/call-llvm-intrinsics.rs4
-rw-r--r--tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs6
-rw-r--r--tests/codegen/lto-removes-invokes.rs4
-rw-r--r--tests/codegen/macos/i686-macosx-deployment-target.rs6
-rw-r--r--tests/codegen/macos/i686-no-macosx-deployment-target.rs6
-rw-r--r--tests/codegen/macos/x86_64-macosx-deployment-target.rs6
-rw-r--r--tests/codegen/macos/x86_64-no-macosx-deployment-target.rs6
-rw-r--r--tests/codegen/mainsubprogram.rs6
-rw-r--r--tests/codegen/mainsubprogramstart.rs6
-rw-r--r--tests/codegen/match-optimized.rs2
-rw-r--r--tests/codegen/match-optimizes-away.rs2
-rw-r--r--tests/codegen/match-unoptimized.rs2
-rw-r--r--tests/codegen/maybeuninit-rvo.rs2
-rw-r--r--tests/codegen/mem-replace-big-type.rs4
-rw-r--r--tests/codegen/mem-replace-simple-type.rs6
-rw-r--r--tests/codegen/merge-functions.rs6
-rw-r--r--tests/codegen/method-declaration.rs2
-rw-r--r--tests/codegen/mir-inlined-line-numbers.rs2
-rw-r--r--tests/codegen/mir_zst_stores.rs2
-rw-r--r--tests/codegen/move-before-nocapture-ref-arg.rs4
-rw-r--r--tests/codegen/move-operands.rs2
-rw-r--r--tests/codegen/naked-fn/naked-functions.rs6
-rw-r--r--tests/codegen/naked-fn/naked-nocoverage.rs6
-rw-r--r--tests/codegen/naked-fn/naked-noinline.rs6
-rw-r--r--tests/codegen/no-assumes-on-casts.rs2
-rw-r--r--tests/codegen/no-dllimport-w-cross-lang-lto.rs6
-rw-r--r--tests/codegen/no-jump-tables.rs8
-rw-r--r--tests/codegen/no-plt.rs2
-rw-r--r--tests/codegen/no_builtins-at-crate.rs2
-rw-r--r--tests/codegen/noalias-box-off.rs2
-rw-r--r--tests/codegen/noalias-box.rs2
-rw-r--r--tests/codegen/noalias-flag.rs2
-rw-r--r--tests/codegen/noalias-refcell.rs2
-rw-r--r--tests/codegen/noalias-rwlockreadguard.rs2
-rw-r--r--tests/codegen/noalias-unpin.rs2
-rw-r--r--tests/codegen/non-terminate/infinite-loop-1.rs2
-rw-r--r--tests/codegen/non-terminate/infinite-loop-2.rs2
-rw-r--r--tests/codegen/non-terminate/infinite-recursion.rs2
-rw-r--r--tests/codegen/non-terminate/nonempty-infinite-loop.rs2
-rw-r--r--tests/codegen/noreturn-uninhabited.rs2
-rw-r--r--tests/codegen/noreturnflag.rs2
-rw-r--r--tests/codegen/nounwind.rs8
-rw-r--r--tests/codegen/nrvo.rs2
-rw-r--r--tests/codegen/optimize-attr-1.rs8
-rw-r--r--tests/codegen/option-as-slice.rs6
-rw-r--r--tests/codegen/option-nonzero-eq.rs2
-rw-r--r--tests/codegen/overaligned-constant.rs6
-rw-r--r--tests/codegen/packed.rs2
-rw-r--r--tests/codegen/panic-abort-windows.rs4
-rw-r--r--tests/codegen/panic-in-drop-abort.rs4
-rw-r--r--tests/codegen/panic-unwind-default-uwtable.rs2
-rw-r--r--tests/codegen/personality_lifetimes.rs8
-rw-r--r--tests/codegen/pgo-counter-bias.rs8
-rw-r--r--tests/codegen/pgo-instrumentation.rs4
-rw-r--r--tests/codegen/pic-relocation-model.rs2
-rw-r--r--tests/codegen/pie-relocation-model.rs4
-rw-r--r--tests/codegen/ptr-arithmetic.rs4
-rw-r--r--tests/codegen/ptr-read-metadata.rs4
-rw-r--r--tests/codegen/refs.rs2
-rw-r--r--tests/codegen/remap_path_prefix/aux_mod.rs2
-rw-r--r--tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs2
-rw-r--r--tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs2
-rw-r--r--tests/codegen/remap_path_prefix/issue-73167-remap-std.rs4
-rw-r--r--tests/codegen/remap_path_prefix/main.rs6
-rw-r--r--tests/codegen/remap_path_prefix/xcrate-generic.rs6
-rw-r--r--tests/codegen/repeat-trusted-len.rs2
-rw-r--r--tests/codegen/repr/transparent-imm-array.rs14
-rw-r--r--tests/codegen/repr/transparent-mips64.rs4
-rw-r--r--tests/codegen/repr/transparent-struct-ptr.rs14
-rw-r--r--tests/codegen/repr/transparent-sysv64.rs4
-rw-r--r--tests/codegen/repr/transparent.rs8
-rw-r--r--tests/codegen/riscv-abi/call-llvm-intrinsics.rs4
-rw-r--r--tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs4
-rw-r--r--tests/codegen/riscv-abi/riscv64-lp64d-abi.rs6
-rw-r--r--tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs6
-rw-r--r--tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs12
-rw-r--r--tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-checks.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-generalize-pointers.rs4
-rw-r--r--tests/codegen/sanitizer/cfi-normalize-integers.rs4
-rw-r--r--tests/codegen/sanitizer/kasan-emits-instrumentation.rs20
-rw-r--r--tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs12
-rw-r--r--tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs12
-rw-r--r--tests/codegen/sanitizer/memory-track-origins.rs16
-rw-r--r--tests/codegen/sanitizer/memtag-attr-check.rs4
-rw-r--r--tests/codegen/sanitizer/no-sanitize-inlining.rs12
-rw-r--r--tests/codegen/sanitizer/no-sanitize.rs4
-rw-r--r--tests/codegen/sanitizer/safestack-attr-check.rs4
-rw-r--r--tests/codegen/sanitizer/sanitizer-recover.rs22
-rw-r--r--tests/codegen/sanitizer/scs-attr-check.rs4
-rw-r--r--tests/codegen/scalar-pair-bool.rs2
-rw-r--r--tests/codegen/set-discriminant-invalid.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs2
-rw-r--r--tests/codegen/simd/issue-120720-reduce-nan.rs4
-rw-r--r--tests/codegen/simd/simd-wide-sum.rs12
-rw-r--r--tests/codegen/simd/simd_arith_offset.rs4
-rw-r--r--tests/codegen/simd/swap-simd-types.rs6
-rw-r--r--tests/codegen/slice-as_chunks.rs6
-rw-r--r--tests/codegen/slice-indexing.rs6
-rw-r--r--tests/codegen/slice-init.rs2
-rw-r--r--tests/codegen/slice-iter-fold.rs4
-rw-r--r--tests/codegen/slice-iter-len-eq-zero.rs4
-rw-r--r--tests/codegen/slice-iter-nonnull.rs4
-rw-r--r--tests/codegen/slice-position-bounds-check.rs2
-rw-r--r--tests/codegen/slice-ref-equality.rs4
-rw-r--r--tests/codegen/slice-reverse.rs6
-rw-r--r--tests/codegen/slice-windows-no-bounds-check.rs2
-rw-r--r--tests/codegen/slice_as_from_ptr_range.rs6
-rw-r--r--tests/codegen/some-abis-do-extend-params-to-32-bits.rs36
-rw-r--r--tests/codegen/some-global-nonnull.rs2
-rw-r--r--tests/codegen/sparc-struct-abi.rs4
-rw-r--r--tests/codegen/split-lto-unit.rs4
-rw-r--r--tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs2
-rw-r--r--tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs2
-rw-r--r--tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs2
-rw-r--r--tests/codegen/sroa-fragment-debuginfo.rs6
-rw-r--r--tests/codegen/sse42-implies-crc32.rs4
-rw-r--r--tests/codegen/stack-probes-inline.rs32
-rw-r--r--tests/codegen/stack-protector.rs10
-rw-r--r--tests/codegen/static-relocation-model-msvc.rs6
-rw-r--r--tests/codegen/staticlib-external-inline-fns.rs2
-rw-r--r--tests/codegen/stores.rs2
-rw-r--r--tests/codegen/swap-large-types.rs6
-rw-r--r--tests/codegen/swap-small-types.rs6
-rw-r--r--tests/codegen/target-cpu-on-functions.rs4
-rw-r--r--tests/codegen/target-feature-inline-closure.rs4
-rw-r--r--tests/codegen/target-feature-overrides.rs10
-rw-r--r--tests/codegen/thin-lto.rs4
-rw-r--r--tests/codegen/thread-local.rs14
-rw-r--r--tests/codegen/tied-features-strength.rs14
-rw-r--r--tests/codegen/to_vec.rs2
-rw-r--r--tests/codegen/trailing_zeros.rs4
-rw-r--r--tests/codegen/transmute-optimized.rs4
-rw-r--r--tests/codegen/transmute-scalar.rs2
-rw-r--r--tests/codegen/try_identity.rs2
-rw-r--r--tests/codegen/try_question_mark_nop.rs4
-rw-r--r--tests/codegen/tune-cpu-on-functions.rs4
-rw-r--r--tests/codegen/tuple-layout-opt.rs2
-rw-r--r--tests/codegen/unchecked-float-casts.rs4
-rw-r--r--tests/codegen/unchecked_shifts.rs4
-rw-r--r--tests/codegen/uninit-consts.rs2
-rw-r--r--tests/codegen/union-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/aapcs-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs2
-rw-r--r--tests/codegen/unwind-abis/c-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/cdecl-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/fastcall-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs4
-rw-r--r--tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs6
-rw-r--r--tests/codegen/unwind-abis/nounwind.rs4
-rw-r--r--tests/codegen/unwind-abis/stdcall-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/system-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/sysv64-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/thiscall-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/vectorcall-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-abis/win64-unwind-abi.rs4
-rw-r--r--tests/codegen/unwind-and-panic-abort.rs2
-rw-r--r--tests/codegen/unwind-extern-exports.rs6
-rw-r--r--tests/codegen/unwind-extern-imports.rs6
-rw-r--r--tests/codegen/unwind-landingpad-cold.rs6
-rw-r--r--tests/codegen/unwind-landingpad-inline.rs6
-rw-r--r--tests/codegen/var-names.rs2
-rw-r--r--tests/codegen/vec-as-ptr.rs2
-rw-r--r--tests/codegen/vec-calloc.rs6
-rw-r--r--tests/codegen/vec-in-place.rs4
-rw-r--r--tests/codegen/vec-iter-collect-len.rs4
-rw-r--r--tests/codegen/vec-iter.rs4
-rw-r--r--tests/codegen/vec-optimizes-away.rs4
-rw-r--r--tests/codegen/vec-reserve-extend.rs4
-rw-r--r--tests/codegen/vec-shrink-panik.rs12
-rw-r--r--tests/codegen/vec_pop_push_noop.rs4
-rw-r--r--tests/codegen/vecdeque-drain.rs4
-rw-r--r--tests/codegen/vecdeque-nonempty-get-no-panic.rs4
-rw-r--r--tests/codegen/vecdeque_no_panic.rs4
-rw-r--r--tests/codegen/virtual-function-elimination-32bit.rs4
-rw-r--r--tests/codegen/virtual-function-elimination.rs6
-rw-r--r--tests/codegen/wasm_casts_trapping.rs4
-rw-r--r--tests/codegen/wasm_exceptions.rs4
-rw-r--r--tests/codegen/zip.rs2
-rw-r--r--tests/codegen/zst-offset.rs2
452 files changed, 1027 insertions, 1027 deletions
diff --git a/tests/codegen/aarch64-struct-align-128.rs b/tests/codegen/aarch64-struct-align-128.rs
index bf34717786d..0a30a2527da 100644
--- a/tests/codegen/aarch64-struct-align-128.rs
+++ b/tests/codegen/aarch64-struct-align-128.rs
@@ -1,12 +1,12 @@
 // Test that structs aligned to 128 bits are passed with the correct ABI on aarch64.
 
-// revisions:linux darwin windows
-//[linux] compile-flags: --target aarch64-unknown-linux-gnu
-//[darwin] compile-flags: --target aarch64-apple-darwin
-//[windows] compile-flags: --target aarch64-pc-windows-msvc
-//[linux] needs-llvm-components: aarch64
-//[darwin] needs-llvm-components: aarch64
-//[windows] needs-llvm-components: aarch64
+//@ revisions:linux darwin windows
+//@[linux] compile-flags: --target aarch64-unknown-linux-gnu
+//@[darwin] compile-flags: --target aarch64-apple-darwin
+//@[windows] compile-flags: --target aarch64-pc-windows-msvc
+//@[linux] needs-llvm-components: aarch64
+//@[darwin] needs-llvm-components: aarch64
+//@[windows] needs-llvm-components: aarch64
 
 #![feature(no_core, lang_items)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/abi-efiapi.rs b/tests/codegen/abi-efiapi.rs
index 9502ebf59af..fa73f649ed8 100644
--- a/tests/codegen/abi-efiapi.rs
+++ b/tests/codegen/abi-efiapi.rs
@@ -1,17 +1,17 @@
 // Checks if the correct annotation for the efiapi ABI is passed to llvm.
 
-// revisions:x86_64 i686 aarch64 arm riscv
-//[x86_64] compile-flags: --target x86_64-unknown-uefi
-//[x86_64] needs-llvm-components: aarch64 arm riscv
-//[i686] compile-flags: --target i686-unknown-linux-musl
-//[i686] needs-llvm-components: aarch64 arm riscv
-//[aarch64] compile-flags: --target aarch64-unknown-none
-//[aarch64] needs-llvm-components: aarch64 arm riscv
-//[arm] compile-flags: --target armv7r-none-eabi
-//[arm] needs-llvm-components: aarch64 arm riscv
-//[riscv] compile-flags: --target riscv64gc-unknown-none-elf
-//[riscv] needs-llvm-components: aarch64 arm riscv
-// compile-flags: -C no-prepopulate-passes
+//@ revisions:x86_64 i686 aarch64 arm riscv
+//@[x86_64] compile-flags: --target x86_64-unknown-uefi
+//@[x86_64] needs-llvm-components: aarch64 arm riscv
+//@[i686] compile-flags: --target i686-unknown-linux-musl
+//@[i686] needs-llvm-components: aarch64 arm riscv
+//@[aarch64] compile-flags: --target aarch64-unknown-none
+//@[aarch64] needs-llvm-components: aarch64 arm riscv
+//@[arm] compile-flags: --target armv7r-none-eabi
+//@[arm] needs-llvm-components: aarch64 arm riscv
+//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf
+//@[riscv] needs-llvm-components: aarch64 arm riscv
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/abi-main-signature-16bit-c-int.rs b/tests/codegen/abi-main-signature-16bit-c-int.rs
index ce4d35dea0c..9832088ab33 100644
--- a/tests/codegen/abi-main-signature-16bit-c-int.rs
+++ b/tests/codegen/abi-main-signature-16bit-c-int.rs
@@ -2,9 +2,9 @@
 // entry point. It must match C's `int main(int, char **)`.
 
 // This test is for targets with 16bit c_int only.
-// revisions: avr msp
-//[avr] only-avr
-//[msp] only-msp430
+//@ revisions: avr msp
+//@[avr] only-avr
+//@[msp] only-msp430
 
 
 fn main() {
diff --git a/tests/codegen/abi-main-signature-32bit-c-int.rs b/tests/codegen/abi-main-signature-32bit-c-int.rs
index 771ca66daf8..52db3d893e1 100644
--- a/tests/codegen/abi-main-signature-32bit-c-int.rs
+++ b/tests/codegen/abi-main-signature-32bit-c-int.rs
@@ -2,8 +2,8 @@
 // entry point. It must match C's `int main(int, char **)`.
 
 // This test is for targets with 32bit c_int only.
-// ignore-msp430
-// ignore-avr
+//@ ignore-msp430
+//@ ignore-avr
 
 fn main() {
 }
diff --git a/tests/codegen/abi-repr-ext.rs b/tests/codegen/abi-repr-ext.rs
index 23ade3c7216..2e100a37235 100644
--- a/tests/codegen/abi-repr-ext.rs
+++ b/tests/codegen/abi-repr-ext.rs
@@ -1,21 +1,21 @@
-// compile-flags: -O
-
-// revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv
-
-//[x86_64] compile-flags: --target x86_64-unknown-uefi
-//[x86_64] needs-llvm-components: x86
-//[i686] compile-flags: --target i686-unknown-linux-musl
-//[i686] needs-llvm-components: x86
-//[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc
-//[aarch64-windows] needs-llvm-components: aarch64
-//[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu
-//[aarch64-linux] needs-llvm-components: aarch64
-//[aarch64-apple] compile-flags: --target aarch64-apple-darwin
-//[aarch64-apple] needs-llvm-components: aarch64
-//[arm] compile-flags: --target armv7r-none-eabi
-//[arm] needs-llvm-components: arm
-//[riscv] compile-flags: --target riscv64gc-unknown-none-elf
-//[riscv] needs-llvm-components: riscv
+//@ compile-flags: -O
+
+//@ revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv
+
+//@[x86_64] compile-flags: --target x86_64-unknown-uefi
+//@[x86_64] needs-llvm-components: x86
+//@[i686] compile-flags: --target i686-unknown-linux-musl
+//@[i686] needs-llvm-components: x86
+//@[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc
+//@[aarch64-windows] needs-llvm-components: aarch64
+//@[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu
+//@[aarch64-linux] needs-llvm-components: aarch64
+//@[aarch64-apple] compile-flags: --target aarch64-apple-darwin
+//@[aarch64-apple] needs-llvm-components: aarch64
+//@[arm] compile-flags: --target armv7r-none-eabi
+//@[arm] needs-llvm-components: arm
+//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf
+//@[riscv] needs-llvm-components: riscv
 
 // See bottom of file for a corresponding C source file that is meant to yield
 // equivalent declarations.
diff --git a/tests/codegen/abi-sysv64.rs b/tests/codegen/abi-sysv64.rs
index 3c2d4e719d4..ec555ee5f1d 100644
--- a/tests/codegen/abi-sysv64.rs
+++ b/tests/codegen/abi-sysv64.rs
@@ -2,8 +2,8 @@
 // llvm. Also checks that the abi-sysv64 feature gate allows usage
 // of the sysv64 abi.
 //
-// needs-llvm-components: x86
-// compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0
+//@ needs-llvm-components: x86
+//@ compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0
 
 #![crate_type = "lib"]
 #![no_core]
diff --git a/tests/codegen/abi-x86-interrupt.rs b/tests/codegen/abi-x86-interrupt.rs
index 928ad5a9bbd..b8f3ebb99dd 100644
--- a/tests/codegen/abi-x86-interrupt.rs
+++ b/tests/codegen/abi-x86-interrupt.rs
@@ -2,8 +2,8 @@
 // llvm. Also checks that the abi_x86_interrupt feature gate allows usage
 // of the x86-interrupt abi.
 
-// needs-llvm-components: x86
-// compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0
+//@ needs-llvm-components: x86
+//@ compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0
 
 #![crate_type = "lib"]
 #![no_core]
diff --git a/tests/codegen/abi-x86_64_sysv.rs b/tests/codegen/abi-x86_64_sysv.rs
index 84e06023e9c..659c1d93e20 100644
--- a/tests/codegen/abi-x86_64_sysv.rs
+++ b/tests/codegen/abi-x86_64_sysv.rs
@@ -1,6 +1,6 @@
-// only-x86_64
+//@ only-x86_64
 
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/addr-of-mutate.rs b/tests/codegen/addr-of-mutate.rs
index 97af6181524..f10f01274b1 100644
--- a/tests/codegen/addr-of-mutate.rs
+++ b/tests/codegen/addr-of-mutate.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=3 -C no-prepopulate-passes
+//@ compile-flags: -C opt-level=3 -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/adjustments.rs b/tests/codegen/adjustments.rs
index 0739c79ba8d..549a9737eb1 100644
--- a/tests/codegen/adjustments.rs
+++ b/tests/codegen/adjustments.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/align-byval-vector.rs b/tests/codegen/align-byval-vector.rs
index 3c8be659671..6596792ec88 100644
--- a/tests/codegen/align-byval-vector.rs
+++ b/tests/codegen/align-byval-vector.rs
@@ -1,9 +1,9 @@
-// revisions:x86-linux x86-darwin
+//@ revisions:x86-linux x86-darwin
 
-//[x86-linux] compile-flags: --target i686-unknown-linux-gnu
-//[x86-linux] needs-llvm-components: x86
-//[x86-darwin] compile-flags: --target i686-apple-darwin
-//[x86-darwin] needs-llvm-components: x86
+//@[x86-linux] compile-flags: --target i686-unknown-linux-gnu
+//@[x86-linux] needs-llvm-components: x86
+//@[x86-darwin] compile-flags: --target i686-apple-darwin
+//@[x86-darwin] needs-llvm-components: x86
 
 // Tests that aggregates containing vector types get their alignment increased to 16 on Darwin.
 
diff --git a/tests/codegen/align-byval.rs b/tests/codegen/align-byval.rs
index c6e3a8ef5f0..1016c7903eb 100644
--- a/tests/codegen/align-byval.rs
+++ b/tests/codegen/align-byval.rs
@@ -1,18 +1,18 @@
 // ignore-tidy-linelength
-// revisions:m68k wasm x86_64-linux x86_64-windows i686-linux i686-windows
-
-//[m68k] compile-flags: --target m68k-unknown-linux-gnu
-//[m68k] needs-llvm-components: m68k
-//[wasm] compile-flags: --target wasm32-unknown-emscripten
-//[wasm] needs-llvm-components: webassembly
-//[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu
-//[x86_64-linux] needs-llvm-components: x86
-//[x86_64-windows] compile-flags: --target x86_64-pc-windows-msvc
-//[x86_64-windows] needs-llvm-components: x86
-//[i686-linux] compile-flags: --target i686-unknown-linux-gnu
-//[i686-linux] needs-llvm-components: x86
-//[i686-windows] compile-flags: --target i686-pc-windows-msvc
-//[i686-windows] needs-llvm-components: x86
+//@ revisions:m68k wasm x86_64-linux x86_64-windows i686-linux i686-windows
+
+//@[m68k] compile-flags: --target m68k-unknown-linux-gnu
+//@[m68k] needs-llvm-components: m68k
+//@[wasm] compile-flags: --target wasm32-unknown-emscripten
+//@[wasm] needs-llvm-components: webassembly
+//@[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu
+//@[x86_64-linux] needs-llvm-components: x86
+//@[x86_64-windows] compile-flags: --target x86_64-pc-windows-msvc
+//@[x86_64-windows] needs-llvm-components: x86
+//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu
+//@[i686-linux] needs-llvm-components: x86
+//@[i686-windows] compile-flags: --target i686-pc-windows-msvc
+//@[i686-windows] needs-llvm-components: x86
 
 // Tests that `byval` alignment is properly specified (#80127).
 // The only targets that use `byval` are m68k, wasm, x86-64, and x86.
diff --git a/tests/codegen/align-enum.rs b/tests/codegen/align-enum.rs
index 5901f0113c3..17bf2cf7256 100644
--- a/tests/codegen/align-enum.rs
+++ b/tests/codegen/align-enum.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/align-fn.rs b/tests/codegen/align-fn.rs
index f3cf614e185..97f23cc0423 100644
--- a/tests/codegen/align-fn.rs
+++ b/tests/codegen/align-fn.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
 
 #![crate_type = "lib"]
 #![feature(fn_align)]
diff --git a/tests/codegen/align-offset.rs b/tests/codegen/align-offset.rs
index d4d8b18d35b..9819dc20966 100644
--- a/tests/codegen/align-offset.rs
+++ b/tests/codegen/align-offset.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug (debug assertions in `slice::from_raw_parts` block optimizations)
+//@ compile-flags: -O
+//@ ignore-debug (debug assertions in `slice::from_raw_parts` block optimizations)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/align-struct.rs b/tests/codegen/align-struct.rs
index d483a2ba151..34475a3852b 100644
--- a/tests/codegen/align-struct.rs
+++ b/tests/codegen/align-struct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/alloc-optimisation.rs b/tests/codegen/alloc-optimisation.rs
index 900eb687a45..6f320e68fdb 100644
--- a/tests/codegen/alloc-optimisation.rs
+++ b/tests/codegen/alloc-optimisation.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 #[no_mangle]
diff --git a/tests/codegen/array-clone.rs b/tests/codegen/array-clone.rs
index 0d42963bcd2..2873f3cadca 100644
--- a/tests/codegen/array-clone.rs
+++ b/tests/codegen/array-clone.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/array-codegen.rs b/tests/codegen/array-codegen.rs
index bf5ae74679b..bb4bd5444db 100644
--- a/tests/codegen/array-codegen.rs
+++ b/tests/codegen/array-codegen.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/array-equality.rs b/tests/codegen/array-equality.rs
index 1941452ea61..94354228886 100644
--- a/tests/codegen/array-equality.rs
+++ b/tests/codegen/array-equality.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Z merge-functions=disabled
-// only-x86_64
+//@ compile-flags: -O -Z merge-functions=disabled
+//@ only-x86_64
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/array-map.rs b/tests/codegen/array-map.rs
index 9846cc7f5c8..b356f8f33f9 100644
--- a/tests/codegen/array-map.rs
+++ b/tests/codegen/array-map.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3
-// only-x86_64
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3
+//@ only-x86_64
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/array-optimized.rs b/tests/codegen/array-optimized.rs
index 27448fdcfad..4cf16f1fb30 100644
--- a/tests/codegen/array-optimized.rs
+++ b/tests/codegen/array-optimized.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/ascii-char.rs b/tests/codegen/ascii-char.rs
index 711ffe7e1a5..30f285096ed 100644
--- a/tests/codegen/ascii-char.rs
+++ b/tests/codegen/ascii-char.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=1
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -C opt-level=1
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 #![feature(ascii_char)]
diff --git a/tests/codegen/asm-clobber_abi.rs b/tests/codegen/asm-clobber_abi.rs
index f70caea2fb9..cc563474bf8 100644
--- a/tests/codegen/asm-clobber_abi.rs
+++ b/tests/codegen/asm-clobber_abi.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// only-x86_64
+//@ compile-flags: -O
+//@ only-x86_64
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/asm-clobbers.rs b/tests/codegen/asm-clobbers.rs
index 2ef10a2837d..4094db74134 100644
--- a/tests/codegen/asm-clobbers.rs
+++ b/tests/codegen/asm-clobbers.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// only-x86_64
+//@ compile-flags: -O
+//@ only-x86_64
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/asm-may_unwind.rs b/tests/codegen/asm-may_unwind.rs
index c97933035d1..be66b3975ff 100644
--- a/tests/codegen/asm-may_unwind.rs
+++ b/tests/codegen/asm-may_unwind.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// only-x86_64
+//@ compile-flags: -O
+//@ only-x86_64
 
 #![crate_type = "rlib"]
 #![feature(asm_unwind)]
diff --git a/tests/codegen/asm-maybe-uninit.rs b/tests/codegen/asm-maybe-uninit.rs
index d7e4a948954..f9bf280b384 100644
--- a/tests/codegen/asm-maybe-uninit.rs
+++ b/tests/codegen/asm-maybe-uninit.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// only-x86_64
+//@ compile-flags: -O
+//@ only-x86_64
 
 #![crate_type = "rlib"]
 #![allow(asm_sub_register)]
diff --git a/tests/codegen/asm-multiple-options.rs b/tests/codegen/asm-multiple-options.rs
index 1ae37d627d6..1ee295e32c9 100644
--- a/tests/codegen/asm-multiple-options.rs
+++ b/tests/codegen/asm-multiple-options.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// only-x86_64
+//@ compile-flags: -O
+//@ only-x86_64
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/asm-options.rs b/tests/codegen/asm-options.rs
index 963b60cfe35..96a72c2f5ae 100644
--- a/tests/codegen/asm-options.rs
+++ b/tests/codegen/asm-options.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// only-x86_64
+//@ compile-flags: -O
+//@ only-x86_64
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/asm-powerpc-clobbers.rs b/tests/codegen/asm-powerpc-clobbers.rs
index 10b20ba6beb..0be1b66bd99 100644
--- a/tests/codegen/asm-powerpc-clobbers.rs
+++ b/tests/codegen/asm-powerpc-clobbers.rs
@@ -1,10 +1,10 @@
-// revisions: powerpc powerpc64 powerpc64le
-//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
-//[powerpc] needs-llvm-components: powerpc
-//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
-//[powerpc64] needs-llvm-components: powerpc
-//[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu
-//[powerpc64le] needs-llvm-components: powerpc
+//@ revisions: powerpc powerpc64 powerpc64le
+//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
+//@[powerpc] needs-llvm-components: powerpc
+//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
+//@[powerpc64] needs-llvm-components: powerpc
+//@[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu
+//@[powerpc64le] needs-llvm-components: powerpc
 
 #![crate_type = "rlib"]
 #![feature(no_core, rustc_attrs, lang_items, asm_experimental_arch)]
diff --git a/tests/codegen/asm-sanitize-llvm.rs b/tests/codegen/asm-sanitize-llvm.rs
index 41bed98038e..8638ed2236a 100644
--- a/tests/codegen/asm-sanitize-llvm.rs
+++ b/tests/codegen/asm-sanitize-llvm.rs
@@ -1,6 +1,6 @@
 // FIXME(nagisa): remove the flags below once all targets support `asm!`.
-// compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0
-// needs-llvm-components: x86
+//@ compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0
+//@ needs-llvm-components: x86
 
 // Verify we sanitize the special tokens for the LLVM inline-assembly, ensuring people won't
 // inadvertently rely on the LLVM-specific syntax and features.
diff --git a/tests/codegen/asm-target-clobbers.rs b/tests/codegen/asm-target-clobbers.rs
index ac30e18ec52..119372491ff 100644
--- a/tests/codegen/asm-target-clobbers.rs
+++ b/tests/codegen/asm-target-clobbers.rs
@@ -1,6 +1,6 @@
-// only-x86_64
-// revisions: base avx512
-// [avx512]compile-flags: -C target-feature=+avx512f
+//@ only-x86_64
+//@ revisions: base avx512
+//@ [avx512]compile-flags: -C target-feature=+avx512f
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/async-closure-debug.rs b/tests/codegen/async-closure-debug.rs
index 6718d2b6627..9cb1e623295 100644
--- a/tests/codegen/async-closure-debug.rs
+++ b/tests/codegen/async-closure-debug.rs
@@ -1,7 +1,7 @@
 // Just make sure that async closures don't ICE.
 //
-// compile-flags: -C debuginfo=2 --edition=2018
-// ignore-msvc
+//@ compile-flags: -C debuginfo=2 --edition=2018
+//@ ignore-msvc
 
 // CHECK-DAG:  [[GEN_FN:!.*]] = !DINamespace(name: "async_closure_test"
 // CHECK-DAG:  [[CLOSURE:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{closure_env#0}", scope: [[GEN_FN]]
diff --git a/tests/codegen/async-fn-debug-awaitee-field.rs b/tests/codegen/async-fn-debug-awaitee-field.rs
index 03cc46cdcde..d1a7d738e9e 100644
--- a/tests/codegen/async-fn-debug-awaitee-field.rs
+++ b/tests/codegen/async-fn-debug-awaitee-field.rs
@@ -3,7 +3,7 @@
 // extensions rely on the field having this name.
 
 // ignore-tidy-linelength
-// compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0
+//@ compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/async-fn-debug-msvc.rs b/tests/codegen/async-fn-debug-msvc.rs
index 707a0d27740..7c695042b42 100644
--- a/tests/codegen/async-fn-debug-msvc.rs
+++ b/tests/codegen/async-fn-debug-msvc.rs
@@ -4,8 +4,8 @@
 //  - Other fields are not marked artificial
 //
 //
-// compile-flags: -C debuginfo=2 --edition=2018
-// only-msvc
+//@ compile-flags: -C debuginfo=2 --edition=2018
+//@ only-msvc
 
 async fn foo() {}
 async fn async_fn_test() {
diff --git a/tests/codegen/async-fn-debug.rs b/tests/codegen/async-fn-debug.rs
index 9f6058a71b3..7be4ad45665 100644
--- a/tests/codegen/async-fn-debug.rs
+++ b/tests/codegen/async-fn-debug.rs
@@ -4,8 +4,8 @@
 //  - Other fields are not marked artificial
 //
 //
-// compile-flags: -C debuginfo=2 --edition=2018
-// ignore-msvc
+//@ compile-flags: -C debuginfo=2 --edition=2018
+//@ ignore-msvc
 
 async fn foo() {}
 async fn async_fn_test() {
diff --git a/tests/codegen/atomic-operations.rs b/tests/codegen/atomic-operations.rs
index 20980c48960..b1350273542 100644
--- a/tests/codegen/atomic-operations.rs
+++ b/tests/codegen/atomic-operations.rs
@@ -1,5 +1,5 @@
 // Code generation of atomic operations.
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 use std::sync::atomic::{AtomicI32, Ordering::*};
diff --git a/tests/codegen/autovectorize-f32x4.rs b/tests/codegen/autovectorize-f32x4.rs
index 54392be707f..90c9f369104 100644
--- a/tests/codegen/autovectorize-f32x4.rs
+++ b/tests/codegen/autovectorize-f32x4.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=3 -Z merge-functions=disabled
-// only-x86_64
+//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled
+//@ only-x86_64
 #![crate_type = "lib"]
 
 // CHECK-LABEL: @auto_vectorize_direct
diff --git a/tests/codegen/avr/avr-func-addrspace.rs b/tests/codegen/avr/avr-func-addrspace.rs
index dc36a9fac8c..fb53abecfdb 100644
--- a/tests/codegen/avr/avr-func-addrspace.rs
+++ b/tests/codegen/avr/avr-func-addrspace.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib
-// needs-llvm-components: avr
+//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib
+//@ needs-llvm-components: avr
 
 // This test validates that function pointers can be stored in global variables
 // and called upon. It ensures that Rust emits function pointers in the correct
diff --git a/tests/codegen/binary-search-index-no-bound-check.rs b/tests/codegen/binary-search-index-no-bound-check.rs
index 595969a8979..d2627d67142 100644
--- a/tests/codegen/binary-search-index-no-bound-check.rs
+++ b/tests/codegen/binary-search-index-no-bound-check.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 #![crate_type = "lib"]
 
 // Make sure no bounds checks are emitted when slicing or indexing
diff --git a/tests/codegen/bool-cmp.rs b/tests/codegen/bool-cmp.rs
index 5090f7c378c..29ee3e0627b 100644
--- a/tests/codegen/bool-cmp.rs
+++ b/tests/codegen/bool-cmp.rs
@@ -1,7 +1,7 @@
 // This is a test for optimal Ord trait implementation for bool.
 // See <https://github.com/rust-lang/rust/issues/66780> for more info.
 
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/box-uninit-bytes.rs b/tests/codegen/box-uninit-bytes.rs
index 732da0a1794..63a6c7b8415 100644
--- a/tests/codegen/box-uninit-bytes.rs
+++ b/tests/codegen/box-uninit-bytes.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 use std::mem::MaybeUninit;
diff --git a/tests/codegen/bpf-alu32.rs b/tests/codegen/bpf-alu32.rs
index c68bffd03e2..5955bf3317f 100644
--- a/tests/codegen/bpf-alu32.rs
+++ b/tests/codegen/bpf-alu32.rs
@@ -1,4 +1,4 @@
-// only-bpf
+//@ only-bpf
 #![crate_type = "lib"]
 #![feature(bpf_target_feature)]
 #![no_std]
diff --git a/tests/codegen/branch-protection.rs b/tests/codegen/branch-protection.rs
index 994c71b2619..0961b1b9f52 100644
--- a/tests/codegen/branch-protection.rs
+++ b/tests/codegen/branch-protection.rs
@@ -1,12 +1,12 @@
 // Test that the correct module flags are emitted with different branch protection flags.
 
-// revisions: BTI PACRET LEAF BKEY NONE
-// needs-llvm-components: aarch64
-// [BTI] compile-flags: -Z branch-protection=bti
-// [PACRET] compile-flags: -Z branch-protection=pac-ret
-// [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf
-// [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key
-// compile-flags: --target aarch64-unknown-linux-gnu
+//@ revisions: BTI PACRET LEAF BKEY NONE
+//@ needs-llvm-components: aarch64
+//@ [BTI] compile-flags: -Z branch-protection=bti
+//@ [PACRET] compile-flags: -Z branch-protection=pac-ret
+//@ [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf
+//@ [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key
+//@ compile-flags: --target aarch64-unknown-linux-gnu
 
 #![crate_type = "lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/call-llvm-intrinsics.rs b/tests/codegen/call-llvm-intrinsics.rs
index 11f2917717c..dc7e0249cb6 100644
--- a/tests/codegen/call-llvm-intrinsics.rs
+++ b/tests/codegen/call-llvm-intrinsics.rs
@@ -1,7 +1,7 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
-// ignore-riscv64
-// ignore-loongarch64
+//@ ignore-riscv64
+//@ ignore-loongarch64
 
 #![feature(link_llvm_intrinsics)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/call-metadata.rs b/tests/codegen/call-metadata.rs
index 07cc0c96371..b2168990ff8 100644
--- a/tests/codegen/call-metadata.rs
+++ b/tests/codegen/call-metadata.rs
@@ -1,7 +1,7 @@
 // Checks that range metadata gets emitted on calls to functions returning a
 // scalar value.
 
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/catch-unwind.rs b/tests/codegen/catch-unwind.rs
index 6b63b83ef45..4e1f9a88e95 100644
--- a/tests/codegen/catch-unwind.rs
+++ b/tests/codegen/catch-unwind.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 // On x86 the closure is inlined in foo() producing something like
 // define i32 @foo() [...] {
@@ -7,11 +7,11 @@
 // }
 // On riscv the closure is another function, placed before fn foo so CHECK can't
 // find it
-// ignore-riscv64 FIXME
+//@ ignore-riscv64 FIXME
 // On s390x the closure is also in another function
-// ignore-s390x FIXME
+//@ ignore-s390x FIXME
 // On loongarch64 the closure is also in another function
-// ignore-loongarch64 FIXME
+//@ ignore-loongarch64 FIXME
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/cdylib-external-inline-fns.rs b/tests/codegen/cdylib-external-inline-fns.rs
index 9118afd43d8..2e472ea68e8 100644
--- a/tests/codegen/cdylib-external-inline-fns.rs
+++ b/tests/codegen/cdylib-external-inline-fns.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "cdylib"]
 
diff --git a/tests/codegen/cf-protection.rs b/tests/codegen/cf-protection.rs
index ccbc863f571..5120bbf114d 100644
--- a/tests/codegen/cf-protection.rs
+++ b/tests/codegen/cf-protection.rs
@@ -1,13 +1,13 @@
 // Test that the correct module flags are emitted with different control-flow protection flags.
 
-// revisions: undefined none branch return full
-// needs-llvm-components: x86
-// [undefined] compile-flags:
-// [none] compile-flags: -Z cf-protection=none
-// [branch] compile-flags: -Z cf-protection=branch
-// [return] compile-flags: -Z cf-protection=return
-// [full] compile-flags: -Z cf-protection=full
-// compile-flags: --target x86_64-unknown-linux-gnu
+//@ revisions: undefined none branch return full
+//@ needs-llvm-components: x86
+//@ [undefined] compile-flags:
+//@ [none] compile-flags: -Z cf-protection=none
+//@ [branch] compile-flags: -Z cf-protection=branch
+//@ [return] compile-flags: -Z cf-protection=return
+//@ [full] compile-flags: -Z cf-protection=full
+//@ compile-flags: --target x86_64-unknown-linux-gnu
 
 #![crate_type = "lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/cffi/c-variadic-opt.rs b/tests/codegen/cffi/c-variadic-opt.rs
index 969dce80f58..7e544ee7f37 100644
--- a/tests/codegen/cffi/c-variadic-opt.rs
+++ b/tests/codegen/cffi/c-variadic-opt.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 #![feature(c_variadic)]
diff --git a/tests/codegen/cffi/c-variadic.rs b/tests/codegen/cffi/c-variadic.rs
index cab32652210..74aed36a8a1 100644
--- a/tests/codegen/cffi/c-variadic.rs
+++ b/tests/codegen/cffi/c-variadic.rs
@@ -1,5 +1,5 @@
-// ignore-wasm32-bare compiled with panic=abort by default
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/cffi/ffi-const.rs b/tests/codegen/cffi/ffi-const.rs
index 93720503480..8044ad105d5 100644
--- a/tests/codegen/cffi/ffi-const.rs
+++ b/tests/codegen/cffi/ffi-const.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 #![crate_type = "lib"]
 #![feature(ffi_const)]
 
diff --git a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
index 099726b2f08..7eda6cf4d57 100644
--- a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
+++ b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
@@ -1,8 +1,8 @@
 // Regression test for #29988
 
-// compile-flags: -C no-prepopulate-passes
-// only-x86_64
-// ignore-windows
+//@ compile-flags: -C no-prepopulate-passes
+//@ only-x86_64
+//@ ignore-windows
 
 #[repr(C)]
 struct S {
diff --git a/tests/codegen/cffi/ffi-pure.rs b/tests/codegen/cffi/ffi-pure.rs
index 2ed73581358..51135fd3753 100644
--- a/tests/codegen/cffi/ffi-pure.rs
+++ b/tests/codegen/cffi/ffi-pure.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 #![crate_type = "lib"]
 #![feature(ffi_pure)]
 
diff --git a/tests/codegen/cfguard-checks.rs b/tests/codegen/cfguard-checks.rs
index 571a2654bcb..2b09a5fe12c 100644
--- a/tests/codegen/cfguard-checks.rs
+++ b/tests/codegen/cfguard-checks.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C control-flow-guard=checks
-// only-msvc
+//@ compile-flags: -C control-flow-guard=checks
+//@ only-msvc
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cfguard-disabled.rs b/tests/codegen/cfguard-disabled.rs
index c3f8f411681..105e0207261 100644
--- a/tests/codegen/cfguard-disabled.rs
+++ b/tests/codegen/cfguard-disabled.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C control-flow-guard=no
-// only-msvc
+//@ compile-flags: -C control-flow-guard=no
+//@ only-msvc
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cfguard-nochecks.rs b/tests/codegen/cfguard-nochecks.rs
index 3847c3e81ed..0443880d72d 100644
--- a/tests/codegen/cfguard-nochecks.rs
+++ b/tests/codegen/cfguard-nochecks.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C control-flow-guard=nochecks
-// only-msvc
+//@ compile-flags: -C control-flow-guard=nochecks
+//@ only-msvc
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cfguard-non-msvc.rs b/tests/codegen/cfguard-non-msvc.rs
index 6278a951e35..5d266de8a94 100644
--- a/tests/codegen/cfguard-non-msvc.rs
+++ b/tests/codegen/cfguard-non-msvc.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C control-flow-guard
-// ignore-msvc
+//@ compile-flags: -C control-flow-guard
+//@ ignore-msvc
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/char-ascii-branchless.rs b/tests/codegen/char-ascii-branchless.rs
index b612b24c7c7..76d2f617ed1 100644
--- a/tests/codegen/char-ascii-branchless.rs
+++ b/tests/codegen/char-ascii-branchless.rs
@@ -1,6 +1,6 @@
 // Checks that these functions are branchless.
 //
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/codemodels.rs b/tests/codegen/codemodels.rs
index 2328f5feb4e..06d2eade78a 100644
--- a/tests/codegen/codemodels.rs
+++ b/tests/codegen/codemodels.rs
@@ -1,11 +1,11 @@
-// only-x86_64
+//@ only-x86_64
 
-// revisions: NOMODEL MODEL-SMALL MODEL-KERNEL MODEL-MEDIUM MODEL-LARGE
-//[NOMODEL] compile-flags:
-//[MODEL-SMALL] compile-flags: -C code-model=small
-//[MODEL-KERNEL] compile-flags: -C code-model=kernel
-//[MODEL-MEDIUM] compile-flags: -C code-model=medium
-//[MODEL-LARGE] compile-flags: -C code-model=large
+//@ revisions: NOMODEL MODEL-SMALL MODEL-KERNEL MODEL-MEDIUM MODEL-LARGE
+//@[NOMODEL] compile-flags:
+//@[MODEL-SMALL] compile-flags: -C code-model=small
+//@[MODEL-KERNEL] compile-flags: -C code-model=kernel
+//@[MODEL-MEDIUM] compile-flags: -C code-model=medium
+//@[MODEL-LARGE] compile-flags: -C code-model=large
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/coercions.rs b/tests/codegen/coercions.rs
index d645ca6b13a..a205e541df1 100644
--- a/tests/codegen/coercions.rs
+++ b/tests/codegen/coercions.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cold-call-declare-and-call.rs b/tests/codegen/cold-call-declare-and-call.rs
index 572dc407f51..cd41c0a6dfb 100644
--- a/tests/codegen/cold-call-declare-and-call.rs
+++ b/tests/codegen/cold-call-declare-and-call.rs
@@ -1,8 +1,8 @@
-// revisions: NORMAL WINDOWS
-// compile-flags: -C no-prepopulate-passes
-//[NORMAL] ignore-windows
-//[WINDOWS] only-windows
-//[WINDOWS] only-x86_64
+//@ revisions: NORMAL WINDOWS
+//@ compile-flags: -C no-prepopulate-passes
+//@[NORMAL] ignore-windows
+//@[WINDOWS] only-windows
+//@[WINDOWS] only-x86_64
 
 #![crate_type = "lib"]
 #![feature(rust_cold_cc)]
diff --git a/tests/codegen/comparison-operators-2-tuple.rs b/tests/codegen/comparison-operators-2-tuple.rs
index 633cfe3a8ac..8e2915e84eb 100644
--- a/tests/codegen/comparison-operators-2-tuple.rs
+++ b/tests/codegen/comparison-operators-2-tuple.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=1 -Z merge-functions=disabled
-// only-x86_64
+//@ compile-flags: -C opt-level=1 -Z merge-functions=disabled
+//@ only-x86_64
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/comparison-operators-newtype.rs b/tests/codegen/comparison-operators-newtype.rs
index 8fd8a81dfeb..d336c4e6ed3 100644
--- a/tests/codegen/comparison-operators-newtype.rs
+++ b/tests/codegen/comparison-operators-newtype.rs
@@ -2,7 +2,7 @@
 // This double-checks that the `Option<Ordering>` intermediate values used
 // in the operators for such a type all optimize away.
 
-// compile-flags: -C opt-level=1
+//@ compile-flags: -C opt-level=1
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/const_scalar_pair.rs b/tests/codegen/const_scalar_pair.rs
index aa4cf7a64d5..0aa430a8efa 100644
--- a/tests/codegen/const_scalar_pair.rs
+++ b/tests/codegen/const_scalar_pair.rs
@@ -1,4 +1,4 @@
-// compile-flags: --crate-type=lib -Copt-level=0 -Zmir-opt-level=0 -C debuginfo=2
+//@ compile-flags: --crate-type=lib -Copt-level=0 -Zmir-opt-level=0 -C debuginfo=2
 
 #![feature(inline_const)]
 
diff --git a/tests/codegen/consts.rs b/tests/codegen/consts.rs
index 3797e1a99da..93c58c37c28 100644
--- a/tests/codegen/consts.rs
+++ b/tests/codegen/consts.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/coroutine-debug-msvc.rs b/tests/codegen/coroutine-debug-msvc.rs
index 6d16e7576c1..fb1b46fe497 100644
--- a/tests/codegen/coroutine-debug-msvc.rs
+++ b/tests/codegen/coroutine-debug-msvc.rs
@@ -4,8 +4,8 @@
 //  - Other fields are not marked artificial
 //
 //
-// compile-flags: -C debuginfo=2
-// only-msvc
+//@ compile-flags: -C debuginfo=2
+//@ only-msvc
 
 #![feature(coroutines, coroutine_trait)]
 use std::ops::Coroutine;
diff --git a/tests/codegen/coroutine-debug.rs b/tests/codegen/coroutine-debug.rs
index b060f3bfac7..7eaee669559 100644
--- a/tests/codegen/coroutine-debug.rs
+++ b/tests/codegen/coroutine-debug.rs
@@ -4,8 +4,8 @@
 //  - Other fields are not marked artificial
 //
 //
-// compile-flags: -C debuginfo=2 --edition=2018
-// ignore-msvc
+//@ compile-flags: -C debuginfo=2 --edition=2018
+//@ ignore-msvc
 
 #![feature(coroutines, coroutine_trait)]
 use std::ops::Coroutine;
diff --git a/tests/codegen/cross-crate-inlining/always-inline.rs b/tests/codegen/cross-crate-inlining/always-inline.rs
index f3f08bf116a..d3a35dadb67 100644
--- a/tests/codegen/cross-crate-inlining/always-inline.rs
+++ b/tests/codegen/cross-crate-inlining/always-inline.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// aux-build:always.rs
+//@ compile-flags: -O
+//@ aux-build:always.rs
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cross-crate-inlining/auxiliary/always.rs b/tests/codegen/cross-crate-inlining/auxiliary/always.rs
index 3670307ec81..7f524e17d34 100644
--- a/tests/codegen/cross-crate-inlining/auxiliary/always.rs
+++ b/tests/codegen/cross-crate-inlining/auxiliary/always.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Zcross-crate-inline-threshold=always
+//@ compile-flags: -O -Zcross-crate-inline-threshold=always
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs b/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs
index 963f087f22d..5895812b5ee 100644
--- a/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs
+++ b/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cross-crate-inlining/auxiliary/never.rs b/tests/codegen/cross-crate-inlining/auxiliary/never.rs
index e222a6dea38..3a391608df8 100644
--- a/tests/codegen/cross-crate-inlining/auxiliary/never.rs
+++ b/tests/codegen/cross-crate-inlining/auxiliary/never.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Zcross-crate-inline-threshold=never
+//@ compile-flags: -O -Zcross-crate-inline-threshold=never
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cross-crate-inlining/leaf-inlining.rs b/tests/codegen/cross-crate-inlining/leaf-inlining.rs
index 73b1a520b06..b47898f750a 100644
--- a/tests/codegen/cross-crate-inlining/leaf-inlining.rs
+++ b/tests/codegen/cross-crate-inlining/leaf-inlining.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Zcross-crate-inline-threshold=yes
-// aux-build:leaf.rs
+//@ compile-flags: -O -Zcross-crate-inline-threshold=yes
+//@ aux-build:leaf.rs
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/cross-crate-inlining/never-inline.rs b/tests/codegen/cross-crate-inlining/never-inline.rs
index 4e7bc3e5154..eedf90ceec0 100644
--- a/tests/codegen/cross-crate-inlining/never-inline.rs
+++ b/tests/codegen/cross-crate-inlining/never-inline.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// aux-build:never.rs
+//@ compile-flags: -O
+//@ aux-build:never.rs
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/dealloc-no-unwind.rs b/tests/codegen/dealloc-no-unwind.rs
index c2656908f16..667f6fea185 100644
--- a/tests/codegen/dealloc-no-unwind.rs
+++ b/tests/codegen/dealloc-no-unwind.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/debug-accessibility/crate-enum.rs b/tests/codegen/debug-accessibility/crate-enum.rs
index eeea18dd815..c80700d7b28 100644
--- a/tests/codegen/debug-accessibility/crate-enum.rs
+++ b/tests/codegen/debug-accessibility/crate-enum.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 // ignore-tidy-linelength
 
 #![allow(dead_code)]
diff --git a/tests/codegen/debug-accessibility/crate-struct.rs b/tests/codegen/debug-accessibility/crate-struct.rs
index 68d126a3478..73a8ce852ed 100644
--- a/tests/codegen/debug-accessibility/crate-struct.rs
+++ b/tests/codegen/debug-accessibility/crate-struct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 
 #![allow(dead_code)]
 
diff --git a/tests/codegen/debug-accessibility/private-enum.rs b/tests/codegen/debug-accessibility/private-enum.rs
index 7f81026ddec..22d49a40eff 100644
--- a/tests/codegen/debug-accessibility/private-enum.rs
+++ b/tests/codegen/debug-accessibility/private-enum.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 // ignore-tidy-linelength
 
 #![allow(dead_code)]
diff --git a/tests/codegen/debug-accessibility/private-struct.rs b/tests/codegen/debug-accessibility/private-struct.rs
index 43b260f9024..488a680e81c 100644
--- a/tests/codegen/debug-accessibility/private-struct.rs
+++ b/tests/codegen/debug-accessibility/private-struct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 
 #![allow(dead_code)]
 
diff --git a/tests/codegen/debug-accessibility/public-enum.rs b/tests/codegen/debug-accessibility/public-enum.rs
index 29ae5fd6421..f16ccf1a3c9 100644
--- a/tests/codegen/debug-accessibility/public-enum.rs
+++ b/tests/codegen/debug-accessibility/public-enum.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 // ignore-tidy-linelength
 
 #![allow(dead_code)]
diff --git a/tests/codegen/debug-accessibility/public-struct.rs b/tests/codegen/debug-accessibility/public-struct.rs
index e7cd9b40d09..8b2a53f993c 100644
--- a/tests/codegen/debug-accessibility/public-struct.rs
+++ b/tests/codegen/debug-accessibility/public-struct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 
 #![allow(dead_code)]
 
diff --git a/tests/codegen/debug-accessibility/struct-fields.rs b/tests/codegen/debug-accessibility/struct-fields.rs
index 76831bdc6c6..f68bb3438be 100644
--- a/tests/codegen/debug-accessibility/struct-fields.rs
+++ b/tests/codegen/debug-accessibility/struct-fields.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 
 #![allow(dead_code)]
 
diff --git a/tests/codegen/debug-accessibility/super-enum.rs b/tests/codegen/debug-accessibility/super-enum.rs
index 9d83fb45bd0..1b6d7d793ed 100644
--- a/tests/codegen/debug-accessibility/super-enum.rs
+++ b/tests/codegen/debug-accessibility/super-enum.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 // ignore-tidy-linelength
 
 #![allow(dead_code)]
diff --git a/tests/codegen/debug-accessibility/super-struct.rs b/tests/codegen/debug-accessibility/super-struct.rs
index 481006c3965..63954bfb203 100644
--- a/tests/codegen/debug-accessibility/super-struct.rs
+++ b/tests/codegen/debug-accessibility/super-struct.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 
 #![allow(dead_code)]
 
diff --git a/tests/codegen/debug-accessibility/tuple-fields.rs b/tests/codegen/debug-accessibility/tuple-fields.rs
index 1163ba2c7c3..feec6e9eb41 100644
--- a/tests/codegen/debug-accessibility/tuple-fields.rs
+++ b/tests/codegen/debug-accessibility/tuple-fields.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 
 #![allow(dead_code)]
 
diff --git a/tests/codegen/debug-alignment.rs b/tests/codegen/debug-alignment.rs
index f6c1062e0fc..02fe05832a3 100644
--- a/tests/codegen/debug-alignment.rs
+++ b/tests/codegen/debug-alignment.rs
@@ -1,6 +1,6 @@
 // Verifies that DWARF alignment is specified properly.
 //
-// compile-flags: -C debuginfo=2
+//@ compile-flags: -C debuginfo=2
 #![crate_type = "lib"]
 
 // CHECK: !DIGlobalVariable
diff --git a/tests/codegen/debug-column-msvc.rs b/tests/codegen/debug-column-msvc.rs
index aad8b372a8a..39f77f41329 100644
--- a/tests/codegen/debug-column-msvc.rs
+++ b/tests/codegen/debug-column-msvc.rs
@@ -1,7 +1,7 @@
 // Verify that no column information is emitted for MSVC targets
 //
-// only-msvc
-// compile-flags: -C debuginfo=2
+//@ only-msvc
+//@ compile-flags: -C debuginfo=2
 
 // CHECK-NOT: !DILexicalBlock({{.*}}column: {{.*}})
 // CHECK-NOT: !DILocation({{.*}}column: {{.*}})
diff --git a/tests/codegen/debug-column.rs b/tests/codegen/debug-column.rs
index f3b19a2eb2f..ff25fbe1b13 100644
--- a/tests/codegen/debug-column.rs
+++ b/tests/codegen/debug-column.rs
@@ -1,7 +1,7 @@
 // Verify that debuginfo column numbers are 1-based byte offsets.
 //
-// ignore-windows
-// compile-flags: -C debuginfo=2
+//@ ignore-windows
+//@ compile-flags: -C debuginfo=2
 
 fn main() {
     unsafe {
diff --git a/tests/codegen/debug-compile-unit-path.rs b/tests/codegen/debug-compile-unit-path.rs
index 3661be046d0..4be418d6610 100644
--- a/tests/codegen/debug-compile-unit-path.rs
+++ b/tests/codegen/debug-compile-unit-path.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g --remap-path-prefix={{cwd}}=/cwd/ --remap-path-prefix={{src-base}}=/base/
+//@ compile-flags: -g --remap-path-prefix={{cwd}}=/cwd/ --remap-path-prefix={{src-base}}=/base/
 //
 //
 // Ensure that we remap the compile unit directory and that we set it to the compilers current
diff --git a/tests/codegen/debug-fndef-size.rs b/tests/codegen/debug-fndef-size.rs
index 80eb35fa32a..b3cc45614bc 100644
--- a/tests/codegen/debug-fndef-size.rs
+++ b/tests/codegen/debug-fndef-size.rs
@@ -1,6 +1,6 @@
 // Verify that `i32::cmp` FnDef type is declared with size 0 and align 1 in LLVM debuginfo.
-// compile-flags: -O -g -Cno-prepopulate-passes
-// ignore-msvc the types are mangled differently
+//@ compile-flags: -O -g -Cno-prepopulate-passes
+//@ ignore-msvc the types are mangled differently
 
 use std::cmp::Ordering;
 
diff --git a/tests/codegen/debug-limited.rs b/tests/codegen/debug-limited.rs
index 48d676887fd..89a4ef0ca90 100644
--- a/tests/codegen/debug-limited.rs
+++ b/tests/codegen/debug-limited.rs
@@ -1,6 +1,6 @@
 // Verify that the limited debuginfo option emits llvm's FullDebugInfo, but no type info.
 //
-// compile-flags: -C debuginfo=limited
+//@ compile-flags: -C debuginfo=limited
 
 #[repr(C)]
 struct StructType {
diff --git a/tests/codegen/debug-line-directives-only.rs b/tests/codegen/debug-line-directives-only.rs
index 750bdd49de0..709c8789bf8 100644
--- a/tests/codegen/debug-line-directives-only.rs
+++ b/tests/codegen/debug-line-directives-only.rs
@@ -1,6 +1,6 @@
 // Verify that the only debuginfo generated are the line directives.
 //
-// compile-flags: -C debuginfo=line-directives-only
+//@ compile-flags: -C debuginfo=line-directives-only
 
 #[repr(C)]
 struct StructType {
diff --git a/tests/codegen/debug-line-tables-only.rs b/tests/codegen/debug-line-tables-only.rs
index 3ed165a6f69..d50bffe6e60 100644
--- a/tests/codegen/debug-line-tables-only.rs
+++ b/tests/codegen/debug-line-tables-only.rs
@@ -1,6 +1,6 @@
 // Verify that the only debuginfo generated are the line tables.
 //
-// compile-flags: -C debuginfo=line-tables-only
+//@ compile-flags: -C debuginfo=line-tables-only
 
 #[repr(C)]
 struct StructType {
diff --git a/tests/codegen/debug-linkage-name.rs b/tests/codegen/debug-linkage-name.rs
index 9bf4d521fc0..e706040f331 100644
--- a/tests/codegen/debug-linkage-name.rs
+++ b/tests/codegen/debug-linkage-name.rs
@@ -1,8 +1,8 @@
 // Verifies that linkage name is omitted when it is
 // the same as variable / function name.
 //
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
-// compile-flags: -C debuginfo=2 -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C debuginfo=2 -Copt-level=0
 #![crate_type = "lib"]
 
 pub mod xyz {
diff --git a/tests/codegen/debug-vtable.rs b/tests/codegen/debug-vtable.rs
index e52392b260b..036fff6cd23 100644
--- a/tests/codegen/debug-vtable.rs
+++ b/tests/codegen/debug-vtable.rs
@@ -6,7 +6,7 @@
 // legacy mangling scheme rustc version and generic parameters are both hashed into a single part
 // of the name, thus randomizing item order with respect to rustc version.
 
-// compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0
+//@ compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0
 // ignore-tidy-linelength
 
 // Make sure that vtables don't have the unnamed_addr attribute when debuginfo is enabled.
diff --git a/tests/codegen/debuginfo-constant-locals.rs b/tests/codegen/debuginfo-constant-locals.rs
index 95a1b8c9d21..f607e0dd08b 100644
--- a/tests/codegen/debuginfo-constant-locals.rs
+++ b/tests/codegen/debuginfo-constant-locals.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -O
+//@ compile-flags: -g -O
 
 // Check that simple constant values are preserved in debuginfo across both MIR opts and LLVM opts
 
diff --git a/tests/codegen/debuginfo-generic-closure-env-names.rs b/tests/codegen/debuginfo-generic-closure-env-names.rs
index b29f8b4a029..04ff7fff439 100644
--- a/tests/codegen/debuginfo-generic-closure-env-names.rs
+++ b/tests/codegen/debuginfo-generic-closure-env-names.rs
@@ -15,7 +15,7 @@
 // legacy mangling scheme rustc version and generic parameters are both hashed into a single part
 // of the name, thus randomizing item order with respect to rustc version.
 
-// compile-flags: -Cdebuginfo=2 --edition 2021 -Copt-level=0 -Csymbol-mangling-version=v0
+//@ compile-flags: -Cdebuginfo=2 --edition 2021 -Copt-level=0 -Csymbol-mangling-version=v0
 
 // non_generic_closure()
 // NONMSVC: !DICompositeType(tag: DW_TAG_structure_type, name: "{closure_env#0}", scope: ![[non_generic_closure_NAMESPACE:[0-9]+]],
diff --git a/tests/codegen/debuginfo-inline-callsite-location.rs b/tests/codegen/debuginfo-inline-callsite-location.rs
index d529f9ccead..833e8c0df91 100644
--- a/tests/codegen/debuginfo-inline-callsite-location.rs
+++ b/tests/codegen/debuginfo-inline-callsite-location.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -O
+//@ compile-flags: -g -O
 
 // Check that each inline call site for the same function uses the same "sub-program" so that LLVM
 // can correctly merge the debug info if it merges the inlined code (e.g., for merging of tail
diff --git a/tests/codegen/deduced-param-attrs.rs b/tests/codegen/deduced-param-attrs.rs
index 153046eef3c..5e7c571b63f 100644
--- a/tests/codegen/deduced-param-attrs.rs
+++ b/tests/codegen/deduced-param-attrs.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 #![allow(incomplete_features)]
diff --git a/tests/codegen/default-hidden-visibility.rs b/tests/codegen/default-hidden-visibility.rs
index 9e5e545f0d9..2bea8f62a40 100644
--- a/tests/codegen/default-hidden-visibility.rs
+++ b/tests/codegen/default-hidden-visibility.rs
@@ -3,9 +3,9 @@
 // also https://github.com/rust-lang/rust/issues/73295 and
 // https://github.com/rust-lang/rust/issues/37530.
 
-// revisions:DEFAULT YES NO
-//[YES] compile-flags: -Zdefault-hidden-visibility=yes
-//[NO]  compile-flags: -Zdefault-hidden-visibility=no
+//@ revisions:DEFAULT YES NO
+//@[YES] compile-flags: -Zdefault-hidden-visibility=yes
+//@[NO]  compile-flags: -Zdefault-hidden-visibility=no
 
 // The test scenario is specifically about visibility of symbols exported out of dynamically linked
 // libraries.
@@ -24,7 +24,7 @@ pub static tested_symbol: [u8; 6] = *b"foobar";
 // additional targets can be covered by adding copies of this test file with
 // a different `only-X` directive.
 //
-//     only-x86_64-unknown-linux-gnu
+//@     only-x86_64-unknown-linux-gnu
 
 // DEFAULT: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = constant
 // YES:     @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = hidden constant
diff --git a/tests/codegen/default-requires-uwtable.rs b/tests/codegen/default-requires-uwtable.rs
index 26424f03568..567bd55ecc3 100644
--- a/tests/codegen/default-requires-uwtable.rs
+++ b/tests/codegen/default-requires-uwtable.rs
@@ -1,9 +1,9 @@
-// revisions: WINDOWS ANDROID
-// compile-flags: -C panic=abort -Copt-level=0
-// [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc
-// [WINDOWS] needs-llvm-components: x86
-// [ANDROID] compile-flags: --target=armv7-linux-androideabi
-// [ANDROID] needs-llvm-components: arm
+//@ revisions: WINDOWS ANDROID
+//@ compile-flags: -C panic=abort -Copt-level=0
+//@ [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc
+//@ [WINDOWS] needs-llvm-components: x86
+//@ [ANDROID] compile-flags: --target=armv7-linux-androideabi
+//@ [ANDROID] needs-llvm-components: arm
 
 #![feature(no_core, lang_items)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/direct-access-external-data.rs b/tests/codegen/direct-access-external-data.rs
index ec4bfc33518..5b2ff41ef05 100644
--- a/tests/codegen/direct-access-external-data.rs
+++ b/tests/codegen/direct-access-external-data.rs
@@ -1,9 +1,9 @@
-// only-loongarch64-unknown-linux-gnu
+//@ only-loongarch64-unknown-linux-gnu
 
-// revisions: DEFAULT DIRECT INDIRECT
-// [DEFAULT] compile-flags: -C relocation-model=static
-// [DIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=yes
-// [INDIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=no
+//@ revisions: DEFAULT DIRECT INDIRECT
+//@ [DEFAULT] compile-flags: -C relocation-model=static
+//@ [DIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=yes
+//@ [INDIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=no
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/dllimports/auxiliary/dummy.rs b/tests/codegen/dllimports/auxiliary/dummy.rs
index 113a164f145..ab3dbc6a300 100644
--- a/tests/codegen/dllimports/auxiliary/dummy.rs
+++ b/tests/codegen/dllimports/auxiliary/dummy.rs
@@ -1,4 +1,4 @@
-// no-prefer-dynamic
+//@ no-prefer-dynamic
 #![crate_type = "staticlib"]
 
 // Since codegen tests don't actually perform linking, this library doesn't need to export
diff --git a/tests/codegen/dllimports/auxiliary/wrapper.rs b/tests/codegen/dllimports/auxiliary/wrapper.rs
index 7aa90920a3e..7d1f6ab70d5 100644
--- a/tests/codegen/dllimports/auxiliary/wrapper.rs
+++ b/tests/codegen/dllimports/auxiliary/wrapper.rs
@@ -1,4 +1,4 @@
-// no-prefer-dynamic
+//@ no-prefer-dynamic
 #![crate_type = "rlib"]
 
 #[link(name = "dummy", kind="dylib")]
diff --git a/tests/codegen/dllimports/main.rs b/tests/codegen/dllimports/main.rs
index 383940e9590..c1626853b16 100644
--- a/tests/codegen/dllimports/main.rs
+++ b/tests/codegen/dllimports/main.rs
@@ -1,9 +1,9 @@
  // This test is for *-windows-msvc only.
-// only-windows
-// ignore-gnu
+//@ only-windows
+//@ ignore-gnu
 
-// aux-build:dummy.rs
-// aux-build:wrapper.rs
+//@ aux-build:dummy.rs
+//@ aux-build:wrapper.rs
 
 extern crate wrapper;
 
diff --git a/tests/codegen/drop-in-place-noalias.rs b/tests/codegen/drop-in-place-noalias.rs
index ece1e426c08..36532ea8f53 100644
--- a/tests/codegen/drop-in-place-noalias.rs
+++ b/tests/codegen/drop-in-place-noalias.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 // Tests that the compiler can apply `noalias` and other &mut attributes to `drop_in_place`.
 // Note that non-Unpin types should not get `noalias`, matching &mut behavior.
diff --git a/tests/codegen/drop.rs b/tests/codegen/drop.rs
index 14b5840e2fe..93e54979a05 100644
--- a/tests/codegen/drop.rs
+++ b/tests/codegen/drop.rs
@@ -1,6 +1,6 @@
-// ignore-wasm32-bare compiled with panic=abort by default
-// needs-unwind - this test verifies the amount of drop calls when unwinding is used
-// compile-flags: -C no-prepopulate-passes
+//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ needs-unwind - this test verifies the amount of drop calls when unwinding is used
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/dst-vtable-align-nonzero.rs b/tests/codegen/dst-vtable-align-nonzero.rs
index 54f6e7f992f..b0507f4c217 100644
--- a/tests/codegen/dst-vtable-align-nonzero.rs
+++ b/tests/codegen/dst-vtable-align-nonzero.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Z merge-functions=disabled
+//@ compile-flags: -O -Z merge-functions=disabled
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/dst-vtable-size-range.rs b/tests/codegen/dst-vtable-size-range.rs
index 671c8abdebd..69d8e68497c 100644
--- a/tests/codegen/dst-vtable-size-range.rs
+++ b/tests/codegen/dst-vtable-size-range.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Z merge-functions=disabled
+//@ compile-flags: -O -Z merge-functions=disabled
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/ehcontguard_disabled.rs b/tests/codegen/ehcontguard_disabled.rs
index 7773384e5ea..dc4b5eb430b 100644
--- a/tests/codegen/ehcontguard_disabled.rs
+++ b/tests/codegen/ehcontguard_disabled.rs
@@ -1,4 +1,4 @@
-// compile-flags:
+//@ compile-flags:
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/ehcontguard_enabled.rs b/tests/codegen/ehcontguard_enabled.rs
index 03aaa342b96..fde66f1c148 100644
--- a/tests/codegen/ehcontguard_enabled.rs
+++ b/tests/codegen/ehcontguard_enabled.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Z ehcont-guard
+//@ compile-flags: -Z ehcont-guard
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/enable-lto-unit-splitting.rs b/tests/codegen/enable-lto-unit-splitting.rs
index 7daa05f69d1..e4698094477 100644
--- a/tests/codegen/enable-lto-unit-splitting.rs
+++ b/tests/codegen/enable-lto-unit-splitting.rs
@@ -1,6 +1,6 @@
 // Verifies that "EnableSplitLTOUnit" module flag is added.
 //
-// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
+//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/enum/enum-bounds-check-derived-idx.rs b/tests/codegen/enum/enum-bounds-check-derived-idx.rs
index aa66c2ed08e..15280cb2e6c 100644
--- a/tests/codegen/enum/enum-bounds-check-derived-idx.rs
+++ b/tests/codegen/enum/enum-bounds-check-derived-idx.rs
@@ -1,6 +1,6 @@
 // This test checks an optimization that is not guaranteed to work. This test case should not block
 // a future LLVM update.
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/enum/enum-bounds-check-issue-13926.rs b/tests/codegen/enum/enum-bounds-check-issue-13926.rs
index b26945bc549..b60ff38ce39 100644
--- a/tests/codegen/enum/enum-bounds-check-issue-13926.rs
+++ b/tests/codegen/enum/enum-bounds-check-issue-13926.rs
@@ -1,6 +1,6 @@
 // This test checks an optimization that is not guaranteed to work. This test case should not block
 // a future LLVM update.
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/enum/enum-bounds-check-issue-82871.rs b/tests/codegen/enum/enum-bounds-check-issue-82871.rs
index 32fdc4a5f4f..3b8a146838a 100644
--- a/tests/codegen/enum/enum-bounds-check-issue-82871.rs
+++ b/tests/codegen/enum/enum-bounds-check-issue-82871.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=0
+//@ compile-flags: -C opt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/enum/enum-bounds-check.rs b/tests/codegen/enum/enum-bounds-check.rs
index 17322d5911b..a1b32ec9295 100644
--- a/tests/codegen/enum/enum-bounds-check.rs
+++ b/tests/codegen/enum/enum-bounds-check.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/enum/enum-debug-clike.rs b/tests/codegen/enum/enum-debug-clike.rs
index 1e369a2c4e6..205c57d1456 100644
--- a/tests/codegen/enum/enum-debug-clike.rs
+++ b/tests/codegen/enum/enum-debug-clike.rs
@@ -2,9 +2,9 @@
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 //
-// ignore-msvc
+//@ ignore-msvc
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}}
diff --git a/tests/codegen/enum/enum-debug-niche-2.rs b/tests/codegen/enum/enum-debug-niche-2.rs
index 4b607d50574..4315741e0bd 100644
--- a/tests/codegen/enum/enum-debug-niche-2.rs
+++ b/tests/codegen/enum/enum-debug-niche-2.rs
@@ -2,9 +2,9 @@
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 //
-// ignore-msvc
+//@ ignore-msvc
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_variant_part,{{.*}}size: 32,{{.*}}
 // CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Placeholder",{{.*}}extraData: i128 4294967295{{[,)].*}}
diff --git a/tests/codegen/enum/enum-debug-niche.rs b/tests/codegen/enum/enum-debug-niche.rs
index b718a6854dd..fc6a73e8472 100644
--- a/tests/codegen/enum/enum-debug-niche.rs
+++ b/tests/codegen/enum/enum-debug-niche.rs
@@ -1,9 +1,9 @@
 // This tests that optimized enum debug info accurately reflects the enum layout.
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
-// ignore-msvc
+//@ ignore-msvc
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_variant_part,{{.*}}discriminator:{{.*}}
diff --git a/tests/codegen/enum/enum-debug-tagged.rs b/tests/codegen/enum/enum-debug-tagged.rs
index 095c49ac3ac..87a6ccae291 100644
--- a/tests/codegen/enum/enum-debug-tagged.rs
+++ b/tests/codegen/enum/enum-debug-tagged.rs
@@ -1,9 +1,9 @@
 // This tests that debug info for tagged (ordinary) enums is properly emitted.
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
-// ignore-msvc
+//@ ignore-msvc
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "E",{{.*}}
diff --git a/tests/codegen/enum/enum-discriminant-value.rs b/tests/codegen/enum/enum-discriminant-value.rs
index cc14c212002..d6b0c6d6c10 100644
--- a/tests/codegen/enum/enum-discriminant-value.rs
+++ b/tests/codegen/enum/enum-discriminant-value.rs
@@ -1,6 +1,6 @@
 // Verify that DIEnumerator uses isUnsigned flag when appropriate.
 //
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 #[repr(i64)]
 pub enum I64 {
diff --git a/tests/codegen/enum/enum-match.rs b/tests/codegen/enum/enum-match.rs
index 5548cd25147..2e6dad8791b 100644
--- a/tests/codegen/enum/enum-match.rs
+++ b/tests/codegen/enum/enum-match.rs
@@ -1,5 +1,5 @@
-// compile-flags: -Copt-level=1
-// only-x86_64
+//@ compile-flags: -Copt-level=1
+//@ only-x86_64
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/enum/enum-u128.rs b/tests/codegen/enum/enum-u128.rs
index f50d360ac9f..94e80e34068 100644
--- a/tests/codegen/enum/enum-u128.rs
+++ b/tests/codegen/enum/enum-u128.rs
@@ -2,9 +2,9 @@
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 //
-// ignore-msvc
+//@ ignore-msvc
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "Foo",{{.*}}flags: DIFlagEnumClass,{{.*}}
diff --git a/tests/codegen/export-no-mangle.rs b/tests/codegen/export-no-mangle.rs
index a89d48ee153..5040684f52e 100644
--- a/tests/codegen/export-no-mangle.rs
+++ b/tests/codegen/export-no-mangle.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/external-no-mangle-fns.rs b/tests/codegen/external-no-mangle-fns.rs
index 70349b2ec4f..35ab0fd7909 100644
--- a/tests/codegen/external-no-mangle-fns.rs
+++ b/tests/codegen/external-no-mangle-fns.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 // `#[no_mangle]`d functions always have external linkage, i.e., no `internal` in their `define`s
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/external-no-mangle-statics.rs b/tests/codegen/external-no-mangle-statics.rs
index 48023a2a901..a44867ff923 100644
--- a/tests/codegen/external-no-mangle-statics.rs
+++ b/tests/codegen/external-no-mangle-statics.rs
@@ -1,8 +1,8 @@
-// revisions: lib staticlib
-// ignore-emscripten default visibility is hidden
-// compile-flags: -O
-// [lib] compile-flags: --crate-type lib
-// [staticlib] compile-flags: --crate-type staticlib
+//@ revisions: lib staticlib
+//@ ignore-emscripten default visibility is hidden
+//@ compile-flags: -O
+//@ [lib] compile-flags: --crate-type lib
+//@ [staticlib] compile-flags: --crate-type staticlib
 // `#[no_mangle]`d static variables always have external linkage, i.e., no `internal` in their
 // definitions
 
diff --git a/tests/codegen/fastcall-inreg.rs b/tests/codegen/fastcall-inreg.rs
index ab19efa45bf..2459ec1539e 100644
--- a/tests/codegen/fastcall-inreg.rs
+++ b/tests/codegen/fastcall-inreg.rs
@@ -2,8 +2,8 @@
 // as "inreg" like the C/C++ compilers for the platforms.
 // x86 only.
 
-// compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes
-// needs-llvm-components: x86
+//@ compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes
+//@ needs-llvm-components: x86
 
 #![crate_type = "lib"]
 #![no_core]
diff --git a/tests/codegen/fatptr.rs b/tests/codegen/fatptr.rs
index 1c49b5714ef..0f13e66fbad 100644
--- a/tests/codegen/fatptr.rs
+++ b/tests/codegen/fatptr.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/fewer-names.rs b/tests/codegen/fewer-names.rs
index 05643fab96a..b14dd30482c 100644
--- a/tests/codegen/fewer-names.rs
+++ b/tests/codegen/fewer-names.rs
@@ -1,7 +1,7 @@
-// compile-flags: -Coverflow-checks=no -O
-// revisions: YES NO
-// [YES]compile-flags: -Zfewer-names=yes
-// [NO] compile-flags: -Zfewer-names=no
+//@ compile-flags: -Coverflow-checks=no -O
+//@ revisions: YES NO
+//@ [YES]compile-flags: -Zfewer-names=yes
+//@ [NO] compile-flags: -Zfewer-names=no
 #![crate_type = "lib"]
 
 #[no_mangle]
diff --git a/tests/codegen/float_math.rs b/tests/codegen/float_math.rs
index 592e09452df..dcca51c2f5e 100644
--- a/tests/codegen/float_math.rs
+++ b/tests/codegen/float_math.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/fn-impl-trait-self.rs b/tests/codegen/fn-impl-trait-self.rs
index 0abc8a409ed..9f10762d8fa 100644
--- a/tests/codegen/fn-impl-trait-self.rs
+++ b/tests/codegen/fn-impl-trait-self.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g
+//@ compile-flags: -g
 //
 // CHECK-LABEL: @main
 // MSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "recursive_type$ (*)()",{{.*}}
diff --git a/tests/codegen/force-frame-pointers.rs b/tests/codegen/force-frame-pointers.rs
index 5791ae47937..c41824e024f 100644
--- a/tests/codegen/force-frame-pointers.rs
+++ b/tests/codegen/force-frame-pointers.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/force-no-unwind-tables.rs b/tests/codegen/force-no-unwind-tables.rs
index 3ee23f05eb2..0189ae7c0a6 100644
--- a/tests/codegen/force-no-unwind-tables.rs
+++ b/tests/codegen/force-no-unwind-tables.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n
-// ignore-windows
+//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n
+//@ ignore-windows
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/force-unwind-tables.rs b/tests/codegen/force-unwind-tables.rs
index c904978c9ff..33fdf7653f4 100644
--- a/tests/codegen/force-unwind-tables.rs
+++ b/tests/codegen/force-unwind-tables.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/frame-pointer.rs b/tests/codegen/frame-pointer.rs
index d8933262e52..879535bcc36 100644
--- a/tests/codegen/frame-pointer.rs
+++ b/tests/codegen/frame-pointer.rs
@@ -1,15 +1,15 @@
-// compile-flags: --crate-type=rlib -Copt-level=0
-// revisions: aarch64-apple aarch64-linux force x64-apple x64-linux
-// [aarch64-apple] needs-llvm-components: aarch64
-// [aarch64-apple] compile-flags: --target=aarch64-apple-darwin
-// [aarch64-linux] needs-llvm-components: aarch64
-// [aarch64-linux] compile-flags: --target=aarch64-unknown-linux-gnu
-// [force] needs-llvm-components: x86
-// [force] compile-flags: --target=x86_64-unknown-linux-gnu -Cforce-frame-pointers=yes
-// [x64-apple] needs-llvm-components: x86
-// [x64-apple] compile-flags: --target=x86_64-apple-darwin
-// [x64-linux] needs-llvm-components: x86
-// [x64-linux] compile-flags: --target=x86_64-unknown-linux-gnu
+//@ compile-flags: --crate-type=rlib -Copt-level=0
+//@ revisions: aarch64-apple aarch64-linux force x64-apple x64-linux
+//@ [aarch64-apple] needs-llvm-components: aarch64
+//@ [aarch64-apple] compile-flags: --target=aarch64-apple-darwin
+//@ [aarch64-linux] needs-llvm-components: aarch64
+//@ [aarch64-linux] compile-flags: --target=aarch64-unknown-linux-gnu
+//@ [force] needs-llvm-components: x86
+//@ [force] compile-flags: --target=x86_64-unknown-linux-gnu -Cforce-frame-pointers=yes
+//@ [x64-apple] needs-llvm-components: x86
+//@ [x64-apple] compile-flags: --target=x86_64-apple-darwin
+//@ [x64-linux] needs-llvm-components: x86
+//@ [x64-linux] compile-flags: --target=x86_64-unknown-linux-gnu
 
 #![feature(no_core, lang_items)]
 #![no_core]
diff --git a/tests/codegen/function-arguments-noopt.rs b/tests/codegen/function-arguments-noopt.rs
index 1bd735cc1af..e99ceddfb72 100644
--- a/tests/codegen/function-arguments-noopt.rs
+++ b/tests/codegen/function-arguments-noopt.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=0 -C no-prepopulate-passes
+//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes
 
 // This test checks that arguments/returns in opt-level=0 builds,
 // while lacking attributes used for optimization, still have ABI-affecting attributes.
diff --git a/tests/codegen/function-arguments.rs b/tests/codegen/function-arguments.rs
index 64ebd3c05af..88cedcf46b6 100644
--- a/tests/codegen/function-arguments.rs
+++ b/tests/codegen/function-arguments.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(dyn_star)]
diff --git a/tests/codegen/function-return.rs b/tests/codegen/function-return.rs
index d832d19ac39..0ca1a41ee86 100644
--- a/tests/codegen/function-return.rs
+++ b/tests/codegen/function-return.rs
@@ -1,13 +1,13 @@
 // Test that the `fn_ret_thunk_extern` function attribute is (not) emitted when
 // the `-Zfunction-return={keep,thunk-extern}` flag is (not) set.
 
-// revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
-// needs-llvm-components: x86
-// compile-flags: --target x86_64-unknown-linux-gnu
-// [keep] compile-flags: -Zfunction-return=keep
-// [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
-// [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
-// [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
+//@ revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
+//@ needs-llvm-components: x86
+//@ compile-flags: --target x86_64-unknown-linux-gnu
+//@ [keep] compile-flags: -Zfunction-return=keep
+//@ [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
+//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
+//@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
 
 #![crate_type = "lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/gdb_debug_script_load.rs b/tests/codegen/gdb_debug_script_load.rs
index 002be8d1b41..f15defeaca8 100644
--- a/tests/codegen/gdb_debug_script_load.rs
+++ b/tests/codegen/gdb_debug_script_load.rs
@@ -1,10 +1,10 @@
 //
-// ignore-windows
-// ignore-macos
-// ignore-wasm
-// ignore-emscripten
+//@ ignore-windows
+//@ ignore-macos
+//@ ignore-wasm
+//@ ignore-emscripten
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 #![feature(start)]
 
diff --git a/tests/codegen/generic-debug.rs b/tests/codegen/generic-debug.rs
index eea16805c59..87a0ddfea93 100644
--- a/tests/codegen/generic-debug.rs
+++ b/tests/codegen/generic-debug.rs
@@ -1,6 +1,6 @@
-// ignore-windows
+//@ ignore-windows
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "Generic<i32>",{{.*}}
diff --git a/tests/codegen/global_asm.rs b/tests/codegen/global_asm.rs
index 4c2ccf4e0e9..32075daa3cf 100644
--- a/tests/codegen/global_asm.rs
+++ b/tests/codegen/global_asm.rs
@@ -1,7 +1,7 @@
-// revisions: x32 x64
-//[x32] only-x86
-//[x64] only-x86_64
-// compile-flags: -C no-prepopulate-passes
+//@ revisions: x32 x64
+//@[x32] only-x86
+//@[x64] only-x86_64
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/global_asm_include.rs b/tests/codegen/global_asm_include.rs
index 0fede8c71e4..98be9c3e333 100644
--- a/tests/codegen/global_asm_include.rs
+++ b/tests/codegen/global_asm_include.rs
@@ -1,7 +1,7 @@
-// revisions: x32 x64
-//[x32] only-x86
-//[x64] only-x86_64
-// compile-flags: -C no-prepopulate-passes
+//@ revisions: x32 x64
+//@[x32] only-x86
+//@[x64] only-x86_64
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/global_asm_x2.rs b/tests/codegen/global_asm_x2.rs
index 1fc2825b2bd..9e3a00f0680 100644
--- a/tests/codegen/global_asm_x2.rs
+++ b/tests/codegen/global_asm_x2.rs
@@ -1,7 +1,7 @@
-// revisions: x32 x64
-//[x32] only-x86
-//[x64] only-x86_64
-// compile-flags: -C no-prepopulate-passes
+//@ revisions: x32 x64
+//@[x32] only-x86
+//@[x64] only-x86_64
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![no_std]
diff --git a/tests/codegen/i128-x86-align.rs b/tests/codegen/i128-x86-align.rs
index aaf5785dc9f..9cc5c3d3ed7 100644
--- a/tests/codegen/i128-x86-align.rs
+++ b/tests/codegen/i128-x86-align.rs
@@ -1,5 +1,5 @@
-// only-x86_64
-// compile-flags: -O -C no-prepopulate-passes --crate-type=lib
+//@ only-x86_64
+//@ compile-flags: -O -C no-prepopulate-passes --crate-type=lib
 
 // On LLVM 17 and earlier LLVM's own data layout specifies that i128 has 8 byte alignment,
 // while rustc wants it to have 16 byte alignment. This test checks that we handle this
diff --git a/tests/codegen/infallible-unwrap-in-opt-z.rs b/tests/codegen/infallible-unwrap-in-opt-z.rs
index e8ab77f8d20..cbcba03ad0a 100644
--- a/tests/codegen/infallible-unwrap-in-opt-z.rs
+++ b/tests/codegen/infallible-unwrap-in-opt-z.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=z --edition=2021
-// ignore-debug
+//@ compile-flags: -C opt-level=z --edition=2021
+//@ ignore-debug
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/inherit_overflow.rs b/tests/codegen/inherit_overflow.rs
index fa9ee0ae12a..f08071aaa61 100644
--- a/tests/codegen/inherit_overflow.rs
+++ b/tests/codegen/inherit_overflow.rs
@@ -1,7 +1,7 @@
-// compile-flags: -Zmir-enable-passes=+Inline,+GVN --crate-type lib
-// revisions: ASSERT NOASSERT
-//[ASSERT] compile-flags: -Coverflow-checks=on
-//[NOASSERT] compile-flags: -Coverflow-checks=off
+//@ compile-flags: -Zmir-enable-passes=+Inline,+GVN --crate-type lib
+//@ revisions: ASSERT NOASSERT
+//@[ASSERT] compile-flags: -Coverflow-checks=on
+//@[NOASSERT] compile-flags: -Coverflow-checks=off
 
 // CHECK-LABEL: define{{.*}} @assertion
 // ASSERT: call void @{{.*4core9panicking5panic}}
diff --git a/tests/codegen/inline-always-works-always.rs b/tests/codegen/inline-always-works-always.rs
index 912af782a8f..e9ca05d1756 100644
--- a/tests/codegen/inline-always-works-always.rs
+++ b/tests/codegen/inline-always-works-always.rs
@@ -1,7 +1,7 @@
-// revisions: NO-OPT SIZE-OPT SPEED-OPT
-//[NO-OPT] compile-flags: -Copt-level=0
-//[SIZE-OPT] compile-flags: -Copt-level=s
-//[SPEED-OPT] compile-flags: -Copt-level=3
+//@ revisions: NO-OPT SIZE-OPT SPEED-OPT
+//@[NO-OPT] compile-flags: -Copt-level=0
+//@[SIZE-OPT] compile-flags: -Copt-level=s
+//@[SPEED-OPT] compile-flags: -Copt-level=3
 
 #![crate_type="rlib"]
 
diff --git a/tests/codegen/inline-debuginfo.rs b/tests/codegen/inline-debuginfo.rs
index 5b230361f39..b6ea489f99f 100644
--- a/tests/codegen/inline-debuginfo.rs
+++ b/tests/codegen/inline-debuginfo.rs
@@ -1,5 +1,5 @@
 #![crate_type="rlib"]
-// compile-flags: -Copt-level=3 -g
+//@ compile-flags: -Copt-level=3 -g
 //
 
 #[no_mangle]
diff --git a/tests/codegen/inline-function-args-debug-info.rs b/tests/codegen/inline-function-args-debug-info.rs
index ffae99e0f24..7263374b22e 100644
--- a/tests/codegen/inline-function-args-debug-info.rs
+++ b/tests/codegen/inline-function-args-debug-info.rs
@@ -2,7 +2,7 @@
 // gets inlined by MIR inlining. Without function argument indexes, `info args` in gdb won't show
 // arguments and their values for the current function.
 
-// compile-flags: -Zinline-mir=yes -Cdebuginfo=2 --edition=2021
+//@ compile-flags: -Zinline-mir=yes -Cdebuginfo=2 --edition=2021
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/inline-hint.rs b/tests/codegen/inline-hint.rs
index bb2a8e6a649..3d46885d5a2 100644
--- a/tests/codegen/inline-hint.rs
+++ b/tests/codegen/inline-hint.rs
@@ -1,7 +1,7 @@
 // Checks that closures, constructors, and shims except
 // for a drop glue receive inline hint by default.
 //
-// compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0 -Zinline-mir=no
+//@ compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0 -Zinline-mir=no
 #![crate_type = "lib"]
 
 pub fn f() {
diff --git a/tests/codegen/instrument-coverage-off.rs b/tests/codegen/instrument-coverage-off.rs
index ca803beec0b..fda3c541a25 100644
--- a/tests/codegen/instrument-coverage-off.rs
+++ b/tests/codegen/instrument-coverage-off.rs
@@ -1,12 +1,12 @@
 // Test that `-Cinstrument-coverage=off` does not add coverage instrumentation to LLVM IR.
 
-// needs-profiler-support
-// revisions: n no off false zero
-// [n] compile-flags: -Cinstrument-coverage=n
-// [no] compile-flags: -Cinstrument-coverage=no
-// [off] compile-flags: -Cinstrument-coverage=off
-// [false] compile-flags: -Cinstrument-coverage=false
-// [zero] compile-flags: -Cinstrument-coverage=0
+//@ needs-profiler-support
+//@ revisions: n no off false zero
+//@ [n] compile-flags: -Cinstrument-coverage=n
+//@ [no] compile-flags: -Cinstrument-coverage=no
+//@ [off] compile-flags: -Cinstrument-coverage=off
+//@ [false] compile-flags: -Cinstrument-coverage=false
+//@ [zero] compile-flags: -Cinstrument-coverage=0
 
 // CHECK-NOT: __llvm_profile_filename
 // CHECK-NOT: __llvm_coverage_mapping
diff --git a/tests/codegen/instrument-coverage.rs b/tests/codegen/instrument-coverage.rs
index f8437dac463..f7d96ea3467 100644
--- a/tests/codegen/instrument-coverage.rs
+++ b/tests/codegen/instrument-coverage.rs
@@ -1,13 +1,13 @@
 // Test that `-Cinstrument-coverage` creates expected __llvm_profile_filename symbol in LLVM IR.
 
-// needs-profiler-support
-// revisions: default y yes on true all
-// [default] compile-flags: -Cinstrument-coverage
-// [y] compile-flags: -Cinstrument-coverage=y
-// [yes] compile-flags: -Cinstrument-coverage=yes
-// [on] compile-flags: -Cinstrument-coverage=on
-// [true] compile-flags: -Cinstrument-coverage=true
-// [all] compile-flags: -Cinstrument-coverage=all
+//@ needs-profiler-support
+//@ revisions: default y yes on true all
+//@ [default] compile-flags: -Cinstrument-coverage
+//@ [y] compile-flags: -Cinstrument-coverage=y
+//@ [yes] compile-flags: -Cinstrument-coverage=yes
+//@ [on] compile-flags: -Cinstrument-coverage=on
+//@ [true] compile-flags: -Cinstrument-coverage=true
+//@ [all] compile-flags: -Cinstrument-coverage=all
 
 // CHECK: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}}
 // CHECK: @__llvm_coverage_mapping
diff --git a/tests/codegen/instrument-mcount.rs b/tests/codegen/instrument-mcount.rs
index 50823775a41..8c97535d4a8 100644
--- a/tests/codegen/instrument-mcount.rs
+++ b/tests/codegen/instrument-mcount.rs
@@ -1,5 +1,5 @@
 //
-// compile-flags: -Z instrument-mcount -Copt-level=0
+//@ compile-flags: -Z instrument-mcount -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/instrument-xray/basic.rs b/tests/codegen/instrument-xray/basic.rs
index 5da878474f2..7aaebf41e36 100644
--- a/tests/codegen/instrument-xray/basic.rs
+++ b/tests/codegen/instrument-xray/basic.rs
@@ -1,7 +1,7 @@
 // Checks that `-Z instrument-xray` produces expected instrumentation.
 //
-// needs-xray
-// compile-flags: -Z instrument-xray=always -Copt-level=0
+//@ needs-xray
+//@ compile-flags: -Z instrument-xray=always -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/instrument-xray/options-combine.rs b/tests/codegen/instrument-xray/options-combine.rs
index d1e56586279..d1e3b78e6b2 100644
--- a/tests/codegen/instrument-xray/options-combine.rs
+++ b/tests/codegen/instrument-xray/options-combine.rs
@@ -1,9 +1,9 @@
 // Checks that `-Z instrument-xray` options can be specified multiple times.
 //
-// needs-xray
-// compile-flags: -Z instrument-xray=skip-exit -Copt-level=0
-// compile-flags: -Z instrument-xray=instruction-threshold=123 -Copt-level=0
-// compile-flags: -Z instrument-xray=instruction-threshold=456 -Copt-level=0
+//@ needs-xray
+//@ compile-flags: -Z instrument-xray=skip-exit -Copt-level=0
+//@ compile-flags: -Z instrument-xray=instruction-threshold=123 -Copt-level=0
+//@ compile-flags: -Z instrument-xray=instruction-threshold=456 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/instrument-xray/options-override.rs b/tests/codegen/instrument-xray/options-override.rs
index b1fc4c966dc..428fb723edb 100644
--- a/tests/codegen/instrument-xray/options-override.rs
+++ b/tests/codegen/instrument-xray/options-override.rs
@@ -1,8 +1,8 @@
 // Checks that the last `-Z instrument-xray` option wins.
 //
-// needs-xray
-// compile-flags: -Z instrument-xray=always -Copt-level=0
-// compile-flags: -Z instrument-xray=never -Copt-level=0
+//@ needs-xray
+//@ compile-flags: -Z instrument-xray=always -Copt-level=0
+//@ compile-flags: -Z instrument-xray=never -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/integer-cmp.rs b/tests/codegen/integer-cmp.rs
index 8ada3cf09d0..46972878da5 100644
--- a/tests/codegen/integer-cmp.rs
+++ b/tests/codegen/integer-cmp.rs
@@ -1,7 +1,7 @@
 // This is test for more optimal Ord implementation for integers.
 // See <https://github.com/rust-lang/rust/issues/63758> for more info.
 
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/integer-overflow.rs b/tests/codegen/integer-overflow.rs
index b5c351b5e35..00780251bbc 100644
--- a/tests/codegen/integer-overflow.rs
+++ b/tests/codegen/integer-overflow.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C overflow-checks=on
+//@ compile-flags: -O -C overflow-checks=on
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/internalize-closures.rs b/tests/codegen/internalize-closures.rs
index ab3dc3fba5e..d37aa5fee8d 100644
--- a/tests/codegen/internalize-closures.rs
+++ b/tests/codegen/internalize-closures.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0
 
 pub fn main() {
 
diff --git a/tests/codegen/intrinsic-no-unnamed-attr.rs b/tests/codegen/intrinsic-no-unnamed-attr.rs
index c8a8e0b3e7a..45d06c70a6d 100644
--- a/tests/codegen/intrinsic-no-unnamed-attr.rs
+++ b/tests/codegen/intrinsic-no-unnamed-attr.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![feature(intrinsics)]
 
diff --git a/tests/codegen/intrinsics/compare_bytes.rs b/tests/codegen/intrinsics/compare_bytes.rs
index e69224d818c..cd592918fb0 100644
--- a/tests/codegen/intrinsics/compare_bytes.rs
+++ b/tests/codegen/intrinsics/compare_bytes.rs
@@ -1,7 +1,7 @@
-// revisions: INT32 INT16
-// compile-flags: -O
-// [INT32] ignore-16bit
-// [INT16] only-16bit
+//@ revisions: INT32 INT16
+//@ compile-flags: -O
+//@ [INT32] ignore-16bit
+//@ [INT16] only-16bit
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/const_eval_select.rs b/tests/codegen/intrinsics/const_eval_select.rs
index f3877dc6b96..c8debe8d711 100644
--- a/tests/codegen/intrinsics/const_eval_select.rs
+++ b/tests/codegen/intrinsics/const_eval_select.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 #![feature(const_eval_select)]
diff --git a/tests/codegen/intrinsics/exact_div.rs b/tests/codegen/intrinsics/exact_div.rs
index 68eaa39997a..dc625ba7fe4 100644
--- a/tests/codegen/intrinsics/exact_div.rs
+++ b/tests/codegen/intrinsics/exact_div.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/likely.rs b/tests/codegen/intrinsics/likely.rs
index c5a0185bd48..c5904085fc0 100644
--- a/tests/codegen/intrinsics/likely.rs
+++ b/tests/codegen/intrinsics/likely.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/mask.rs b/tests/codegen/intrinsics/mask.rs
index 82131c55847..5344274678c 100644
--- a/tests/codegen/intrinsics/mask.rs
+++ b/tests/codegen/intrinsics/mask.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Copt-level=0
+//@ compile-flags: -Copt-level=0
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
 
diff --git a/tests/codegen/intrinsics/nontemporal.rs b/tests/codegen/intrinsics/nontemporal.rs
index dc020c12119..076d6d6d9da 100644
--- a/tests/codegen/intrinsics/nontemporal.rs
+++ b/tests/codegen/intrinsics/nontemporal.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![feature(core_intrinsics)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/intrinsics/offset.rs b/tests/codegen/intrinsics/offset.rs
index 542bacf99a8..d4791cd30b0 100644
--- a/tests/codegen/intrinsics/offset.rs
+++ b/tests/codegen/intrinsics/offset.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/offset_from.rs b/tests/codegen/intrinsics/offset_from.rs
index d0de4c8355d..ef1a77ef184 100644
--- a/tests/codegen/intrinsics/offset_from.rs
+++ b/tests/codegen/intrinsics/offset_from.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=1
-// only-64bit (because we're using [ui]size)
+//@ compile-flags: -C opt-level=1
+//@ only-64bit (because we're using [ui]size)
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/prefetch.rs b/tests/codegen/intrinsics/prefetch.rs
index 59d7fa6381b..edd8c20b38f 100644
--- a/tests/codegen/intrinsics/prefetch.rs
+++ b/tests/codegen/intrinsics/prefetch.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/transmute-niched.rs b/tests/codegen/intrinsics/transmute-niched.rs
index e9c8d803cb9..7c448c82e4b 100644
--- a/tests/codegen/intrinsics/transmute-niched.rs
+++ b/tests/codegen/intrinsics/transmute-niched.rs
@@ -1,7 +1,7 @@
-// revisions: OPT DBG
-// [OPT] compile-flags: -C opt-level=3 -C no-prepopulate-passes
-// [DBG] compile-flags: -C opt-level=0 -C no-prepopulate-passes
-// only-64bit (so I don't need to worry about usize)
+//@ revisions: OPT DBG
+//@ [OPT] compile-flags: -C opt-level=3 -C no-prepopulate-passes
+//@ [DBG] compile-flags: -C opt-level=0 -C no-prepopulate-passes
+//@ only-64bit (so I don't need to worry about usize)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/intrinsics/transmute-x64.rs b/tests/codegen/intrinsics/transmute-x64.rs
index 19020f6280a..ea1c6b0e7e8 100644
--- a/tests/codegen/intrinsics/transmute-x64.rs
+++ b/tests/codegen/intrinsics/transmute-x64.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -C no-prepopulate-passes
-// only-x86_64 (it's using arch-specific types)
+//@ compile-flags: -O -C no-prepopulate-passes
+//@ only-x86_64 (it's using arch-specific types)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/intrinsics/transmute.rs b/tests/codegen/intrinsics/transmute.rs
index eff16050875..5a503e86010 100644
--- a/tests/codegen/intrinsics/transmute.rs
+++ b/tests/codegen/intrinsics/transmute.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -C no-prepopulate-passes
-// only-64bit (so I don't need to worry about usize)
+//@ compile-flags: -O -C no-prepopulate-passes
+//@ only-64bit (so I don't need to worry about usize)
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/intrinsics/volatile.rs b/tests/codegen/intrinsics/volatile.rs
index 7980c00e7e7..2dea5ecb2ca 100644
--- a/tests/codegen/intrinsics/volatile.rs
+++ b/tests/codegen/intrinsics/volatile.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/is_val_statically_known.rs b/tests/codegen/is_val_statically_known.rs
index 95f6466b254..255d8950a97 100644
--- a/tests/codegen/is_val_statically_known.rs
+++ b/tests/codegen/is_val_statically_known.rs
@@ -1,4 +1,4 @@
-// compile-flags: --crate-type=lib -Zmerge-functions=disabled -O
+//@ compile-flags: --crate-type=lib -Zmerge-functions=disabled -O
 
 #![feature(core_intrinsics)]
 
diff --git a/tests/codegen/issue-97217.rs b/tests/codegen/issue-97217.rs
index af7345442fc..93dd1228ce1 100644
--- a/tests/codegen/issue-97217.rs
+++ b/tests/codegen/issue-97217.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C opt-level=3
-// ignore-debug: the debug assertions get in the way
-// min-llvm-version: 17.0.2
+//@ compile-flags: -C opt-level=3
+//@ ignore-debug: the debug assertions get in the way
+//@ min-llvm-version: 17.0.2
 #![crate_type = "lib"]
 
 // Regression test for issue 97217 (the following should result in no allocations)
diff --git a/tests/codegen/issues/issue-101048.rs b/tests/codegen/issues/issue-101048.rs
index e4712cf9cb3..fa6dc550f30 100644
--- a/tests/codegen/issues/issue-101048.rs
+++ b/tests/codegen/issues/issue-101048.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-101082.rs b/tests/codegen/issues/issue-101082.rs
index 58fcd75a8f2..7c96f9a34f8 100644
--- a/tests/codegen/issues/issue-101082.rs
+++ b/tests/codegen/issues/issue-101082.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-101814.rs b/tests/codegen/issues/issue-101814.rs
index 63a8cebcb60..6175d80c9cd 100644
--- a/tests/codegen/issues/issue-101814.rs
+++ b/tests/codegen/issues/issue-101814.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-103132.rs b/tests/codegen/issues/issue-103132.rs
index 521d424c269..8c1a17c8b78 100644
--- a/tests/codegen/issues/issue-103132.rs
+++ b/tests/codegen/issues/issue-103132.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C overflow-checks
+//@ compile-flags: -O -C overflow-checks
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs b/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs
index a3499babea2..d4a74b3d782 100644
--- a/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs
+++ b/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C debug-assertions=yes
+//@ compile-flags: -O -C debug-assertions=yes
 
 #![crate_type = "lib"]
 #![feature(strict_provenance)]
diff --git a/tests/codegen/issues/issue-103327.rs b/tests/codegen/issues/issue-103327.rs
index 021f1ca0c3a..398b1f376b7 100644
--- a/tests/codegen/issues/issue-103327.rs
+++ b/tests/codegen/issues/issue-103327.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs
index f19d7031bb3..14f157771e0 100644
--- a/tests/codegen/issues/issue-103840.rs
+++ b/tests/codegen/issues/issue-103840.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 pub fn foo(t: &mut Vec<usize>) {
diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
index 54c50f840c5..476db7c1358 100644
--- a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
+++ b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
@@ -1,4 +1,4 @@
-// compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates
+//@ compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates
 // MIR SROA will decompose the closure
 #![feature(stmt_expr_attributes)]
 
diff --git a/tests/codegen/issues/issue-106369.rs b/tests/codegen/issues/issue-106369.rs
index 3fe7be4f144..5120c5f4e49 100644
--- a/tests/codegen/issues/issue-106369.rs
+++ b/tests/codegen/issues/issue-106369.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -O
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-111603.rs b/tests/codegen/issues/issue-111603.rs
index 06429ed3fa9..3f4c7e7d542 100644
--- a/tests/codegen/issues/issue-111603.rs
+++ b/tests/codegen/issues/issue-111603.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 #![feature(get_mut_unchecked, new_uninit)]
diff --git a/tests/codegen/issues/issue-114312.rs b/tests/codegen/issues/issue-114312.rs
index e2fbcef721e..54fa40dcf0d 100644
--- a/tests/codegen/issues/issue-114312.rs
+++ b/tests/codegen/issues/issue-114312.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// min-llvm-version: 17
-// only-x86_64-unknown-linux-gnu
+//@ compile-flags: -O
+//@ min-llvm-version: 17
+//@ only-x86_64-unknown-linux-gnu
 
 // We want to check that this function does not mis-optimize to loop jumping.
 
diff --git a/tests/codegen/issues/issue-115385-llvm-jump-threading.rs b/tests/codegen/issues/issue-115385-llvm-jump-threading.rs
index 142e3596d96..55aa69a7de0 100644
--- a/tests/codegen/issues/issue-115385-llvm-jump-threading.rs
+++ b/tests/codegen/issues/issue-115385-llvm-jump-threading.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Ccodegen-units=1
+//@ compile-flags: -O -Ccodegen-units=1
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-116878.rs b/tests/codegen/issues/issue-116878.rs
index 5864f532324..2c561d7be79 100644
--- a/tests/codegen/issues/issue-116878.rs
+++ b/tests/codegen/issues/issue-116878.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 #![crate_type = "lib"]
 
 /// Make sure no bounds checks are emitted after a `get_unchecked`.
diff --git a/tests/codegen/issues/issue-119422.rs b/tests/codegen/issues/issue-119422.rs
index 9c99d96317d..937fdcf28f5 100644
--- a/tests/codegen/issues/issue-119422.rs
+++ b/tests/codegen/issues/issue-119422.rs
@@ -1,8 +1,8 @@
 //! This test checks that compiler don't generate useless compares to zeros
 //! for NonZero integer types.
 
-// compile-flags: -O --edition=2021 -Zmerge-functions=disabled
-// only-64bit (because the LLVM type of i64 for usize shows up)
+//@ compile-flags: -O --edition=2021 -Zmerge-functions=disabled
+//@ only-64bit (because the LLVM type of i64 for usize shows up)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-13018.rs b/tests/codegen/issues/issue-13018.rs
index b70ea1f48c8..d0a8ce15911 100644
--- a/tests/codegen/issues/issue-13018.rs
+++ b/tests/codegen/issues/issue-13018.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 // A drop([...].clone()) sequence on an Rc should be a no-op
 // In particular, no call to __rust_dealloc should be emitted
diff --git a/tests/codegen/issues/issue-27130.rs b/tests/codegen/issues/issue-27130.rs
index e5ee94e1f45..9c22b41e97f 100644
--- a/tests/codegen/issues/issue-27130.rs
+++ b/tests/codegen/issues/issue-27130.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-32031.rs b/tests/codegen/issues/issue-32031.rs
index abef92c19b6..9693c414a67 100644
--- a/tests/codegen/issues/issue-32031.rs
+++ b/tests/codegen/issues/issue-32031.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-32364.rs b/tests/codegen/issues/issue-32364.rs
index 85493a4bb73..50006e3f218 100644
--- a/tests/codegen/issues/issue-32364.rs
+++ b/tests/codegen/issues/issue-32364.rs
@@ -1,8 +1,8 @@
 // Test that `extern "stdcall"` is properly translated.
 
-// only-x86
+//@ only-x86
 
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 struct Foo;
 
diff --git a/tests/codegen/issues/issue-34634.rs b/tests/codegen/issues/issue-34634.rs
index f53fa240cd1..a11f248e740 100644
--- a/tests/codegen/issues/issue-34634.rs
+++ b/tests/codegen/issues/issue-34634.rs
@@ -3,7 +3,7 @@
 // switch case (the second check present until rustc 1.12).
 // This test also verifies that a single panic call is generated (for the division by zero case).
 
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 // CHECK-LABEL: @f
diff --git a/tests/codegen/issues/issue-34947-pow-i32.rs b/tests/codegen/issues/issue-34947-pow-i32.rs
index 653da8e8b5f..c9141c0e925 100644
--- a/tests/codegen/issues/issue-34947-pow-i32.rs
+++ b/tests/codegen/issues/issue-34947-pow-i32.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-37945.rs b/tests/codegen/issues/issue-37945.rs
index 329769940f9..3f750157a81 100644
--- a/tests/codegen/issues/issue-37945.rs
+++ b/tests/codegen/issues/issue-37945.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -Zmerge-functions=disabled
-// ignore-32bit LLVM has a bug with them
-// ignore-debug
+//@ compile-flags: -O -Zmerge-functions=disabled
+//@ ignore-32bit LLVM has a bug with them
+//@ ignore-debug
 
 // Check that LLVM understands that `Iter` pointer is not null. Issue #37945.
 
diff --git a/tests/codegen/issues/issue-44056-macos-tls-align.rs b/tests/codegen/issues/issue-44056-macos-tls-align.rs
index 44aa9766d3c..c99f0b73038 100644
--- a/tests/codegen/issues/issue-44056-macos-tls-align.rs
+++ b/tests/codegen/issues/issue-44056-macos-tls-align.rs
@@ -1,6 +1,6 @@
 //
-// only-macos
-// compile-flags: -O
+//@ only-macos
+//@ compile-flags: -O
 
 #![crate_type = "rlib"]
 #![feature(thread_local)]
diff --git a/tests/codegen/issues/issue-45222.rs b/tests/codegen/issues/issue-45222.rs
index e9b05e648b4..8fa9d87f497 100644
--- a/tests/codegen/issues/issue-45222.rs
+++ b/tests/codegen/issues/issue-45222.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-45466.rs b/tests/codegen/issues/issue-45466.rs
index c7954276777..165bc3ca411 100644
--- a/tests/codegen/issues/issue-45466.rs
+++ b/tests/codegen/issues/issue-45466.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type="rlib"]
 
diff --git a/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs b/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs
index 1daa213fc82..c9bc7fc316e 100644
--- a/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs
+++ b/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs
@@ -1,8 +1,8 @@
 // This test case checks that slice::{r}position functions do not
 // prevent optimizing away bounds checks
 
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type="rlib"]
 
diff --git a/tests/codegen/issues/issue-56267-2.rs b/tests/codegen/issues/issue-56267-2.rs
index 1715e9f05ab..ced0d2d63bb 100644
--- a/tests/codegen/issues/issue-56267-2.rs
+++ b/tests/codegen/issues/issue-56267-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type="rlib"]
 
diff --git a/tests/codegen/issues/issue-56267.rs b/tests/codegen/issues/issue-56267.rs
index 90aa9f7ae89..fc3754f2d99 100644
--- a/tests/codegen/issues/issue-56267.rs
+++ b/tests/codegen/issues/issue-56267.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type="rlib"]
 
diff --git a/tests/codegen/issues/issue-56927.rs b/tests/codegen/issues/issue-56927.rs
index 1b09ce565b3..e4a0a179141 100644
--- a/tests/codegen/issues/issue-56927.rs
+++ b/tests/codegen/issues/issue-56927.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type="rlib"]
 
diff --git a/tests/codegen/issues/issue-58881.rs b/tests/codegen/issues/issue-58881.rs
index a1d0e8eb7e0..759e3b70baa 100644
--- a/tests/codegen/issues/issue-58881.rs
+++ b/tests/codegen/issues/issue-58881.rs
@@ -1,7 +1,7 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 //
-// only-x86_64
-// ignore-windows
+//@ only-x86_64
+//@ ignore-windows
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-59352.rs b/tests/codegen/issues/issue-59352.rs
index d271fe027e3..7bedc3ffc4a 100644
--- a/tests/codegen/issues/issue-59352.rs
+++ b/tests/codegen/issues/issue-59352.rs
@@ -6,7 +6,7 @@
 // test case should be removed as it will become redundant.
 
 // mir-opt-level=3 enables inlining and enables LLVM to optimize away the unreachable panic call.
-// compile-flags: -O -Z mir-opt-level=3
+//@ compile-flags: -O -Z mir-opt-level=3
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/issues/issue-69101-bounds-check.rs b/tests/codegen/issues/issue-69101-bounds-check.rs
index 655de45fd51..f96a8e9da4b 100644
--- a/tests/codegen/issues/issue-69101-bounds-check.rs
+++ b/tests/codegen/issues/issue-69101-bounds-check.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 #![crate_type = "lib"]
 
 // Make sure no bounds checks are emitted in the loop when upfront slicing
diff --git a/tests/codegen/issues/issue-73031.rs b/tests/codegen/issues/issue-73031.rs
index a09c4bcfbea..61a269999e9 100644
--- a/tests/codegen/issues/issue-73031.rs
+++ b/tests/codegen/issues/issue-73031.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 // Test that LLVM can eliminate the unreachable `All::None` branch.
diff --git a/tests/codegen/issues/issue-73258.rs b/tests/codegen/issues/issue-73258.rs
index 0134f929b29..bc71e15a41f 100644
--- a/tests/codegen/issues/issue-73258.rs
+++ b/tests/codegen/issues/issue-73258.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -O
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-73338-effecient-cmp.rs b/tests/codegen/issues/issue-73338-effecient-cmp.rs
index 85c2bbfd040..a64eb56f903 100644
--- a/tests/codegen/issues/issue-73338-effecient-cmp.rs
+++ b/tests/codegen/issues/issue-73338-effecient-cmp.rs
@@ -2,7 +2,7 @@
 // generated by #[derive(PartialOrd)]
 // doesn't contain jumps for C enums
 
-// compile-flags: -Copt-level=3
+//@ compile-flags: -Copt-level=3
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/issues/issue-73396-bounds-check-after-position.rs b/tests/codegen/issues/issue-73396-bounds-check-after-position.rs
index 2d779788791..db91a85474d 100644
--- a/tests/codegen/issues/issue-73396-bounds-check-after-position.rs
+++ b/tests/codegen/issues/issue-73396-bounds-check-after-position.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 #![crate_type = "lib"]
 
 // Make sure no bounds checks are emitted when slicing or indexing
diff --git a/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs b/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs
index 1ad05906e21..c3eb1a5968a 100644
--- a/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs
+++ b/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs
@@ -1,7 +1,7 @@
 // This test checks that bounds checks are elided when
 // index is part of a (x | y) < C style condition
 
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-75525-bounds-checks.rs b/tests/codegen/issues/issue-75525-bounds-checks.rs
index 2d363d8f73b..fbc10ce3d84 100644
--- a/tests/codegen/issues/issue-75525-bounds-checks.rs
+++ b/tests/codegen/issues/issue-75525-bounds-checks.rs
@@ -1,6 +1,6 @@
 // Regression test for #75525, verifies that no bounds checks are generated.
 
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-75546.rs b/tests/codegen/issues/issue-75546.rs
index 470a9e04096..992ef97d624 100644
--- a/tests/codegen/issues/issue-75546.rs
+++ b/tests/codegen/issues/issue-75546.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 // Test that LLVM can eliminate the impossible `i == 0` check.
diff --git a/tests/codegen/issues/issue-75659.rs b/tests/codegen/issues/issue-75659.rs
index 9394868c08d..1860b73f2a9 100644
--- a/tests/codegen/issues/issue-75659.rs
+++ b/tests/codegen/issues/issue-75659.rs
@@ -1,8 +1,8 @@
 // This test checks that the call to memchr/slice_contains is optimized away
 // when searching in small slices.
 
-// compile-flags: -O -Zinline-mir=false
-// only-x86_64
+//@ compile-flags: -O -Zinline-mir=false
+//@ only-x86_64
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-75978.rs b/tests/codegen/issues/issue-75978.rs
index abfafc35f0b..ed953fae767 100644
--- a/tests/codegen/issues/issue-75978.rs
+++ b/tests/codegen/issues/issue-75978.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-77812.rs b/tests/codegen/issues/issue-77812.rs
index 4cc82414546..b9ce0a4f7db 100644
--- a/tests/codegen/issues/issue-77812.rs
+++ b/tests/codegen/issues/issue-77812.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 // Test that LLVM can eliminate the unreachable `Variant::Zero` branch.
diff --git a/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs b/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs
index 0b6ab4f7ecb..49301be776f 100644
--- a/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs
+++ b/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -C lto=thin -C prefer-dynamic=no
-// only-windows
-// aux-build:static_dllimport_aux.rs
+//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no
+//@ only-windows
+//@ aux-build:static_dllimport_aux.rs
 
 // Test that on Windows, when performing ThinLTO, we do not mark cross-crate static items with
 // dllimport because lld does not fix the symbol names for us.
diff --git a/tests/codegen/issues/issue-84268.rs b/tests/codegen/issues/issue-84268.rs
index 7ca19544700..379ee4f13f6 100644
--- a/tests/codegen/issues/issue-84268.rs
+++ b/tests/codegen/issues/issue-84268.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O --crate-type=rlib
+//@ compile-flags: -O --crate-type=rlib
 #![feature(platform_intrinsics, repr_simd)]
 
 extern "platform-intrinsic" {
diff --git a/tests/codegen/issues/issue-85872-multiple-reverse.rs b/tests/codegen/issues/issue-85872-multiple-reverse.rs
index a4723a0e946..fb5ff8309e5 100644
--- a/tests/codegen/issues/issue-85872-multiple-reverse.rs
+++ b/tests/codegen/issues/issue-85872-multiple-reverse.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs
index 5f71d46fb20..e8164c5c380 100644
--- a/tests/codegen/issues/issue-86106.rs
+++ b/tests/codegen/issues/issue-86106.rs
@@ -1,5 +1,5 @@
-// only-64bit llvm appears to use stores instead of memset on 32bit
-// compile-flags: -C opt-level=3 -Z merge-functions=disabled
+//@ only-64bit llvm appears to use stores instead of memset on 32bit
+//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled
 
 // The below two functions ensure that both `String::new()` and `"".to_string()`
 // produce the identical code.
diff --git a/tests/codegen/issues/issue-96274.rs b/tests/codegen/issues/issue-96274.rs
index a44789ce350..d278796dd02 100644
--- a/tests/codegen/issues/issue-96274.rs
+++ b/tests/codegen/issues/issue-96274.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 #![feature(inline_const)]
diff --git a/tests/codegen/issues/issue-96497-slice-size-nowrap.rs b/tests/codegen/issues/issue-96497-slice-size-nowrap.rs
index 3ea6a5405e5..c2b262b3334 100644
--- a/tests/codegen/issues/issue-96497-slice-size-nowrap.rs
+++ b/tests/codegen/issues/issue-96497-slice-size-nowrap.rs
@@ -2,7 +2,7 @@
 // The possibility of wrapping results in an additional branch when dropping boxed slices
 // in some situations, see https://github.com/rust-lang/rust/issues/96497#issuecomment-1112865218
 
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs b/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs
index 12ace5fff6b..28324bfa90e 100644
--- a/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs
+++ b/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs
@@ -1,6 +1,6 @@
 // This test checks that temporaries for indirectly-passed arguments get lifetime markers.
 
-// compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0
+//@ compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs b/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs
index b87e43c13b6..9f65222b386 100644
--- a/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs
+++ b/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs
@@ -1,5 +1,5 @@
-// ignore-debug: The debug assertions get in the way
-// compile-flags: -O
+//@ ignore-debug: The debug assertions get in the way
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/issues/issue-99960.rs b/tests/codegen/issues/issue-99960.rs
index ad0315a8227..07549506175 100644
--- a/tests/codegen/issues/issue-99960.rs
+++ b/tests/codegen/issues/issue-99960.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/iter-repeat-n-trivial-drop.rs b/tests/codegen/iter-repeat-n-trivial-drop.rs
index b052d339917..d0838a3e860 100644
--- a/tests/codegen/iter-repeat-n-trivial-drop.rs
+++ b/tests/codegen/iter-repeat-n-trivial-drop.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-x86_64
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ only-x86_64
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 #![feature(iter_repeat_n)]
diff --git a/tests/codegen/layout-size-checks.rs b/tests/codegen/layout-size-checks.rs
index d067cc10a94..55c2e86b40b 100644
--- a/tests/codegen/layout-size-checks.rs
+++ b/tests/codegen/layout-size-checks.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-x86_64
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ only-x86_64
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/lib-optimizations/iter-sum.rs b/tests/codegen/lib-optimizations/iter-sum.rs
index ff7ca6ef6c1..6b6d61a3066 100644
--- a/tests/codegen/lib-optimizations/iter-sum.rs
+++ b/tests/codegen/lib-optimizations/iter-sum.rs
@@ -1,6 +1,6 @@
-// ignore-debug: the debug assertions get in the way
-// compile-flags: -O
-// only-x86_64 (vectorization varies between architectures)
+//@ ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ only-x86_64 (vectorization varies between architectures)
 #![crate_type = "lib"]
 
 
diff --git a/tests/codegen/lifetime_start_end.rs b/tests/codegen/lifetime_start_end.rs
index 16175dc18c2..38e87845158 100644
--- a/tests/codegen/lifetime_start_end.rs
+++ b/tests/codegen/lifetime_start_end.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0
+//@ compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/link-dead-code.rs b/tests/codegen/link-dead-code.rs
index de5a237c5f8..7769622233f 100644
--- a/tests/codegen/link-dead-code.rs
+++ b/tests/codegen/link-dead-code.rs
@@ -1,4 +1,4 @@
-// compile-flags:-Clink-dead-code
+//@ compile-flags:-Clink-dead-code
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/link_section.rs b/tests/codegen/link_section.rs
index 2b26b604ad3..6747feba211 100644
--- a/tests/codegen/link_section.rs
+++ b/tests/codegen/link_section.rs
@@ -1,5 +1,5 @@
-// ignore-emscripten default visibility is hidden
-// compile-flags: -C no-prepopulate-passes
+//@ ignore-emscripten default visibility is hidden
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/llvm-ident.rs b/tests/codegen/llvm-ident.rs
index 927f0d602ad..923e99bb282 100644
--- a/tests/codegen/llvm-ident.rs
+++ b/tests/codegen/llvm-ident.rs
@@ -1,9 +1,9 @@
 // Verifies that the `!llvm.ident` named metadata is emitted.
 //
-// revisions: NONE OPT DEBUG
+//@ revisions: NONE OPT DEBUG
 //
-// [OPT] compile-flags: -Copt-level=2
-// [DEBUG] compile-flags: -Cdebuginfo=2
+//@ [OPT] compile-flags: -Copt-level=2
+//@ [DEBUG] compile-flags: -Cdebuginfo=2
 
 // The named metadata should contain a single metadata node (see
 // `LLVMRustPrepareThinLTOImport` for details).
diff --git a/tests/codegen/llvm_module_flags.rs b/tests/codegen/llvm_module_flags.rs
index acc035086de..d3fae0c3927 100644
--- a/tests/codegen/llvm_module_flags.rs
+++ b/tests/codegen/llvm_module_flags.rs
@@ -1,5 +1,5 @@
 // Test for -Z llvm_module_flags
-// compile-flags: -Z llvm_module_flag=foo:u32:123:error -Z llvm_module_flag=bar:u32:42:max
+//@ compile-flags: -Z llvm_module_flag=foo:u32:123:error -Z llvm_module_flag=bar:u32:42:max
 
 fn main() {}
 
diff --git a/tests/codegen/loads.rs b/tests/codegen/loads.rs
index 4a09a1dc033..0471d83c25a 100644
--- a/tests/codegen/loads.rs
+++ b/tests/codegen/loads.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/local-generics-in-exe-internalized.rs b/tests/codegen/local-generics-in-exe-internalized.rs
index 449c5ca75fc..8dbc41382b5 100644
--- a/tests/codegen/local-generics-in-exe-internalized.rs
+++ b/tests/codegen/local-generics-in-exe-internalized.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Zshare-generics=yes -Zinline-mir=no
+//@ compile-flags: -C no-prepopulate-passes -Zshare-generics=yes -Zinline-mir=no
 
 // Check that local generics are internalized if they are in the same CGU
 
diff --git a/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs b/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs
index 4b78f6e24f7..9a50f7b8e3a 100644
--- a/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs
+++ b/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
-// only-loongarch64
+//@ only-loongarch64
 
 #![feature(link_llvm_intrinsics)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs b/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs
index 591ccd45ab6..3c895eb9531 100644
--- a/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs
+++ b/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C no-prepopulate-passes
-// only-loongarch64
-// only-linux
+//@ compile-flags: -C no-prepopulate-passes
+//@ only-loongarch64
+//@ only-linux
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/lto-removes-invokes.rs b/tests/codegen/lto-removes-invokes.rs
index 3979a97dc01..f0102c25d5b 100644
--- a/tests/codegen/lto-removes-invokes.rs
+++ b/tests/codegen/lto-removes-invokes.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C lto -C panic=abort -O
-// no-prefer-dynamic
+//@ compile-flags: -C lto -C panic=abort -O
+//@ no-prefer-dynamic
 
 fn main() {
     foo();
diff --git a/tests/codegen/macos/i686-macosx-deployment-target.rs b/tests/codegen/macos/i686-macosx-deployment-target.rs
index ba49178dcb6..b854476de41 100644
--- a/tests/codegen/macos/i686-macosx-deployment-target.rs
+++ b/tests/codegen/macos/i686-macosx-deployment-target.rs
@@ -2,9 +2,9 @@
 // Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set.
 // See issue #60235.
 
-// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
-// needs-llvm-components: x86
-// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
+//@ compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
+//@ needs-llvm-components: x86
+//@ rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/codegen/macos/i686-no-macosx-deployment-target.rs b/tests/codegen/macos/i686-no-macosx-deployment-target.rs
index 479fe7968f7..a49a3467e7a 100644
--- a/tests/codegen/macos/i686-no-macosx-deployment-target.rs
+++ b/tests/codegen/macos/i686-no-macosx-deployment-target.rs
@@ -2,9 +2,9 @@
 // Checks that we leave the target alone MACOSX_DEPLOYMENT_TARGET is unset.
 // See issue #60235.
 
-// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
-// needs-llvm-components: x86
-// unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
+//@ compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
+//@ needs-llvm-components: x86
+//@ unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/codegen/macos/x86_64-macosx-deployment-target.rs b/tests/codegen/macos/x86_64-macosx-deployment-target.rs
index 957c727bb93..eac989c2954 100644
--- a/tests/codegen/macos/x86_64-macosx-deployment-target.rs
+++ b/tests/codegen/macos/x86_64-macosx-deployment-target.rs
@@ -2,9 +2,9 @@
 // Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set.
 // See issue #60235.
 
-// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
-// needs-llvm-components: x86
-// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
+//@ compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
+//@ needs-llvm-components: x86
+//@ rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs b/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs
index edbc1b66c71..ed294cf4e3d 100644
--- a/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs
+++ b/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs
@@ -2,9 +2,9 @@
 // Checks that we leave the target alone when MACOSX_DEPLOYMENT_TARGET is unset.
 // See issue #60235.
 
-// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
-// needs-llvm-components: x86
-// unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
+//@ compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
+//@ needs-llvm-components: x86
+//@ unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/codegen/mainsubprogram.rs b/tests/codegen/mainsubprogram.rs
index 790db33437b..8e173df0e86 100644
--- a/tests/codegen/mainsubprogram.rs
+++ b/tests/codegen/mainsubprogram.rs
@@ -1,10 +1,10 @@
 // This test depends on a patch that was committed to upstream LLVM
 // before 4.0, formerly backported to the Rust LLVM fork.
 
-// ignore-windows
-// ignore-macos
+//@ ignore-windows
+//@ ignore-macos
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DISubprogram{{.*}}name: "main",{{.*}}DI{{(SP)?}}FlagMainSubprogram{{.*}}
diff --git a/tests/codegen/mainsubprogramstart.rs b/tests/codegen/mainsubprogramstart.rs
index d4de9f59ac2..db2c1466bf5 100644
--- a/tests/codegen/mainsubprogramstart.rs
+++ b/tests/codegen/mainsubprogramstart.rs
@@ -1,7 +1,7 @@
-// ignore-windows
-// ignore-macos
+//@ ignore-windows
+//@ ignore-macos
 
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 #![feature(start)]
 
diff --git a/tests/codegen/match-optimized.rs b/tests/codegen/match-optimized.rs
index e32a5e54504..09907edf8f2 100644
--- a/tests/codegen/match-optimized.rs
+++ b/tests/codegen/match-optimized.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -O
+//@ compile-flags: -C no-prepopulate-passes -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/match-optimizes-away.rs b/tests/codegen/match-optimizes-away.rs
index 400606b42d5..55ece89cec2 100644
--- a/tests/codegen/match-optimizes-away.rs
+++ b/tests/codegen/match-optimizes-away.rs
@@ -1,5 +1,5 @@
 //
-// compile-flags: -O
+//@ compile-flags: -O
 #![crate_type="lib"]
 
 pub enum Three { A, B, C }
diff --git a/tests/codegen/match-unoptimized.rs b/tests/codegen/match-unoptimized.rs
index 78ea4f9b409..3dfe78c3e16 100644
--- a/tests/codegen/match-unoptimized.rs
+++ b/tests/codegen/match-unoptimized.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/maybeuninit-rvo.rs b/tests/codegen/maybeuninit-rvo.rs
index feed513e1fb..954514c736b 100644
--- a/tests/codegen/maybeuninit-rvo.rs
+++ b/tests/codegen/maybeuninit-rvo.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 #![feature(c_unwind)]
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/mem-replace-big-type.rs b/tests/codegen/mem-replace-big-type.rs
index fc3e9d22bdf..0234b63aba5 100644
--- a/tests/codegen/mem-replace-big-type.rs
+++ b/tests/codegen/mem-replace-big-type.rs
@@ -3,8 +3,8 @@
 // may e.g. multiply `size_of::<T>()` with a variable "count" (which is only
 // known to be `1` after inlining).
 
-// compile-flags: -C no-prepopulate-passes -Zinline-mir=no
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -C no-prepopulate-passes -Zinline-mir=no
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/mem-replace-simple-type.rs b/tests/codegen/mem-replace-simple-type.rs
index be3af989ef0..b6885aad9e4 100644
--- a/tests/codegen/mem-replace-simple-type.rs
+++ b/tests/codegen/mem-replace-simple-type.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -C no-prepopulate-passes
-// only-x86_64 (to not worry about usize differing)
-// ignore-debug (the debug assertions get in the way)
+//@ compile-flags: -O -C no-prepopulate-passes
+//@ only-x86_64 (to not worry about usize differing)
+//@ ignore-debug (the debug assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/merge-functions.rs b/tests/codegen/merge-functions.rs
index d6caeeee896..8e4b65c9ee6 100644
--- a/tests/codegen/merge-functions.rs
+++ b/tests/codegen/merge-functions.rs
@@ -1,6 +1,6 @@
-// revisions: O Os
-//[Os] compile-flags: -Copt-level=s
-//[O] compile-flags: -O
+//@ revisions: O Os
+//@[Os] compile-flags: -Copt-level=s
+//@[O] compile-flags: -O
 #![crate_type = "lib"]
 
 // CHECK: @func{{2|1}} = {{.*}}alias{{.*}}@func{{1|2}}
diff --git a/tests/codegen/method-declaration.rs b/tests/codegen/method-declaration.rs
index 4ae332b0107..de2f96a5151 100644
--- a/tests/codegen/method-declaration.rs
+++ b/tests/codegen/method-declaration.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Cno-prepopulate-passes
+//@ compile-flags: -g -Cno-prepopulate-passes
 
 // Verify that we added a declaration for a method.
 
diff --git a/tests/codegen/mir-inlined-line-numbers.rs b/tests/codegen/mir-inlined-line-numbers.rs
index d13527b9521..57978bc7097 100644
--- a/tests/codegen/mir-inlined-line-numbers.rs
+++ b/tests/codegen/mir-inlined-line-numbers.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -g
+//@ compile-flags: -O -g
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/mir_zst_stores.rs b/tests/codegen/mir_zst_stores.rs
index 17e7ba3093b..667273c2f0f 100644
--- a/tests/codegen/mir_zst_stores.rs
+++ b/tests/codegen/mir_zst_stores.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 use std::marker::PhantomData;
diff --git a/tests/codegen/move-before-nocapture-ref-arg.rs b/tests/codegen/move-before-nocapture-ref-arg.rs
index c7b400c8f8d..a530bc26672 100644
--- a/tests/codegen/move-before-nocapture-ref-arg.rs
+++ b/tests/codegen/move-before-nocapture-ref-arg.rs
@@ -1,7 +1,7 @@
 // Verify that move before the call of the function with noalias, nocapture, readonly.
 // #107436
-// compile-flags: -O
-// min-llvm-version: 17
+//@ compile-flags: -O
+//@ min-llvm-version: 17
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/move-operands.rs b/tests/codegen/move-operands.rs
index cd87e6d813c..4f22921b4a3 100644
--- a/tests/codegen/move-operands.rs
+++ b/tests/codegen/move-operands.rs
@@ -1,5 +1,5 @@
 // Verify that optimized MIR only copies `a` once.
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/naked-fn/naked-functions.rs b/tests/codegen/naked-fn/naked-functions.rs
index e05bbc26e83..755dd155112 100644
--- a/tests/codegen/naked-fn/naked-functions.rs
+++ b/tests/codegen/naked-fn/naked-functions.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
-// needs-asm-support
-// only-x86_64
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ needs-asm-support
+//@ only-x86_64
 
 #![crate_type = "lib"]
 #![feature(naked_functions)]
diff --git a/tests/codegen/naked-fn/naked-nocoverage.rs b/tests/codegen/naked-fn/naked-nocoverage.rs
index 3c755e49c6d..e8d3b5834fa 100644
--- a/tests/codegen/naked-fn/naked-nocoverage.rs
+++ b/tests/codegen/naked-fn/naked-nocoverage.rs
@@ -1,9 +1,9 @@
 // Checks that naked functions are not instrumented by -Cinstrument-coverage.
 // Regression test for issue #105170.
 //
-// needs-asm-support
-// needs-profiler-support
-// compile-flags: -Cinstrument-coverage
+//@ needs-asm-support
+//@ needs-profiler-support
+//@ compile-flags: -Cinstrument-coverage
 #![crate_type = "lib"]
 #![feature(naked_functions)]
 use std::arch::asm;
diff --git a/tests/codegen/naked-fn/naked-noinline.rs b/tests/codegen/naked-fn/naked-noinline.rs
index 5cfb500c0ef..c1e8f368249 100644
--- a/tests/codegen/naked-fn/naked-noinline.rs
+++ b/tests/codegen/naked-fn/naked-noinline.rs
@@ -1,7 +1,7 @@
 // Checks that naked functions are never inlined.
-// compile-flags: -O -Zmir-opt-level=3
-// needs-asm-support
-// ignore-wasm32
+//@ compile-flags: -O -Zmir-opt-level=3
+//@ needs-asm-support
+//@ ignore-wasm32
 #![crate_type = "lib"]
 #![feature(naked_functions)]
 
diff --git a/tests/codegen/no-assumes-on-casts.rs b/tests/codegen/no-assumes-on-casts.rs
index b5cfa2775ab..b9c264daa2d 100644
--- a/tests/codegen/no-assumes-on-casts.rs
+++ b/tests/codegen/no-assumes-on-casts.rs
@@ -1,6 +1,6 @@
 #![crate_type = "lib"]
 
-// compile-flags: -Cno-prepopulate-passes
+//@ compile-flags: -Cno-prepopulate-passes
 
 // CHECK-LABEL: fna
 #[no_mangle]
diff --git a/tests/codegen/no-dllimport-w-cross-lang-lto.rs b/tests/codegen/no-dllimport-w-cross-lang-lto.rs
index 33fc2bc1540..c71eddfa287 100644
--- a/tests/codegen/no-dllimport-w-cross-lang-lto.rs
+++ b/tests/codegen/no-dllimport-w-cross-lang-lto.rs
@@ -1,9 +1,9 @@
 // This test makes sure that functions get annotated with the proper
 // "target-cpu" attribute in LLVM.
 
-// no-prefer-dynamic
-// only-msvc
-// compile-flags: -C linker-plugin-lto
+//@ no-prefer-dynamic
+//@ only-msvc
+//@ compile-flags: -C linker-plugin-lto
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/no-jump-tables.rs b/tests/codegen/no-jump-tables.rs
index 8e2cb47566e..654da2cec11 100644
--- a/tests/codegen/no-jump-tables.rs
+++ b/tests/codegen/no-jump-tables.rs
@@ -1,10 +1,10 @@
 // Test that the `no-jump-tables` function attribute are (not) emitted when
 // the `-Zno-jump-tables` flag is (not) set.
 
-// revisions: unset set
-// needs-llvm-components: x86
-// compile-flags: --target x86_64-unknown-linux-gnu
-// [set] compile-flags: -Zno-jump-tables
+//@ revisions: unset set
+//@ needs-llvm-components: x86
+//@ compile-flags: --target x86_64-unknown-linux-gnu
+//@ [set] compile-flags: -Zno-jump-tables
 
 #![crate_type = "lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/no-plt.rs b/tests/codegen/no-plt.rs
index b36e9ae88f4..3a3546ff7c4 100644
--- a/tests/codegen/no-plt.rs
+++ b/tests/codegen/no-plt.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C relocation-model=pic -Z plt=no
+//@ compile-flags: -C relocation-model=pic -Z plt=no
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/no_builtins-at-crate.rs b/tests/codegen/no_builtins-at-crate.rs
index 02ed670900e..ba1d31f60c3 100644
--- a/tests/codegen/no_builtins-at-crate.rs
+++ b/tests/codegen/no_builtins-at-crate.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=1
+//@ compile-flags: -C opt-level=1
 
 #![no_builtins]
 #![crate_type = "lib"]
diff --git a/tests/codegen/noalias-box-off.rs b/tests/codegen/noalias-box-off.rs
index c82c53b2a48..1642103903a 100644
--- a/tests/codegen/noalias-box-off.rs
+++ b/tests/codegen/noalias-box-off.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Z box-noalias=no
+//@ compile-flags: -O -Z box-noalias=no
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noalias-box.rs b/tests/codegen/noalias-box.rs
index a3d1f093d8b..06f94691c89 100644
--- a/tests/codegen/noalias-box.rs
+++ b/tests/codegen/noalias-box.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noalias-flag.rs b/tests/codegen/noalias-flag.rs
index a9ec61e286d..35b94d813d5 100644
--- a/tests/codegen/noalias-flag.rs
+++ b/tests/codegen/noalias-flag.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Zmutable-noalias=no
+//@ compile-flags: -O -Zmutable-noalias=no
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noalias-refcell.rs b/tests/codegen/noalias-refcell.rs
index dba73937abf..51d13967bec 100644
--- a/tests/codegen/noalias-refcell.rs
+++ b/tests/codegen/noalias-refcell.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
+//@ compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noalias-rwlockreadguard.rs b/tests/codegen/noalias-rwlockreadguard.rs
index 7f7b46c85a8..7b870cb28b4 100644
--- a/tests/codegen/noalias-rwlockreadguard.rs
+++ b/tests/codegen/noalias-rwlockreadguard.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
+//@ compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noalias-unpin.rs b/tests/codegen/noalias-unpin.rs
index 8ca9b98eee2..546b1edb7b6 100644
--- a/tests/codegen/noalias-unpin.rs
+++ b/tests/codegen/noalias-unpin.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Z mutable-noalias=yes
+//@ compile-flags: -O -Z mutable-noalias=yes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/non-terminate/infinite-loop-1.rs b/tests/codegen/non-terminate/infinite-loop-1.rs
index fa9c66b47c0..9eab4939aee 100644
--- a/tests/codegen/non-terminate/infinite-loop-1.rs
+++ b/tests/codegen/non-terminate/infinite-loop-1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/non-terminate/infinite-loop-2.rs b/tests/codegen/non-terminate/infinite-loop-2.rs
index 81d62ab33d7..da29361cc96 100644
--- a/tests/codegen/non-terminate/infinite-loop-2.rs
+++ b/tests/codegen/non-terminate/infinite-loop-2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/non-terminate/infinite-recursion.rs b/tests/codegen/non-terminate/infinite-recursion.rs
index 6d1f2d4bf8f..804704c0292 100644
--- a/tests/codegen/non-terminate/infinite-recursion.rs
+++ b/tests/codegen/non-terminate/infinite-recursion.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/non-terminate/nonempty-infinite-loop.rs b/tests/codegen/non-terminate/nonempty-infinite-loop.rs
index 5e25e04fc24..0db4ee61b1b 100644
--- a/tests/codegen/non-terminate/nonempty-infinite-loop.rs
+++ b/tests/codegen/non-terminate/nonempty-infinite-loop.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=3
+//@ compile-flags: -C opt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noreturn-uninhabited.rs b/tests/codegen/noreturn-uninhabited.rs
index 49f93cf62c7..a10795d3f3c 100644
--- a/tests/codegen/noreturn-uninhabited.rs
+++ b/tests/codegen/noreturn-uninhabited.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/noreturnflag.rs b/tests/codegen/noreturnflag.rs
index 95c100571ce..a8f08628986 100644
--- a/tests/codegen/noreturnflag.rs
+++ b/tests/codegen/noreturnflag.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -C no-prepopulate-passes
+//@ compile-flags: -g -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/nounwind.rs b/tests/codegen/nounwind.rs
index f639c60b893..2b237ef0120 100644
--- a/tests/codegen/nounwind.rs
+++ b/tests/codegen/nounwind.rs
@@ -1,7 +1,7 @@
-// aux-build:nounwind.rs
-// compile-flags: -C no-prepopulate-passes -C panic=abort -C metadata=a
-// ignore-windows
-// ignore-android
+//@ aux-build:nounwind.rs
+//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C metadata=a
+//@ ignore-windows
+//@ ignore-android
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/nrvo.rs b/tests/codegen/nrvo.rs
index b2ae99f3761..aa8bed941f5 100644
--- a/tests/codegen/nrvo.rs
+++ b/tests/codegen/nrvo.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/optimize-attr-1.rs b/tests/codegen/optimize-attr-1.rs
index d95ba853030..c8e68779aae 100644
--- a/tests/codegen/optimize-attr-1.rs
+++ b/tests/codegen/optimize-attr-1.rs
@@ -1,7 +1,7 @@
-// revisions: NO-OPT SIZE-OPT SPEED-OPT
-//[NO-OPT] compile-flags: -Copt-level=0 -Ccodegen-units=1
-//[SIZE-OPT] compile-flags: -Copt-level=s -Ccodegen-units=1
-//[SPEED-OPT] compile-flags: -Copt-level=3 -Ccodegen-units=1
+//@ revisions: NO-OPT SIZE-OPT SPEED-OPT
+//@[NO-OPT] compile-flags: -Copt-level=0 -Ccodegen-units=1
+//@[SIZE-OPT] compile-flags: -Copt-level=s -Ccodegen-units=1
+//@[SPEED-OPT] compile-flags: -Copt-level=3 -Ccodegen-units=1
 
 #![feature(optimize_attribute)]
 #![crate_type="rlib"]
diff --git a/tests/codegen/option-as-slice.rs b/tests/codegen/option-as-slice.rs
index 1edd9ba9f7d..990ec1d1f66 100644
--- a/tests/codegen/option-as-slice.rs
+++ b/tests/codegen/option-as-slice.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -Z randomize-layout=no
-// only-x86_64
-// ignore-llvm-version: 16.0.0
+//@ compile-flags: -O -Z randomize-layout=no
+//@ only-x86_64
+//@ ignore-llvm-version: 16.0.0
 // ^ needs https://reviews.llvm.org/D146149 in 16.0.1
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/option-nonzero-eq.rs b/tests/codegen/option-nonzero-eq.rs
index ce5b6328af6..f6be90a5dde 100644
--- a/tests/codegen/option-nonzero-eq.rs
+++ b/tests/codegen/option-nonzero-eq.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Zmerge-functions=disabled
+//@ compile-flags: -O -Zmerge-functions=disabled
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/overaligned-constant.rs b/tests/codegen/overaligned-constant.rs
index 89e49738991..351c8ea8f4b 100644
--- a/tests/codegen/overaligned-constant.rs
+++ b/tests/codegen/overaligned-constant.rs
@@ -1,9 +1,9 @@
 // GVN may create indirect constants with higher alignment than their type requires. Verify that we
 // do not ICE during codegen, and that the LLVM constant has the higher alignment.
 //
-// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN
-// compile-flags: -Cno-prepopulate-passes
-// only-64bit
+//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN
+//@ compile-flags: -Cno-prepopulate-passes
+//@ only-64bit
 
 struct S(i32);
 
diff --git a/tests/codegen/packed.rs b/tests/codegen/packed.rs
index 96cd9a42e7d..764476b0aa1 100644
--- a/tests/codegen/packed.rs
+++ b/tests/codegen/packed.rs
@@ -1,5 +1,5 @@
 //
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/panic-abort-windows.rs b/tests/codegen/panic-abort-windows.rs
index 2ee29762dcd..71caa1b3d2a 100644
--- a/tests/codegen/panic-abort-windows.rs
+++ b/tests/codegen/panic-abort-windows.rs
@@ -1,7 +1,7 @@
 // This test is for *-windows only.
-// only-windows
+//@ only-windows
 
-// compile-flags: -C no-prepopulate-passes -C panic=abort -O
+//@ compile-flags: -C no-prepopulate-passes -C panic=abort -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/panic-in-drop-abort.rs b/tests/codegen/panic-in-drop-abort.rs
index 7a84484c419..b150c537ad5 100644
--- a/tests/codegen/panic-in-drop-abort.rs
+++ b/tests/codegen/panic-in-drop-abort.rs
@@ -1,5 +1,5 @@
-// compile-flags: -Z panic-in-drop=abort -O
-// ignore-msvc
+//@ compile-flags: -Z panic-in-drop=abort -O
+//@ ignore-msvc
 
 // Ensure that unwinding code paths are eliminated from the output after
 // optimization.
diff --git a/tests/codegen/panic-unwind-default-uwtable.rs b/tests/codegen/panic-unwind-default-uwtable.rs
index b78b159d20d..06f616c519b 100644
--- a/tests/codegen/panic-unwind-default-uwtable.rs
+++ b/tests/codegen/panic-unwind-default-uwtable.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C panic=unwind -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C panic=unwind -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/personality_lifetimes.rs b/tests/codegen/personality_lifetimes.rs
index e2bc0ebcb37..06389688e0e 100644
--- a/tests/codegen/personality_lifetimes.rs
+++ b/tests/codegen/personality_lifetimes.rs
@@ -1,8 +1,8 @@
-// ignore-msvc
-// ignore-wasm32-bare compiled with panic=abort by default
-// needs-unwind
+//@ ignore-msvc
+//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ needs-unwind
 
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/pgo-counter-bias.rs b/tests/codegen/pgo-counter-bias.rs
index 28caa7f4aa3..1263eaf206f 100644
--- a/tests/codegen/pgo-counter-bias.rs
+++ b/tests/codegen/pgo-counter-bias.rs
@@ -1,9 +1,9 @@
 // Test that __llvm_profile_counter_bias does not get internalized by lto.
 
-// ignore-macos -runtime-counter-relocation not honored on Mach-O
-// compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat
-// needs-profiler-support
-// no-prefer-dynamic
+//@ ignore-macos -runtime-counter-relocation not honored on Mach-O
+//@ compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat
+//@ needs-profiler-support
+//@ no-prefer-dynamic
 
 // CHECK: @__llvm_profile_counter_bias = {{.*}}global
 
diff --git a/tests/codegen/pgo-instrumentation.rs b/tests/codegen/pgo-instrumentation.rs
index 05c2d2fc0d8..e2c348edf82 100644
--- a/tests/codegen/pgo-instrumentation.rs
+++ b/tests/codegen/pgo-instrumentation.rs
@@ -1,7 +1,7 @@
 // Test that `-Cprofile-generate` creates expected instrumentation artifacts in LLVM IR.
 
-// needs-profiler-support
-// compile-flags: -Cprofile-generate -Ccodegen-units=1
+//@ needs-profiler-support
+//@ compile-flags: -Cprofile-generate -Ccodegen-units=1
 
 // CHECK: @__llvm_profile_raw_version =
 // CHECK-DAG: @__profc_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = {{.*}}global
diff --git a/tests/codegen/pic-relocation-model.rs b/tests/codegen/pic-relocation-model.rs
index 518e949ffe3..10ade847133 100644
--- a/tests/codegen/pic-relocation-model.rs
+++ b/tests/codegen/pic-relocation-model.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C relocation-model=pic -Copt-level=0
+//@ compile-flags: -C relocation-model=pic -Copt-level=0
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/pie-relocation-model.rs b/tests/codegen/pie-relocation-model.rs
index 941cca922bd..20bf8919ac1 100644
--- a/tests/codegen/pie-relocation-model.rs
+++ b/tests/codegen/pie-relocation-model.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C relocation-model=pie -Copt-level=0
-// only-x86_64-unknown-linux-gnu
+//@ compile-flags: -C relocation-model=pie -Copt-level=0
+//@ only-x86_64-unknown-linux-gnu
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/ptr-arithmetic.rs b/tests/codegen/ptr-arithmetic.rs
index 292bfdaf357..3a8bfee84ec 100644
--- a/tests/codegen/ptr-arithmetic.rs
+++ b/tests/codegen/ptr-arithmetic.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Z merge-functions=disabled
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -O -Z merge-functions=disabled
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/ptr-read-metadata.rs b/tests/codegen/ptr-read-metadata.rs
index 94152ed11ba..622a1cec4ac 100644
--- a/tests/codegen/ptr-read-metadata.rs
+++ b/tests/codegen/ptr-read-metadata.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Z merge-functions=disabled
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -O -Z merge-functions=disabled
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/refs.rs b/tests/codegen/refs.rs
index 9e1205f5d1d..40ce04c07a1 100644
--- a/tests/codegen/refs.rs
+++ b/tests/codegen/refs.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/remap_path_prefix/aux_mod.rs b/tests/codegen/remap_path_prefix/aux_mod.rs
index 44cc4bb722d..c37e91c705c 100644
--- a/tests/codegen/remap_path_prefix/aux_mod.rs
+++ b/tests/codegen/remap_path_prefix/aux_mod.rs
@@ -1,4 +1,4 @@
-// ignore-test: this is not a test
+//@ ignore-test: this is not a test
 
 #[inline]
 pub fn some_aux_mod_function() -> i32 {
diff --git a/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs b/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs
index 887915955b5..7afc16ec72f 100644
--- a/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs
+++ b/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs
@@ -1,6 +1,6 @@
 //
 
-// compile-flags: -g  --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src
+//@ compile-flags: -g  --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src
 
 #[inline]
 pub fn some_aux_function() -> i32 {
diff --git a/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs b/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs
index 15bd0f17421..9d5cdfe063b 100644
--- a/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs
+++ b/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs
@@ -1,5 +1,5 @@
 //
-// compile-flags: -g  --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src
+//@ compile-flags: -g  --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs b/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
index b66abc6bedf..eb610168dd3 100644
--- a/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
+++ b/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
@@ -1,6 +1,6 @@
-// ignore-windows
+//@ ignore-windows
 
-// compile-flags: -g  -C no-prepopulate-passes -Z simulate-remapped-rust-src-base=/rustc/xyz
+//@ compile-flags: -g  -C no-prepopulate-passes -Z simulate-remapped-rust-src-base=/rustc/xyz
 
 // Here we check that importing std will not cause real path to std source files
 // to leak. If rustc was compiled with remap-debuginfo = true, this should be
diff --git a/tests/codegen/remap_path_prefix/main.rs b/tests/codegen/remap_path_prefix/main.rs
index f1e1dd69b96..bfbccfe0df8 100644
--- a/tests/codegen/remap_path_prefix/main.rs
+++ b/tests/codegen/remap_path_prefix/main.rs
@@ -1,8 +1,8 @@
-// ignore-windows
+//@ ignore-windows
 //
 
-// compile-flags: -g  -C no-prepopulate-passes --remap-path-prefix={{cwd}}=/the/cwd --remap-path-prefix={{src-base}}=/the/src -Zinline-mir=no
-// aux-build:remap_path_prefix_aux.rs
+//@ compile-flags: -g  -C no-prepopulate-passes --remap-path-prefix={{cwd}}=/the/cwd --remap-path-prefix={{src-base}}=/the/src -Zinline-mir=no
+//@ aux-build:remap_path_prefix_aux.rs
 
 extern crate remap_path_prefix_aux;
 
diff --git a/tests/codegen/remap_path_prefix/xcrate-generic.rs b/tests/codegen/remap_path_prefix/xcrate-generic.rs
index 399deec1fc9..db69b72d904 100644
--- a/tests/codegen/remap_path_prefix/xcrate-generic.rs
+++ b/tests/codegen/remap_path_prefix/xcrate-generic.rs
@@ -1,6 +1,6 @@
-// ignore-windows
-// compile-flags: -g -C metadata=foo -C no-prepopulate-passes
-// aux-build:xcrate-generic.rs
+//@ ignore-windows
+//@ compile-flags: -g -C metadata=foo -C no-prepopulate-passes
+//@ aux-build:xcrate-generic.rs
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/repeat-trusted-len.rs b/tests/codegen/repeat-trusted-len.rs
index bd6ff977e1f..fa01f2b4969 100644
--- a/tests/codegen/repeat-trusted-len.rs
+++ b/tests/codegen/repeat-trusted-len.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/repr/transparent-imm-array.rs b/tests/codegen/repr/transparent-imm-array.rs
index 6d712778509..842e36ca13d 100644
--- a/tests/codegen/repr/transparent-imm-array.rs
+++ b/tests/codegen/repr/transparent-imm-array.rs
@@ -1,11 +1,11 @@
-// revisions: arm mips thumb wasm32
-// compile-flags: -C no-prepopulate-passes
+//@ revisions: arm mips thumb wasm32
+//@ compile-flags: -C no-prepopulate-passes
 //
-//[arm] only-arm
-//[mips] only-mips
-//[thumb] only-thumb
-//[wasm32] only-wasm32
-// ignore-emscripten
+//@[arm] only-arm
+//@[mips] only-mips
+//@[thumb] only-thumb
+//@[wasm32] only-wasm32
+//@ ignore-emscripten
 // See ./transparent.rs
 // Some platforms pass large aggregates using immediate arrays in LLVMIR
 // Other platforms pass large aggregates using struct pointer in LLVMIR
diff --git a/tests/codegen/repr/transparent-mips64.rs b/tests/codegen/repr/transparent-mips64.rs
index 245daf13e28..55090e6bd80 100644
--- a/tests/codegen/repr/transparent-mips64.rs
+++ b/tests/codegen/repr/transparent-mips64.rs
@@ -1,7 +1,7 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 //
 
-// only-mips64
+//@ only-mips64
 // See ./transparent.rs
 
 #![feature(transparent_unions)]
diff --git a/tests/codegen/repr/transparent-struct-ptr.rs b/tests/codegen/repr/transparent-struct-ptr.rs
index d2120f7ec14..ff531029e04 100644
--- a/tests/codegen/repr/transparent-struct-ptr.rs
+++ b/tests/codegen/repr/transparent-struct-ptr.rs
@@ -1,11 +1,11 @@
-// revisions: x32 x64 sparc sparc64
-// compile-flags: -O -C no-prepopulate-passes
+//@ revisions: x32 x64 sparc sparc64
+//@ compile-flags: -O -C no-prepopulate-passes
 //
-//[x32] only-x86
-//[x64] only-x86_64
-//[sparc] only-sparc
-//[sparc64] only-sparc64
-// ignore-windows
+//@[x32] only-x86
+//@[x64] only-x86_64
+//@[sparc] only-sparc
+//@[sparc64] only-sparc64
+//@ ignore-windows
 // See ./transparent.rs
 // Some platforms pass large aggregates using immediate arrays in LLVMIR
 // Other platforms pass large aggregates using struct pointer in LLVMIR
diff --git a/tests/codegen/repr/transparent-sysv64.rs b/tests/codegen/repr/transparent-sysv64.rs
index 886b0dd9e7b..10524adf7d7 100644
--- a/tests/codegen/repr/transparent-sysv64.rs
+++ b/tests/codegen/repr/transparent-sysv64.rs
@@ -1,6 +1,6 @@
-// only-x86_64
+//@ only-x86_64
 
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/repr/transparent.rs b/tests/codegen/repr/transparent.rs
index c5974248bb3..17ec476035f 100644
--- a/tests/codegen/repr/transparent.rs
+++ b/tests/codegen/repr/transparent.rs
@@ -1,7 +1,7 @@
-// compile-flags: -O -C no-prepopulate-passes
-// ignore-riscv64 riscv64 has an i128 type used with test_Vector
-// ignore-s390x s390x with default march passes vector types per reference
-// ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests
+//@ compile-flags: -O -C no-prepopulate-passes
+//@ ignore-riscv64 riscv64 has an i128 type used with test_Vector
+//@ ignore-s390x s390x with default march passes vector types per reference
+//@ ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests
 
 // This codegen test embeds assumptions about how certain "C" psABIs are handled
 // so it doesn't apply to all architectures or even all OS
diff --git a/tests/codegen/riscv-abi/call-llvm-intrinsics.rs b/tests/codegen/riscv-abi/call-llvm-intrinsics.rs
index 31a88f2c0a9..c3f795e8857 100644
--- a/tests/codegen/riscv-abi/call-llvm-intrinsics.rs
+++ b/tests/codegen/riscv-abi/call-llvm-intrinsics.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
-// only-riscv64
+//@ only-riscv64
 
 #![feature(link_llvm_intrinsics)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs b/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs
index fdb9c6217de..95c936ece73 100644
--- a/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs
+++ b/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs
@@ -1,5 +1,5 @@
-// compile-flags: --target riscv64gc-unknown-linux-gnu -O -C no-prepopulate-passes
-// needs-llvm-components: riscv
+//@ compile-flags: --target riscv64gc-unknown-linux-gnu -O -C no-prepopulate-passes
+//@ needs-llvm-components: riscv
 
 #![crate_type = "lib"]
 #![no_core]
diff --git a/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs b/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs
index 1555acadfbc..060d91a2696 100644
--- a/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs
+++ b/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs
@@ -1,7 +1,7 @@
 //
-// compile-flags: -C no-prepopulate-passes
-// only-riscv64
-// only-linux
+//@ compile-flags: -C no-prepopulate-passes
+//@ only-riscv64
+//@ only-linux
 #![crate_type = "lib"]
 
 // CHECK: define void @f_fpr_tracking(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i8 zeroext %i)
diff --git a/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs b/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs
index f08fabed421..3d0512817f7 100644
--- a/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs
+++ b/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs
@@ -1,7 +1,7 @@
 //
-// compile-flags: -C no-prepopulate-passes
-// only-riscv64
-// only-linux
+//@ compile-flags: -C no-prepopulate-passes
+//@ only-riscv64
+//@ only-linux
 #![crate_type = "lib"]
 
 // CHECK: define void @f_fpr_tracking(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, i8 zeroext %i)
diff --git a/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs b/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs
index e9dd04e1927..8ffa235c18f 100644
--- a/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs
+++ b/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs
@@ -15,13 +15,13 @@
 // narrower than really needed (i.e. narrower than ELF-or-MachO), but this seems ok - having a
 // linux-only regression test should be sufficient here.
 //
-// needs-sanitizer-address
-// only-linux
+//@ needs-sanitizer-address
+//@ only-linux
 //
-// revisions:ASAN ASAN-FAT-LTO
-//                compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static
-//[ASAN]          compile-flags:
-//[ASAN-FAT-LTO]  compile-flags: -Cprefer-dynamic=false -Clto=fat
+//@ revisions:ASAN ASAN-FAT-LTO
+//@                compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static
+//@[ASAN]          compile-flags:
+//@[ASAN-FAT-LTO]  compile-flags: -Cprefer-dynamic=false -Clto=fat
 
 #![crate_type="staticlib"]
 
diff --git a/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs b/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs
index 1ee8bdfc3ab..f122fbdc086 100644
--- a/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs
+++ b/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs
@@ -1,7 +1,7 @@
 // Verifies that "CFI Canonical Jump Tables" module flag is added.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs b/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs
index 68c91384b82..05eea13c6ee 100644
--- a/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs
+++ b/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs
@@ -1,7 +1,7 @@
 // Verifies that "EnableSplitLTOUnit" module flag is added.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs b/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs
index a3cd16e3dd5..9e0cc346afb 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs
@@ -1,7 +1,7 @@
 // Verifies that pointer type membership tests for indirect calls are omitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(no_sanitize)]
diff --git a/tests/codegen/sanitizer/cfi-emit-type-checks.rs b/tests/codegen/sanitizer/cfi-emit-type-checks.rs
index f0fe5de9f66..6ec6f0e5476 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-checks.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-checks.rs
@@ -1,7 +1,7 @@
 // Verifies that pointer type membership tests for indirect calls are emitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs
index f16890afad0..f15ca30b7e3 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs
@@ -1,7 +1,7 @@
 // Verifies that user-defined CFI encoding for types are emitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(cfi_encoding, extern_types)]
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs
index 4ed7c27fc4e..5f49909712f 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs
@@ -1,7 +1,7 @@
 // Verifies that type metadata identifiers for functions are emitted correctly.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type="lib"]
 #![allow(dead_code)]
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs
index d200ed9798a..ccd7ee93ca1 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs
@@ -1,7 +1,7 @@
 // Verifies that generalized type metadata for functions are emitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs
index cdefec17a1c..d4130034178 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs
@@ -1,7 +1,7 @@
 // Verifies that normalized and generalized type metadata for functions are emitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs
index f360b33ddcf..ac18379165d 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs
@@ -1,7 +1,7 @@
 // Verifies that normalized type metadata for functions are emitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs
index 3cb817b212d..526ba62c264 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs
@@ -1,7 +1,7 @@
 // Verifies that type metadata for functions are emitted.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs
index b69e57261a8..318aad9291c 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs
@@ -1,7 +1,7 @@
 // Verifies that type metadata identifiers for trait objects are emitted correctly.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Ctarget-feature=-crt-static -Zsanitizer=cfi
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Ctarget-feature=-crt-static -Zsanitizer=cfi
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-generalize-pointers.rs b/tests/codegen/sanitizer/cfi-generalize-pointers.rs
index 17cb42d3e74..eaf3dad1909 100644
--- a/tests/codegen/sanitizer/cfi-generalize-pointers.rs
+++ b/tests/codegen/sanitizer/cfi-generalize-pointers.rs
@@ -1,7 +1,7 @@
 // Verifies that pointer types are generalized.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers -Copt-level=0
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-normalize-integers.rs b/tests/codegen/sanitizer/cfi-normalize-integers.rs
index d3cece4c7b6..210814eb9ae 100644
--- a/tests/codegen/sanitizer/cfi-normalize-integers.rs
+++ b/tests/codegen/sanitizer/cfi-normalize-integers.rs
@@ -1,7 +1,7 @@
 // Verifies that integer types are normalized.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Copt-level=0
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
index 18d315c9598..56ee875286a 100644
--- a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
+++ b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
@@ -1,15 +1,15 @@
 // Verifies that `-Zsanitizer=kernel-address` emits sanitizer instrumentation.
 
-// compile-flags: -Zsanitizer=kernel-address -Copt-level=0
-// revisions: aarch64 riscv64imac riscv64gc x86_64
-//[aarch64] compile-flags: --target aarch64-unknown-none
-//[aarch64] needs-llvm-components: aarch64
-//[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf
-//[riscv64imac] needs-llvm-components: riscv
-//[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf
-//[riscv64gc] needs-llvm-components: riscv
-//[x86_64] compile-flags: --target x86_64-unknown-none
-//[x86_64] needs-llvm-components: x86
+//@ compile-flags: -Zsanitizer=kernel-address -Copt-level=0
+//@ revisions: aarch64 riscv64imac riscv64gc x86_64
+//@[aarch64] compile-flags: --target aarch64-unknown-none
+//@[aarch64] needs-llvm-components: aarch64
+//@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf
+//@[riscv64imac] needs-llvm-components: riscv
+//@[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf
+//@[riscv64gc] needs-llvm-components: riscv
+//@[x86_64] compile-flags: --target x86_64-unknown-none
+//@[x86_64] needs-llvm-components: x86
 
 #![crate_type = "rlib"]
 #![feature(no_core, no_sanitize, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs b/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs
index 6d466b93c40..7751d3baf79 100644
--- a/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs
+++ b/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs
@@ -1,11 +1,11 @@
 // Verifies that "kcfi" module flag is added.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components: x86
-// compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components: x86
+//@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi
 
 #![feature(no_core, lang_items)]
 #![crate_type="lib"]
diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs
index 001fc956aaa..50e591ba06b 100644
--- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs
@@ -1,11 +1,11 @@
 // Verifies that KCFI operand bundles are omitted.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(no_core, no_sanitize, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs
index 29e4df3511f..bd1dfc4c413 100644
--- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs
@@ -1,11 +1,11 @@
 // Verifies that generalized KCFI type metadata for functions are emitted.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-generalize-pointers
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-generalize-pointers
 
 #![crate_type="lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs
index 84d678a33ba..b8275f44fac 100644
--- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs
@@ -1,11 +1,11 @@
 // Verifies that normalized and generalized KCFI type metadata for functions are emitted.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers
 
 #![crate_type="lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs
index 761c37a9e06..cd1b0c5efb0 100644
--- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs
@@ -1,11 +1,11 @@
 // Verifies that normalized KCFI type metadata for functions are emitted.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers
 
 #![crate_type="lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs
index 83cda0ef136..12690577da7 100644
--- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs
@@ -1,11 +1,11 @@
 // Verifies that KCFI type metadata for functions are emitted.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs
index e1d617b5ee1..f4b3e48638e 100644
--- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs
@@ -1,11 +1,11 @@
 // Verifies that KCFI operand bundles are emitted.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs b/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs
index 7aed137f215..f08c9e6702e 100644
--- a/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs
+++ b/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs
@@ -1,11 +1,11 @@
 // Verifies that type metadata identifiers for trait objects are emitted correctly.
 //
-// revisions: aarch64 x86_64
-// [aarch64] compile-flags: --target aarch64-unknown-none
-// [aarch64] needs-llvm-components: aarch64
-// [x86_64] compile-flags: --target x86_64-unknown-none
-// [x86_64] needs-llvm-components:
-// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
+//@ revisions: aarch64 x86_64
+//@ [aarch64] compile-flags: --target aarch64-unknown-none
+//@ [aarch64] needs-llvm-components: aarch64
+//@ [x86_64] compile-flags: --target x86_64-unknown-none
+//@ [x86_64] needs-llvm-components:
+//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(arbitrary_self_types, no_core, lang_items)]
diff --git a/tests/codegen/sanitizer/memory-track-origins.rs b/tests/codegen/sanitizer/memory-track-origins.rs
index e15a3b2274e..956053ec42c 100644
--- a/tests/codegen/sanitizer/memory-track-origins.rs
+++ b/tests/codegen/sanitizer/memory-track-origins.rs
@@ -1,15 +1,15 @@
 // Verifies that MemorySanitizer track-origins level can be controlled
 // with -Zsanitizer-memory-track-origins option.
 //
-// needs-sanitizer-memory
-// revisions:MSAN-0 MSAN-1 MSAN-2 MSAN-1-LTO MSAN-2-LTO
+//@ needs-sanitizer-memory
+//@ revisions:MSAN-0 MSAN-1 MSAN-2 MSAN-1-LTO MSAN-2-LTO
 //
-// compile-flags: -Zsanitizer=memory -Ctarget-feature=-crt-static
-//[MSAN-0] compile-flags:
-//[MSAN-1] compile-flags: -Zsanitizer-memory-track-origins=1
-//[MSAN-2] compile-flags: -Zsanitizer-memory-track-origins
-//[MSAN-1-LTO] compile-flags: -Zsanitizer-memory-track-origins=1 -C lto=fat
-//[MSAN-2-LTO] compile-flags: -Zsanitizer-memory-track-origins -C lto=fat
+//@ compile-flags: -Zsanitizer=memory -Ctarget-feature=-crt-static
+//@[MSAN-0] compile-flags:
+//@[MSAN-1] compile-flags: -Zsanitizer-memory-track-origins=1
+//@[MSAN-2] compile-flags: -Zsanitizer-memory-track-origins
+//@[MSAN-1-LTO] compile-flags: -Zsanitizer-memory-track-origins=1 -C lto=fat
+//@[MSAN-2-LTO] compile-flags: -Zsanitizer-memory-track-origins -C lto=fat
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/memtag-attr-check.rs b/tests/codegen/sanitizer/memtag-attr-check.rs
index 3e5e14e8429..ffe3a2322a2 100644
--- a/tests/codegen/sanitizer/memtag-attr-check.rs
+++ b/tests/codegen/sanitizer/memtag-attr-check.rs
@@ -1,8 +1,8 @@
 // This tests that the sanitize_memtag attribute is
 // applied when enabling the memtag sanitizer.
 //
-// needs-sanitizer-memtag
-// compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte -Copt-level=0
+//@ needs-sanitizer-memtag
+//@ compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/sanitizer/no-sanitize-inlining.rs b/tests/codegen/sanitizer/no-sanitize-inlining.rs
index e371b19eb36..623bfa608ca 100644
--- a/tests/codegen/sanitizer/no-sanitize-inlining.rs
+++ b/tests/codegen/sanitizer/no-sanitize-inlining.rs
@@ -1,12 +1,12 @@
 // Verifies that no_sanitize attribute prevents inlining when
 // given sanitizer is enabled, but has no effect on inlining otherwise.
 //
-// needs-sanitizer-address
-// needs-sanitizer-leak
-// revisions: ASAN LSAN
-//       compile-flags: -Copt-level=3 -Zmir-opt-level=4 -Ctarget-feature=-crt-static
-//[ASAN] compile-flags: -Zsanitizer=address
-//[LSAN] compile-flags: -Zsanitizer=leak
+//@ needs-sanitizer-address
+//@ needs-sanitizer-leak
+//@ revisions: ASAN LSAN
+//@       compile-flags: -Copt-level=3 -Zmir-opt-level=4 -Ctarget-feature=-crt-static
+//@[ASAN] compile-flags: -Zsanitizer=address
+//@[LSAN] compile-flags: -Zsanitizer=leak
 
 #![crate_type="lib"]
 #![feature(no_sanitize)]
diff --git a/tests/codegen/sanitizer/no-sanitize.rs b/tests/codegen/sanitizer/no-sanitize.rs
index 029cf8e7f5c..2614416210f 100644
--- a/tests/codegen/sanitizer/no-sanitize.rs
+++ b/tests/codegen/sanitizer/no-sanitize.rs
@@ -1,8 +1,8 @@
 // Verifies that no_sanitize attribute can be used to
 // selectively disable sanitizer instrumentation.
 //
-// needs-sanitizer-address
-// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0
+//@ needs-sanitizer-address
+//@ compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(no_sanitize)]
diff --git a/tests/codegen/sanitizer/safestack-attr-check.rs b/tests/codegen/sanitizer/safestack-attr-check.rs
index b19e2d13133..050a60333af 100644
--- a/tests/codegen/sanitizer/safestack-attr-check.rs
+++ b/tests/codegen/sanitizer/safestack-attr-check.rs
@@ -1,7 +1,7 @@
 // This tests that the safestack attribute is applied when enabling the safe-stack sanitizer.
 //
-// needs-sanitizer-safestack
-// compile-flags: -Zsanitizer=safestack -Copt-level=0
+//@ needs-sanitizer-safestack
+//@ compile-flags: -Zsanitizer=safestack -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/sanitizer/sanitizer-recover.rs b/tests/codegen/sanitizer/sanitizer-recover.rs
index 59b1fdd6494..6b659320481 100644
--- a/tests/codegen/sanitizer/sanitizer-recover.rs
+++ b/tests/codegen/sanitizer/sanitizer-recover.rs
@@ -1,17 +1,17 @@
 // Verifies that AddressSanitizer and MemorySanitizer
 // recovery mode can be enabled with -Zsanitizer-recover.
 //
-// needs-sanitizer-address
-// needs-sanitizer-memory
-// revisions:ASAN ASAN-RECOVER MSAN MSAN-RECOVER MSAN-RECOVER-LTO
-// no-prefer-dynamic
-//
-//                   compile-flags: -Ctarget-feature=-crt-static
-//[ASAN]             compile-flags: -Zsanitizer=address -Copt-level=0
-//[ASAN-RECOVER]     compile-flags: -Zsanitizer=address -Zsanitizer-recover=address -Copt-level=0
-//[MSAN]             compile-flags: -Zsanitizer=memory
-//[MSAN-RECOVER]     compile-flags: -Zsanitizer=memory  -Zsanitizer-recover=memory
-//[MSAN-RECOVER-LTO] compile-flags: -Zsanitizer=memory  -Zsanitizer-recover=memory -C lto=fat
+//@ needs-sanitizer-address
+//@ needs-sanitizer-memory
+//@ revisions:ASAN ASAN-RECOVER MSAN MSAN-RECOVER MSAN-RECOVER-LTO
+//@ no-prefer-dynamic
+//
+//@                   compile-flags: -Ctarget-feature=-crt-static
+//@[ASAN]             compile-flags: -Zsanitizer=address -Copt-level=0
+//@[ASAN-RECOVER]     compile-flags: -Zsanitizer=address -Zsanitizer-recover=address -Copt-level=0
+//@[MSAN]             compile-flags: -Zsanitizer=memory
+//@[MSAN-RECOVER]     compile-flags: -Zsanitizer=memory  -Zsanitizer-recover=memory
+//@[MSAN-RECOVER-LTO] compile-flags: -Zsanitizer=memory  -Zsanitizer-recover=memory -C lto=fat
 //
 // MSAN-NOT:         @__msan_keep_going
 // MSAN-RECOVER:     @__msan_keep_going = weak_odr {{.*}}constant i32 1
diff --git a/tests/codegen/sanitizer/scs-attr-check.rs b/tests/codegen/sanitizer/scs-attr-check.rs
index a885d911717..6f4cbc2c0a6 100644
--- a/tests/codegen/sanitizer/scs-attr-check.rs
+++ b/tests/codegen/sanitizer/scs-attr-check.rs
@@ -1,8 +1,8 @@
 // This tests that the shadowcallstack attribute is
 // applied when enabling the shadow-call-stack sanitizer.
 //
-// needs-sanitizer-shadow-call-stack
-// compile-flags: -Zsanitizer=shadow-call-stack
+//@ needs-sanitizer-shadow-call-stack
+//@ compile-flags: -Zsanitizer=shadow-call-stack
 
 #![crate_type = "lib"]
 #![feature(no_sanitize)]
diff --git a/tests/codegen/scalar-pair-bool.rs b/tests/codegen/scalar-pair-bool.rs
index a8d16bc8f29..fce0648e450 100644
--- a/tests/codegen/scalar-pair-bool.rs
+++ b/tests/codegen/scalar-pair-bool.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/set-discriminant-invalid.rs b/tests/codegen/set-discriminant-invalid.rs
index bccb9e4c758..593da8cf80d 100644
--- a/tests/codegen/set-discriminant-invalid.rs
+++ b/tests/codegen/set-discriminant-invalid.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=0
+//@ compile-flags: -C opt-level=0
 #![crate_type = "lib"]
 
 pub enum ApiError {}
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs
index e7bb2327a6e..3eb1c9d4051 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs
index e33482d7556..05c2c0f6d04 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs
index 0f52952bc0c..8b51e76a515 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs
index 1154acf6924..370bacdaee9 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs
index 929dc9ac8df..888ec6ec42c 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs
index 56ca644f6bd..b15d89a15b2 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs
index fd65cb72baa..16017526c34 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs
index adc1919256e..9e0f7edd62b 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs
index c072519c0d6..0324411c91b 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs
index 5fd64899507..e7e2b0838cc 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs
index 35175f0ca57..912e15c6a1d 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs
index 4e0abed78cd..ad297952916 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs
index 3b8d611ab67..1ae983ca20b 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs
index e80c50c1076..638b78b2d72 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs
index 9e3fab49aff..c0caedb7498 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs
index 0bcfacec6d7..1426b439c44 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs
index ea24569bd10..43012dece62 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs
index 0bb21019685..29d9e4018e0 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs
@@ -1,6 +1,6 @@
 //
 
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
index e573b7d21bd..7c48f7d5120 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
index 91656622216..366592ba3f1 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs
index 51953560b4f..ccfedb31dc5 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs
@@ -1,6 +1,6 @@
 //
 
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs
index 03bb2265526..903bd3f4dc6 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs
index eb4ce307e70..c92ae4163ae 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs
@@ -1,5 +1,5 @@
 //
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 #![allow(non_camel_case_types)]
diff --git a/tests/codegen/simd/issue-120720-reduce-nan.rs b/tests/codegen/simd/issue-120720-reduce-nan.rs
index c2ffca4bd87..2c6098c0489 100644
--- a/tests/codegen/simd/issue-120720-reduce-nan.rs
+++ b/tests/codegen/simd/issue-120720-reduce-nan.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=3 -C target-cpu=cannonlake
-// only-x86_64
+//@ compile-flags: -C opt-level=3 -C target-cpu=cannonlake
+//@ only-x86_64
 
 // In a previous implementation, _mm512_reduce_add_pd did the reduction with all fast-math flags
 // enabled, making it UB to reduce a vector containing a NaN.
diff --git a/tests/codegen/simd/simd-wide-sum.rs b/tests/codegen/simd/simd-wide-sum.rs
index 109d5381343..010500139e5 100644
--- a/tests/codegen/simd/simd-wide-sum.rs
+++ b/tests/codegen/simd/simd-wide-sum.rs
@@ -1,9 +1,9 @@
-// revisions: llvm mir-opt3
-// compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021
-// only-x86_64
-// ignore-debug: the debug assertions get in the way
-// [mir-opt3]compile-flags: -Zmir-opt-level=3
-// [mir-opt3]build-pass
+//@ revisions: llvm mir-opt3
+//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021
+//@ only-x86_64
+//@ ignore-debug: the debug assertions get in the way
+//@ [mir-opt3]compile-flags: -Zmir-opt-level=3
+//@ [mir-opt3]build-pass
 
 // mir-opt3 is a regression test for https://github.com/rust-lang/rust/issues/98016
 
diff --git a/tests/codegen/simd/simd_arith_offset.rs b/tests/codegen/simd/simd_arith_offset.rs
index 1ee73de1186..9f1ef27053e 100644
--- a/tests/codegen/simd/simd_arith_offset.rs
+++ b/tests/codegen/simd/simd_arith_offset.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C no-prepopulate-passes
-// only-64bit (because the LLVM type of i64 for usize shows up)
+//@ compile-flags: -C no-prepopulate-passes
+//@ only-64bit (because the LLVM type of i64 for usize shows up)
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/simd/swap-simd-types.rs b/tests/codegen/simd/swap-simd-types.rs
index 3472a42b0e6..e03e2d4ff8d 100644
--- a/tests/codegen/simd/swap-simd-types.rs
+++ b/tests/codegen/simd/swap-simd-types.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -C target-feature=+avx
-// only-x86_64
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O -C target-feature=+avx
+//@ only-x86_64
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/slice-as_chunks.rs b/tests/codegen/slice-as_chunks.rs
index e832f90d07a..c9cd482a9a4 100644
--- a/tests/codegen/slice-as_chunks.rs
+++ b/tests/codegen/slice-as_chunks.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-64bit (because the LLVM type of i64 for usize shows up)
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ only-64bit (because the LLVM type of i64 for usize shows up)
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 #![feature(slice_as_chunks)]
diff --git a/tests/codegen/slice-indexing.rs b/tests/codegen/slice-indexing.rs
index c40d59fb0cf..52714a76a8d 100644
--- a/tests/codegen/slice-indexing.rs
+++ b/tests/codegen/slice-indexing.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-64bit (because the LLVM type of i64 for usize shows up)
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ only-64bit (because the LLVM type of i64 for usize shows up)
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/slice-init.rs b/tests/codegen/slice-init.rs
index c0bf1a04119..8126bf84618 100644
--- a/tests/codegen/slice-init.rs
+++ b/tests/codegen/slice-init.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/slice-iter-fold.rs b/tests/codegen/slice-iter-fold.rs
index a55425cb6bb..5a9d789b984 100644
--- a/tests/codegen/slice-iter-fold.rs
+++ b/tests/codegen/slice-iter-fold.rs
@@ -1,5 +1,5 @@
-// ignore-debug: the debug assertions get in the way
-// compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 // CHECK-LABEL: @slice_fold_to_last
diff --git a/tests/codegen/slice-iter-len-eq-zero.rs b/tests/codegen/slice-iter-len-eq-zero.rs
index 77febf5170d..43c64511e52 100644
--- a/tests/codegen/slice-iter-len-eq-zero.rs
+++ b/tests/codegen/slice-iter-len-eq-zero.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug: the debug assertions add extra comparisons
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions add extra comparisons
 #![crate_type = "lib"]
 
 type Demo = [u8; 3];
diff --git a/tests/codegen/slice-iter-nonnull.rs b/tests/codegen/slice-iter-nonnull.rs
index 93c8828ccd3..c82ae3b61b4 100644
--- a/tests/codegen/slice-iter-nonnull.rs
+++ b/tests/codegen/slice-iter-nonnull.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug (these add extra checks that make it hard to verify)
+//@ compile-flags: -O
+//@ ignore-debug (these add extra checks that make it hard to verify)
 #![crate_type = "lib"]
 #![feature(exact_size_is_empty)]
 
diff --git a/tests/codegen/slice-position-bounds-check.rs b/tests/codegen/slice-position-bounds-check.rs
index 57904e5e499..301895883ee 100644
--- a/tests/codegen/slice-position-bounds-check.rs
+++ b/tests/codegen/slice-position-bounds-check.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C panic=abort
+//@ compile-flags: -O -C panic=abort
 #![crate_type = "lib"]
 
 fn search<T: Ord + Eq>(arr: &mut [T], a: &T) -> Result<usize, ()> {
diff --git a/tests/codegen/slice-ref-equality.rs b/tests/codegen/slice-ref-equality.rs
index afbdf66ce0a..d34aecd1903 100644
--- a/tests/codegen/slice-ref-equality.rs
+++ b/tests/codegen/slice-ref-equality.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Zmerge-functions=disabled
-// ignore-debug (the extra assertions get in the way)
+//@ compile-flags: -O -Zmerge-functions=disabled
+//@ ignore-debug (the extra assertions get in the way)
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/slice-reverse.rs b/tests/codegen/slice-reverse.rs
index e50b22f3ac4..40bc89bc9d0 100644
--- a/tests/codegen/slice-reverse.rs
+++ b/tests/codegen/slice-reverse.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-x86_64
-// ignore-debug: the debug assertions in from_raw_parts get in the way
+//@ compile-flags: -O
+//@ only-x86_64
+//@ ignore-debug: the debug assertions in from_raw_parts get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/slice-windows-no-bounds-check.rs b/tests/codegen/slice-windows-no-bounds-check.rs
index 4f5f4425c27..188011ebe7f 100644
--- a/tests/codegen/slice-windows-no-bounds-check.rs
+++ b/tests/codegen/slice-windows-no-bounds-check.rs
@@ -1,6 +1,6 @@
 #![crate_type = "lib"]
 
-// compile-flags: -O
+//@ compile-flags: -O
 
 use std::slice::Windows;
 
diff --git a/tests/codegen/slice_as_from_ptr_range.rs b/tests/codegen/slice_as_from_ptr_range.rs
index 3d8ab0a4b5f..cc811e8f589 100644
--- a/tests/codegen/slice_as_from_ptr_range.rs
+++ b/tests/codegen/slice_as_from_ptr_range.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-64bit (because we're using [ui]size)
-// ignore-debug (because the assertions get in the way)
+//@ compile-flags: -O
+//@ only-64bit (because we're using [ui]size)
+//@ ignore-debug (because the assertions get in the way)
 
 #![crate_type = "lib"]
 #![feature(slice_from_ptr_range)]
diff --git a/tests/codegen/some-abis-do-extend-params-to-32-bits.rs b/tests/codegen/some-abis-do-extend-params-to-32-bits.rs
index 9f2d9d06524..a75a239e2ab 100644
--- a/tests/codegen/some-abis-do-extend-params-to-32-bits.rs
+++ b/tests/codegen/some-abis-do-extend-params-to-32-bits.rs
@@ -1,21 +1,21 @@
-// compile-flags: -Cno-prepopulate-passes -Copt-level=0
-
-// revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv
-
-//[x86_64] compile-flags: --target x86_64-unknown-uefi
-//[x86_64] needs-llvm-components: x86
-//[i686] compile-flags: --target i686-unknown-linux-musl
-//[i686] needs-llvm-components: x86
-//[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc
-//[aarch64-windows] needs-llvm-components: aarch64
-//[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu
-//[aarch64-linux] needs-llvm-components: aarch64
-//[aarch64-apple] compile-flags: --target aarch64-apple-darwin
-//[aarch64-apple] needs-llvm-components: aarch64
-//[arm] compile-flags: --target armv7r-none-eabi
-//[arm] needs-llvm-components: arm
-//[riscv] compile-flags: --target riscv64gc-unknown-none-elf
-//[riscv] needs-llvm-components: riscv
+//@ compile-flags: -Cno-prepopulate-passes -Copt-level=0
+
+//@ revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv
+
+//@[x86_64] compile-flags: --target x86_64-unknown-uefi
+//@[x86_64] needs-llvm-components: x86
+//@[i686] compile-flags: --target i686-unknown-linux-musl
+//@[i686] needs-llvm-components: x86
+//@[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc
+//@[aarch64-windows] needs-llvm-components: aarch64
+//@[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu
+//@[aarch64-linux] needs-llvm-components: aarch64
+//@[aarch64-apple] compile-flags: --target aarch64-apple-darwin
+//@[aarch64-apple] needs-llvm-components: aarch64
+//@[arm] compile-flags: --target armv7r-none-eabi
+//@[arm] needs-llvm-components: arm
+//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf
+//@[riscv] needs-llvm-components: riscv
 
 // See bottom of file for a corresponding C source file that is meant to yield
 // equivalent declarations.
diff --git a/tests/codegen/some-global-nonnull.rs b/tests/codegen/some-global-nonnull.rs
index 59c47de4129..8e9308a7265 100644
--- a/tests/codegen/some-global-nonnull.rs
+++ b/tests/codegen/some-global-nonnull.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/sparc-struct-abi.rs b/tests/codegen/sparc-struct-abi.rs
index b94ef79aec7..0850e9e15ea 100644
--- a/tests/codegen/sparc-struct-abi.rs
+++ b/tests/codegen/sparc-struct-abi.rs
@@ -1,8 +1,8 @@
 // Checks that we correctly codegen extern "C" functions returning structs.
 // See issues #52638 and #86163.
 
-// compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
-// needs-llvm-components: sparc
+//@ compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
+//@ needs-llvm-components: sparc
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/codegen/split-lto-unit.rs b/tests/codegen/split-lto-unit.rs
index dc6570be32b..6cea9a2d8d5 100644
--- a/tests/codegen/split-lto-unit.rs
+++ b/tests/codegen/split-lto-unit.rs
@@ -1,7 +1,7 @@
 // Verifies that "EnableSplitLTOUnit" module flag is added.
 //
-// needs-sanitizer-cfi
-// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
+//@ needs-sanitizer-cfi
+//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
index 6ef0f0406d2..7aec8d545dc 100644
--- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
+++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Z src-hash-algorithm=md5 -Copt-level=0
+//@ compile-flags: -g -Z src-hash-algorithm=md5 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
index ebfa3040aca..5389c32f938 100644
--- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
+++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Z src-hash-algorithm=sha1 -Copt-level=0
+//@ compile-flags: -g -Z src-hash-algorithm=sha1 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
index 5ec678d55f3..520890c47f1 100644
--- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
+++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Z src-hash-algorithm=sha256 -Copt-level=0
+//@ compile-flags: -g -Z src-hash-algorithm=sha256 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/sroa-fragment-debuginfo.rs b/tests/codegen/sroa-fragment-debuginfo.rs
index fb10f63beaf..d8c2d2c6f9e 100644
--- a/tests/codegen/sroa-fragment-debuginfo.rs
+++ b/tests/codegen/sroa-fragment-debuginfo.rs
@@ -1,8 +1,8 @@
-// compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates
-// compile-flags: -Cno-prepopulate-passes
+//@ compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates
+//@ compile-flags: -Cno-prepopulate-passes
 //
 // Tested offsets are only correct for x86_64.
-// only-x86_64
+//@ only-x86_64
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/sse42-implies-crc32.rs b/tests/codegen/sse42-implies-crc32.rs
index 56079d32a8d..c627be5c30e 100644
--- a/tests/codegen/sse42-implies-crc32.rs
+++ b/tests/codegen/sse42-implies-crc32.rs
@@ -1,5 +1,5 @@
-// only-x86_64
-// compile-flags: -Copt-level=3
+//@ only-x86_64
+//@ compile-flags: -Copt-level=3
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/stack-probes-inline.rs b/tests/codegen/stack-probes-inline.rs
index 34027e91850..6bd6b0cb354 100644
--- a/tests/codegen/stack-probes-inline.rs
+++ b/tests/codegen/stack-probes-inline.rs
@@ -1,22 +1,22 @@
 // Check the "probe-stack" attribute for targets with `StackProbeType::Inline`,
 // or `StackProbeType::InlineOrCall` when running on newer LLVM.
 
-// compile-flags: -C no-prepopulate-passes
-// revisions: aarch64 powerpc powerpc64 powerpc64le s390x i686 x86_64
-//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
-//[aarch64] needs-llvm-components: aarch64
-//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
-//[powerpc] needs-llvm-components: powerpc
-//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
-//[powerpc64] needs-llvm-components: powerpc
-//[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu
-//[powerpc64le] needs-llvm-components: powerpc
-//[s390x] compile-flags: --target s390x-unknown-linux-gnu
-//[s390x] needs-llvm-components: systemz
-//[i686] compile-flags: --target i686-unknown-linux-gnu
-//[i686] needs-llvm-components: x86
-//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
-//[x86_64] needs-llvm-components: x86
+//@ compile-flags: -C no-prepopulate-passes
+//@ revisions: aarch64 powerpc powerpc64 powerpc64le s390x i686 x86_64
+//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//@[aarch64] needs-llvm-components: aarch64
+//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
+//@[powerpc] needs-llvm-components: powerpc
+//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
+//@[powerpc64] needs-llvm-components: powerpc
+//@[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu
+//@[powerpc64le] needs-llvm-components: powerpc
+//@[s390x] compile-flags: --target s390x-unknown-linux-gnu
+//@[s390x] needs-llvm-components: systemz
+//@[i686] compile-flags: --target i686-unknown-linux-gnu
+//@[i686] needs-llvm-components: x86
+//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
+//@[x86_64] needs-llvm-components: x86
 
 #![crate_type = "rlib"]
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/stack-protector.rs b/tests/codegen/stack-protector.rs
index a680789af15..8ab25b470cd 100644
--- a/tests/codegen/stack-protector.rs
+++ b/tests/codegen/stack-protector.rs
@@ -1,8 +1,8 @@
-// revisions: all strong basic none
-// ignore-nvptx64 stack protector not supported
-// [all] compile-flags: -Z stack-protector=all
-// [strong] compile-flags: -Z stack-protector=strong
-// [basic] compile-flags: -Z stack-protector=basic
+//@ revisions: all strong basic none
+//@ ignore-nvptx64 stack protector not supported
+//@ [all] compile-flags: -Z stack-protector=all
+//@ [strong] compile-flags: -Z stack-protector=strong
+//@ [basic] compile-flags: -Z stack-protector=basic
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/static-relocation-model-msvc.rs b/tests/codegen/static-relocation-model-msvc.rs
index 735ef7081c9..5501827498c 100644
--- a/tests/codegen/static-relocation-model-msvc.rs
+++ b/tests/codegen/static-relocation-model-msvc.rs
@@ -1,8 +1,8 @@
 // Verify linkage of external symbols in the static relocation model on MSVC.
 //
-// compile-flags: -O -C relocation-model=static
-// aux-build: extern_decl.rs
-// only-x86_64-pc-windows-msvc
+//@ compile-flags: -O -C relocation-model=static
+//@ aux-build: extern_decl.rs
+//@ only-x86_64-pc-windows-msvc
 
 #![crate_type = "rlib"]
 
diff --git a/tests/codegen/staticlib-external-inline-fns.rs b/tests/codegen/staticlib-external-inline-fns.rs
index 432c063e826..23316a2d9a5 100644
--- a/tests/codegen/staticlib-external-inline-fns.rs
+++ b/tests/codegen/staticlib-external-inline-fns.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "staticlib"]
 
diff --git a/tests/codegen/stores.rs b/tests/codegen/stores.rs
index a8e155c4c8a..3fda5aa47ea 100644
--- a/tests/codegen/stores.rs
+++ b/tests/codegen/stores.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 //
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/swap-large-types.rs b/tests/codegen/swap-large-types.rs
index 7b6611f3da4..20697890814 100644
--- a/tests/codegen/swap-large-types.rs
+++ b/tests/codegen/swap-large-types.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O
-// only-x86_64
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ only-x86_64
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/swap-small-types.rs b/tests/codegen/swap-small-types.rs
index 2c675174479..8d7f9f49eef 100644
--- a/tests/codegen/swap-small-types.rs
+++ b/tests/codegen/swap-small-types.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -Z merge-functions=disabled
-// only-x86_64
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O -Z merge-functions=disabled
+//@ only-x86_64
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/target-cpu-on-functions.rs b/tests/codegen/target-cpu-on-functions.rs
index d5250f22cca..25c10e7ce44 100644
--- a/tests/codegen/target-cpu-on-functions.rs
+++ b/tests/codegen/target-cpu-on-functions.rs
@@ -1,9 +1,9 @@
 // This test makes sure that functions get annotated with the proper
 // "target-cpu" attribute in LLVM.
 
-// no-prefer-dynamic
+//@ no-prefer-dynamic
 //
-// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals
+//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals
 
 #![crate_type = "staticlib"]
 
diff --git a/tests/codegen/target-feature-inline-closure.rs b/tests/codegen/target-feature-inline-closure.rs
index 54cb27242d5..88bd413a870 100644
--- a/tests/codegen/target-feature-inline-closure.rs
+++ b/tests/codegen/target-feature-inline-closure.rs
@@ -1,5 +1,5 @@
-// only-x86_64
-// compile-flags: -Copt-level=3
+//@ only-x86_64
+//@ compile-flags: -Copt-level=3
 
 #![crate_type = "lib"]
 #![feature(target_feature_11)]
diff --git a/tests/codegen/target-feature-overrides.rs b/tests/codegen/target-feature-overrides.rs
index 1bebf66f0df..61b1b3fd257 100644
--- a/tests/codegen/target-feature-overrides.rs
+++ b/tests/codegen/target-feature-overrides.rs
@@ -1,8 +1,8 @@
-// revisions: COMPAT INCOMPAT
-// needs-llvm-components: x86
-// compile-flags: --target=x86_64-unknown-linux-gnu -Copt-level=3
-// [COMPAT] compile-flags: -Ctarget-feature=+avx2,+avx
-// [INCOMPAT] compile-flags: -Ctarget-feature=-avx2,-avx
+//@ revisions: COMPAT INCOMPAT
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=x86_64-unknown-linux-gnu -Copt-level=3
+//@ [COMPAT] compile-flags: -Ctarget-feature=+avx2,+avx
+//@ [INCOMPAT] compile-flags: -Ctarget-feature=-avx2,-avx
 
 // See also tests/assembly/target-feature-multiple.rs
 #![feature(no_core, lang_items)]
diff --git a/tests/codegen/thin-lto.rs b/tests/codegen/thin-lto.rs
index 7991cad7a0c..c75f9841a77 100644
--- a/tests/codegen/thin-lto.rs
+++ b/tests/codegen/thin-lto.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -C lto=thin -C prefer-dynamic=no
-// only-x86_64-unknown-linux-gnu
+//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no
+//@ only-x86_64-unknown-linux-gnu
 
 // CHECK: main
 
diff --git a/tests/codegen/thread-local.rs b/tests/codegen/thread-local.rs
index caf0366d2c1..2ee15811cc3 100644
--- a/tests/codegen/thread-local.rs
+++ b/tests/codegen/thread-local.rs
@@ -1,10 +1,10 @@
-// compile-flags: -O
-// aux-build:thread_local_aux.rs
-// ignore-windows FIXME(#84933)
-// ignore-wasm globals are used instead of thread locals
-// ignore-emscripten globals are used instead of thread locals
-// ignore-android does not use #[thread_local]
-// ignore-nto does not use #[thread_local]
+//@ compile-flags: -O
+//@ aux-build:thread_local_aux.rs
+//@ ignore-windows FIXME(#84933)
+//@ ignore-wasm globals are used instead of thread locals
+//@ ignore-emscripten globals are used instead of thread locals
+//@ ignore-android does not use #[thread_local]
+//@ ignore-nto does not use #[thread_local]
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/tied-features-strength.rs b/tests/codegen/tied-features-strength.rs
index 71cea48c4da..b97865295a2 100644
--- a/tests/codegen/tied-features-strength.rs
+++ b/tests/codegen/tied-features-strength.rs
@@ -1,22 +1,22 @@
 // ignore-tidy-linelength
-// revisions: ENABLE_SVE DISABLE_SVE DISABLE_NEON ENABLE_NEON
-// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
-// needs-llvm-components: aarch64
+//@ revisions: ENABLE_SVE DISABLE_SVE DISABLE_NEON ENABLE_NEON
+//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
+//@ needs-llvm-components: aarch64
 
 // The "+v8a" feature is matched as optional as it isn't added when we
 // are targeting older LLVM versions. Once the min supported version
 // is LLVM-14 we can remove the optional regex matching for this feature.
 
-// [ENABLE_SVE] compile-flags: -C target-feature=+sve -Copt-level=0
+//@ [ENABLE_SVE] compile-flags: -C target-feature=+sve -Copt-level=0
 // ENABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+sve,?)|(\+neon,?))*}}" }
 
-// [DISABLE_SVE] compile-flags: -C target-feature=-sve -Copt-level=0
+//@ [DISABLE_SVE] compile-flags: -C target-feature=-sve -Copt-level=0
 // DISABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-sve,?)|(\+neon,?))*}}" }
 
-// [DISABLE_NEON] compile-flags: -C target-feature=-neon -Copt-level=0
+//@ [DISABLE_NEON] compile-flags: -C target-feature=-neon -Copt-level=0
 // DISABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-fp-armv8,?)|(-neon,?))*}}" }
 
-// [ENABLE_NEON] compile-flags: -C target-feature=+neon -Copt-level=0
+//@ [ENABLE_NEON] compile-flags: -C target-feature=+neon -Copt-level=0
 // ENABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+fp-armv8,?)|(\+neon,?))*}}" }
 
 
diff --git a/tests/codegen/to_vec.rs b/tests/codegen/to_vec.rs
index 60dc4efcb62..651084d811c 100644
--- a/tests/codegen/to_vec.rs
+++ b/tests/codegen/to_vec.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+//@ compile-flags: -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/trailing_zeros.rs b/tests/codegen/trailing_zeros.rs
index 2ea0e447abe..66560c0d4fc 100644
--- a/tests/codegen/trailing_zeros.rs
+++ b/tests/codegen/trailing_zeros.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// min-llvm-version: 17
+//@ compile-flags: -O
+//@ min-llvm-version: 17
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/transmute-optimized.rs b/tests/codegen/transmute-optimized.rs
index b8c51b08499..43d2a55c995 100644
--- a/tests/codegen/transmute-optimized.rs
+++ b/tests/codegen/transmute-optimized.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Z merge-functions=disabled
-// ignore-debug
+//@ compile-flags: -O -Z merge-functions=disabled
+//@ ignore-debug
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/transmute-scalar.rs b/tests/codegen/transmute-scalar.rs
index 39126b024a6..7a5eb4dfcd5 100644
--- a/tests/codegen/transmute-scalar.rs
+++ b/tests/codegen/transmute-scalar.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C opt-level=0 -C no-prepopulate-passes
+//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/try_identity.rs b/tests/codegen/try_identity.rs
index 92be90014ff..87b7d0727d0 100644
--- a/tests/codegen/try_identity.rs
+++ b/tests/codegen/try_identity.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts
+//@ compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts
 
 // Ensure that `x?` has no overhead on `Result<T, E>` due to identity `match`es in lowering.
 // This requires inlining to trigger the MIR optimizations in `SimplifyArmIdentity`.
diff --git a/tests/codegen/try_question_mark_nop.rs b/tests/codegen/try_question_mark_nop.rs
index 9d34155bdd7..58cd6ff233a 100644
--- a/tests/codegen/try_question_mark_nop.rs
+++ b/tests/codegen/try_question_mark_nop.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O -Z merge-functions=disabled --edition=2021
-// only-x86_64
+//@ compile-flags: -O -Z merge-functions=disabled --edition=2021
+//@ only-x86_64
 
 #![crate_type = "lib"]
 #![feature(try_blocks)]
diff --git a/tests/codegen/tune-cpu-on-functions.rs b/tests/codegen/tune-cpu-on-functions.rs
index 116f0772d25..dc04c4819af 100644
--- a/tests/codegen/tune-cpu-on-functions.rs
+++ b/tests/codegen/tune-cpu-on-functions.rs
@@ -1,9 +1,9 @@
 // This test makes sure that functions get annotated with the proper
 // "tune-cpu" attribute in LLVM.
 
-// no-prefer-dynamic
+//@ no-prefer-dynamic
 //
-// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic -Copt-level=0
 
 #![crate_type = "staticlib"]
 
diff --git a/tests/codegen/tuple-layout-opt.rs b/tests/codegen/tuple-layout-opt.rs
index 7cc67a9b51c..dab1e42f6b5 100644
--- a/tests/codegen/tuple-layout-opt.rs
+++ b/tests/codegen/tuple-layout-opt.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 // Test that tuples get optimized layout, in particular with a ZST in the last field (#63244)
 
diff --git a/tests/codegen/unchecked-float-casts.rs b/tests/codegen/unchecked-float-casts.rs
index 4e3bfcd4397..d1869abc87b 100644
--- a/tests/codegen/unchecked-float-casts.rs
+++ b/tests/codegen/unchecked-float-casts.rs
@@ -1,8 +1,8 @@
 // This file tests that we don't generate any code for saturation when using the
 // unchecked intrinsics.
 
-// compile-flags: -C opt-level=3
-// ignore-wasm32 the wasm target is tested in `wasm_casts_*`
+//@ compile-flags: -C opt-level=3
+//@ ignore-wasm32 the wasm target is tested in `wasm_casts_*`
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/unchecked_shifts.rs b/tests/codegen/unchecked_shifts.rs
index eded894c6d0..4e351d8d333 100644
--- a/tests/codegen/unchecked_shifts.rs
+++ b/tests/codegen/unchecked_shifts.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug (because unchecked is checked in debug)
+//@ compile-flags: -O
+//@ ignore-debug (because unchecked is checked in debug)
 
 #![crate_type = "lib"]
 #![feature(unchecked_shifts)]
diff --git a/tests/codegen/uninit-consts.rs b/tests/codegen/uninit-consts.rs
index 1313e67634a..649927b87b4 100644
--- a/tests/codegen/uninit-consts.rs
+++ b/tests/codegen/uninit-consts.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes
+//@ compile-flags: -C no-prepopulate-passes
 
 // Check that we use undef (and not zero) for uninitialized bytes in constants.
 
diff --git a/tests/codegen/union-abi.rs b/tests/codegen/union-abi.rs
index 4878ae5c3b6..b1b0daa13b6 100644
--- a/tests/codegen/union-abi.rs
+++ b/tests/codegen/union-abi.rs
@@ -1,5 +1,5 @@
-// ignore-emscripten vectors passed directly
-// compile-flags: -O -C no-prepopulate-passes
+//@ ignore-emscripten vectors passed directly
+//@ compile-flags: -O -C no-prepopulate-passes
 
 // This test that using union forward the abi of the inner type, as
 // discussed in #54668
diff --git a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs
index c092e28a05a..484af78105f 100644
--- a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: arm
-// compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: arm
+//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs b/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
index ea5bae18e23..8bb2122946f 100644
--- a/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
+++ b/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C panic=abort
+//@ compile-flags: -C panic=abort
 
 // Test that `nounwind` attributes are also applied to extern `C-unwind` Rust functions
 // when the code is compiled with `panic=abort`.
diff --git a/tests/codegen/unwind-abis/c-unwind-abi.rs b/tests/codegen/unwind-abis/c-unwind-abi.rs
index fa5b6bad75c..140c18e6bb3 100644
--- a/tests/codegen/unwind-abis/c-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/c-unwind-abi.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=0
-// needs-unwind
+//@ compile-flags: -C opt-level=0
+//@ needs-unwind
 
 // Test that `nounwind` attributes are correctly applied to exported `C` and `C-unwind` extern
 // functions. `C-unwind` functions MUST NOT have this attribute. We disable optimizations above
diff --git a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs
index 64746d32175..5604b8d5765 100644
--- a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=0
-// needs-unwind
+//@ compile-flags: -C opt-level=0
+//@ needs-unwind
 
 // Test that `nounwind` attributes are correctly applied to exported `cdecl` and
 // `cdecl-unwind` extern functions. `cdecl-unwind` functions MUST NOT have this attribute. We
diff --git a/tests/codegen/unwind-abis/fastcall-unwind-abi.rs b/tests/codegen/unwind-abis/fastcall-unwind-abi.rs
index b74099a5d96..18e2cd22c8a 100644
--- a/tests/codegen/unwind-abis/fastcall-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/fastcall-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: x86
-// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs
index 106d593b21d..0b3bfd567aa 100644
--- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs
+++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=0 -Cpanic=abort
-// ignore-wasm32-bare compiled with panic=abort by default
+//@ compile-flags: -C opt-level=0 -Cpanic=abort
+//@ ignore-wasm32-bare compiled with panic=abort by default
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
index dc3911cd4eb..1e6f8c9ede9 100644
--- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
+++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C opt-level=0
-// ignore-wasm32-bare compiled with panic=abort by default
-// needs-unwind
+//@ compile-flags: -C opt-level=0
+//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ needs-unwind
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/unwind-abis/nounwind.rs b/tests/codegen/unwind-abis/nounwind.rs
index c46d717331b..ac53cd7bed3 100644
--- a/tests/codegen/unwind-abis/nounwind.rs
+++ b/tests/codegen/unwind-abis/nounwind.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=0 -Cpanic=abort
-// ignore-wasm32-bare compiled with panic=abort by default
+//@ compile-flags: -C opt-level=0 -Cpanic=abort
+//@ ignore-wasm32-bare compiled with panic=abort by default
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/unwind-abis/stdcall-unwind-abi.rs b/tests/codegen/unwind-abis/stdcall-unwind-abi.rs
index 8eff0719f8f..a5e600fe076 100644
--- a/tests/codegen/unwind-abis/stdcall-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/stdcall-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: x86
-// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-abis/system-unwind-abi.rs b/tests/codegen/unwind-abis/system-unwind-abi.rs
index f274a33b099..b001c1f951c 100644
--- a/tests/codegen/unwind-abis/system-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/system-unwind-abi.rs
@@ -1,5 +1,5 @@
-// compile-flags: -C opt-level=0
-// needs-unwind
+//@ compile-flags: -C opt-level=0
+//@ needs-unwind
 
 // Test that `nounwind` attributes are correctly applied to exported `system` and `system-unwind`
 // extern functions. `system-unwind` functions MUST NOT have this attribute. We disable
diff --git a/tests/codegen/unwind-abis/sysv64-unwind-abi.rs b/tests/codegen/unwind-abis/sysv64-unwind-abi.rs
index 694fde17c3c..49407f748bc 100644
--- a/tests/codegen/unwind-abis/sysv64-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/sysv64-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: x86
-// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-abis/thiscall-unwind-abi.rs b/tests/codegen/unwind-abis/thiscall-unwind-abi.rs
index 0a02755a2cd..d07e9b81d78 100644
--- a/tests/codegen/unwind-abis/thiscall-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/thiscall-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: x86
-// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs
index d7eca2a9700..a89794fbf6e 100644
--- a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: x86
-// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind, abi_vectorcall)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-abis/win64-unwind-abi.rs b/tests/codegen/unwind-abis/win64-unwind-abi.rs
index 6591348c35d..aa466469c4d 100644
--- a/tests/codegen/unwind-abis/win64-unwind-abi.rs
+++ b/tests/codegen/unwind-abis/win64-unwind-abi.rs
@@ -1,5 +1,5 @@
-// needs-llvm-components: x86
-// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
+//@ needs-llvm-components: x86
+//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
 #![no_core]
 #![feature(no_core, lang_items, c_unwind)]
 #[lang="sized"]
diff --git a/tests/codegen/unwind-and-panic-abort.rs b/tests/codegen/unwind-and-panic-abort.rs
index e43e73b96b9..430502308cf 100644
--- a/tests/codegen/unwind-and-panic-abort.rs
+++ b/tests/codegen/unwind-and-panic-abort.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C panic=abort
+//@ compile-flags: -C panic=abort
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/unwind-extern-exports.rs b/tests/codegen/unwind-extern-exports.rs
index 4e1e719d5cd..d670a776ac6 100644
--- a/tests/codegen/unwind-extern-exports.rs
+++ b/tests/codegen/unwind-extern-exports.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C opt-level=0
-// ignore-wasm32-bare compiled with panic=abort by default
-// needs-unwind
+//@ compile-flags: -C opt-level=0
+//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ needs-unwind
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/unwind-extern-imports.rs b/tests/codegen/unwind-extern-imports.rs
index 260dcc628cc..7386704b430 100644
--- a/tests/codegen/unwind-extern-imports.rs
+++ b/tests/codegen/unwind-extern-imports.rs
@@ -1,6 +1,6 @@
-// compile-flags: -C no-prepopulate-passes
-// ignore-wasm32-bare compiled with panic=abort by default
-// needs-unwind
+//@ compile-flags: -C no-prepopulate-passes
+//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ needs-unwind
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/unwind-landingpad-cold.rs b/tests/codegen/unwind-landingpad-cold.rs
index 3a902a7d712..fa200bc300c 100644
--- a/tests/codegen/unwind-landingpad-cold.rs
+++ b/tests/codegen/unwind-landingpad-cold.rs
@@ -1,6 +1,6 @@
-// compile-flags: -Cno-prepopulate-passes
-// needs-unwind
-// min-llvm-version: 17.0.2
+//@ compile-flags: -Cno-prepopulate-passes
+//@ needs-unwind
+//@ min-llvm-version: 17.0.2
 #![crate_type = "lib"]
 
 // This test checks that drop calls in unwind landing pads
diff --git a/tests/codegen/unwind-landingpad-inline.rs b/tests/codegen/unwind-landingpad-inline.rs
index 0774cefdd2d..953ba5e901a 100644
--- a/tests/codegen/unwind-landingpad-inline.rs
+++ b/tests/codegen/unwind-landingpad-inline.rs
@@ -1,6 +1,6 @@
-// min-llvm-version: 17.0.2
-// compile-flags: -Copt-level=3
-// ignore-debug: the debug assertions get in the way
+//@ min-llvm-version: 17.0.2
+//@ compile-flags: -Copt-level=3
+//@ ignore-debug: the debug assertions get in the way
 #![crate_type = "lib"]
 
 // This test checks that we can inline drop_in_place in
diff --git a/tests/codegen/var-names.rs b/tests/codegen/var-names.rs
index d4715efad73..fd163a55551 100644
--- a/tests/codegen/var-names.rs
+++ b/tests/codegen/var-names.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -C no-prepopulate-passes
+//@ compile-flags: -O -C no-prepopulate-passes
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vec-as-ptr.rs b/tests/codegen/vec-as-ptr.rs
index 76098bc08a3..17869c21c83 100644
--- a/tests/codegen/vec-as-ptr.rs
+++ b/tests/codegen/vec-as-ptr.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O -Zmerge-functions=disabled
+//@ compile-flags: -O -Zmerge-functions=disabled
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vec-calloc.rs b/tests/codegen/vec-calloc.rs
index a5fda7b2449..bae344ab01d 100644
--- a/tests/codegen/vec-calloc.rs
+++ b/tests/codegen/vec-calloc.rs
@@ -1,6 +1,6 @@
-// compile-flags: -O -Z merge-functions=disabled
-// only-x86_64
-// ignore-debug
+//@ compile-flags: -O -Z merge-functions=disabled
+//@ only-x86_64
+//@ ignore-debug
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vec-in-place.rs b/tests/codegen/vec-in-place.rs
index 5cf7add836d..3ac2ec13d47 100644
--- a/tests/codegen/vec-in-place.rs
+++ b/tests/codegen/vec-in-place.rs
@@ -1,5 +1,5 @@
-// ignore-debug: the debug assertions get in the way
-// compile-flags: -O -Z merge-functions=disabled
+//@ ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O -Z merge-functions=disabled
 #![crate_type = "lib"]
 
 // Ensure that trivial casts of vec elements are O(1)
diff --git a/tests/codegen/vec-iter-collect-len.rs b/tests/codegen/vec-iter-collect-len.rs
index 3a0d6c30919..0c225abd326 100644
--- a/tests/codegen/vec-iter-collect-len.rs
+++ b/tests/codegen/vec-iter-collect-len.rs
@@ -1,5 +1,5 @@
-// ignore-debug: the debug assertions get in the way
-// compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
 #![crate_type="lib"]
 
 #[no_mangle]
diff --git a/tests/codegen/vec-iter.rs b/tests/codegen/vec-iter.rs
index 4e206858751..47e11af5bc3 100644
--- a/tests/codegen/vec-iter.rs
+++ b/tests/codegen/vec-iter.rs
@@ -1,5 +1,5 @@
-// ignore-debug: the debug assertions get in the way
-// compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
 #![crate_type = "lib"]
 #![feature(exact_size_is_empty)]
 
diff --git a/tests/codegen/vec-optimizes-away.rs b/tests/codegen/vec-optimizes-away.rs
index 3be342dabeb..9cbfbc115b0 100644
--- a/tests/codegen/vec-optimizes-away.rs
+++ b/tests/codegen/vec-optimizes-away.rs
@@ -1,5 +1,5 @@
-// ignore-debug: the debug assertions get in the way
-// compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
 #![crate_type = "lib"]
 
 #[no_mangle]
diff --git a/tests/codegen/vec-reserve-extend.rs b/tests/codegen/vec-reserve-extend.rs
index 395373ff4f1..12795937bc8 100644
--- a/tests/codegen/vec-reserve-extend.rs
+++ b/tests/codegen/vec-reserve-extend.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug
+//@ compile-flags: -O
+//@ ignore-debug
 // (with debug assertions turned on, `assert_unchecked` generates a real assertion)
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/vec-shrink-panik.rs b/tests/codegen/vec-shrink-panik.rs
index 14fef4e2cd5..33b70300bf4 100644
--- a/tests/codegen/vec-shrink-panik.rs
+++ b/tests/codegen/vec-shrink-panik.rs
@@ -1,11 +1,11 @@
-// revisions: old new
+//@ revisions: old new
 // LLVM 17 realizes double panic is not possible and doesn't generate calls
 // to panic_cannot_unwind.
-// [old]ignore-llvm-version: 17 - 99
-// [new]min-llvm-version: 17
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
-// needs-unwind
+//@ [old]ignore-llvm-version: 17 - 99
+//@ [new]min-llvm-version: 17
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
+//@ needs-unwind
 #![crate_type = "lib"]
 #![feature(shrink_to)]
 
diff --git a/tests/codegen/vec_pop_push_noop.rs b/tests/codegen/vec_pop_push_noop.rs
index d9293f2b75d..5a2009b01d7 100644
--- a/tests/codegen/vec_pop_push_noop.rs
+++ b/tests/codegen/vec_pop_push_noop.rs
@@ -1,5 +1,5 @@
-// compile-flags: -O
-// ignore-debug
+//@ compile-flags: -O
+//@ ignore-debug
 // (with debug assertions turned on, `assert_unchecked` generates a real assertion)
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/vecdeque-drain.rs b/tests/codegen/vecdeque-drain.rs
index f8263c69572..cd549f8ebd4 100644
--- a/tests/codegen/vecdeque-drain.rs
+++ b/tests/codegen/vecdeque-drain.rs
@@ -1,7 +1,7 @@
 // Check that draining at the front or back doesn't copy memory.
 
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vecdeque-nonempty-get-no-panic.rs b/tests/codegen/vecdeque-nonempty-get-no-panic.rs
index c2877d2d0ca..1128b4ed7a4 100644
--- a/tests/codegen/vecdeque-nonempty-get-no-panic.rs
+++ b/tests/codegen/vecdeque-nonempty-get-no-panic.rs
@@ -1,7 +1,7 @@
 // Guards against regression for optimization discussed in issue #80836
 
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/vecdeque_no_panic.rs b/tests/codegen/vecdeque_no_panic.rs
index cbf420bada9..57b6b2abbea 100644
--- a/tests/codegen/vecdeque_no_panic.rs
+++ b/tests/codegen/vecdeque_no_panic.rs
@@ -1,7 +1,7 @@
 // This test checks that `VecDeque::front[_mut]()` and `VecDeque::back[_mut]()` can't panic.
 
-// compile-flags: -O
-// ignore-debug: the debug assertions get in the way
+//@ compile-flags: -O
+//@ ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/virtual-function-elimination-32bit.rs b/tests/codegen/virtual-function-elimination-32bit.rs
index 6f963363a99..76223be1f3d 100644
--- a/tests/codegen/virtual-function-elimination-32bit.rs
+++ b/tests/codegen/virtual-function-elimination-32bit.rs
@@ -1,5 +1,5 @@
-// compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0
-// ignore-64bit
+//@ compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0
+//@ ignore-64bit
 
 // CHECK: @vtable.0 = {{.*}}, !type ![[TYPE0:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]]
 
diff --git a/tests/codegen/virtual-function-elimination.rs b/tests/codegen/virtual-function-elimination.rs
index f22176a024f..bf4a74085ed 100644
--- a/tests/codegen/virtual-function-elimination.rs
+++ b/tests/codegen/virtual-function-elimination.rs
@@ -1,6 +1,6 @@
-// compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0
-// ignore-32bit
-// ignore-debug
+//@ compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0
+//@ ignore-32bit
+//@ ignore-debug
 
 // CHECK: @vtable.0 = {{.*}}, !type ![[TYPE0:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]]
 // CHECK: @vtable.1 = {{.*}}, !type ![[TYPE1:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]]
diff --git a/tests/codegen/wasm_casts_trapping.rs b/tests/codegen/wasm_casts_trapping.rs
index eb06c4975bb..0908acd85fc 100644
--- a/tests/codegen/wasm_casts_trapping.rs
+++ b/tests/codegen/wasm_casts_trapping.rs
@@ -1,5 +1,5 @@
-// only-wasm32
-// compile-flags: -C target-feature=-nontrapping-fptoint
+//@ only-wasm32
+//@ compile-flags: -C target-feature=-nontrapping-fptoint
 #![crate_type = "lib"]
 
 // CHECK-LABEL: @cast_f64_i64
diff --git a/tests/codegen/wasm_exceptions.rs b/tests/codegen/wasm_exceptions.rs
index 2b2359f5b6c..48a7357bfd8 100644
--- a/tests/codegen/wasm_exceptions.rs
+++ b/tests/codegen/wasm_exceptions.rs
@@ -1,5 +1,5 @@
-// only-wasm32-bare
-// compile-flags: -C panic=unwind
+//@ only-wasm32-bare
+//@ compile-flags: -C panic=unwind
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
diff --git a/tests/codegen/zip.rs b/tests/codegen/zip.rs
index e55f4f1a2de..5db0a93b78e 100644
--- a/tests/codegen/zip.rs
+++ b/tests/codegen/zip.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -O
+//@ compile-flags: -C no-prepopulate-passes -O
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/zst-offset.rs b/tests/codegen/zst-offset.rs
index 56dfd96ab2c..ad996d8ae1b 100644
--- a/tests/codegen/zst-offset.rs
+++ b/tests/codegen/zst-offset.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -Copt-level=0
+//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 #![feature(repr_simd)]