[flang-commits] [flang] [flang] Build a dedicated fir-test-opt for testing (PR #123473)
Michał Górny via flang-commits
flang-commits at lists.llvm.org
Sat Jan 18 11:54:45 PST 2025
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/123473
Rather than having different passes inside `fir-opt` depending on the value of `FLANG_INCLUDE_TESTS`, build two separate executables: regular `fir-opt` tool that is going to be installed, and a `fir-test-opt` to be used in the test suite. This ensures that `fir-opt` behaves consistently independently of `FLANG_INCLUDE_TESTS` value used during the build, and a test-enabled build can be used on production. It also avoids mixing dynamic libMLIR with static libraries (needed for test-related parts) in release executables.
Fixes #121202
>From 98814acf5f148db7babae78c4f380e2e8e947e53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Sat, 18 Jan 2025 20:47:47 +0100
Subject: [PATCH] [flang] Build a dedicated fir-test-opt for testing
Rather than having different passes inside `fir-opt` depending
on the value of `FLANG_INCLUDE_TESTS`, build two separate executables:
regular `fir-opt` tool that is going to be installed,
and a `fir-test-opt` to be used in the test suite. This ensures that
`fir-opt` behaves consistently independently of `FLANG_INCLUDE_TESTS`
value used during the build, and a test-enabled build can be used
on production. It also avoids mixing dynamic libMLIR with static
libraries (needed for test-related parts) in release executables.
Fixes #121202
---
.../AliasAnalysis/alias-analysis-1.fir | 2 +-
.../AliasAnalysis/alias-analysis-2.fir | 2 +-
.../AliasAnalysis/alias-analysis-3.fir | 2 +-
.../AliasAnalysis/alias-analysis-4.fir | 2 +-
.../AliasAnalysis/alias-analysis-5.fir | 2 +-
.../AliasAnalysis/alias-analysis-6.fir | 2 +-
.../AliasAnalysis/alias-analysis-7.fir | 2 +-
.../AliasAnalysis/alias-analysis-8.fir | 2 +-
.../AliasAnalysis/alias-analysis-9.fir | 2 +-
.../alias-analysis-host-assoc.fir | 2 +-
...lias-analysis-omp-private-allocatable.mlir | 2 +-
.../alias-analysis-omp-target-1.fir | 2 +-
.../alias-analysis-omp-target-2.fir | 2 +-
...ysis-omp-teams-distribute-private-ptr.mlir | 2 +-
...analysis-omp-teams-distribute-private.mlir | 2 +-
.../modref-call-after-inlining.fir | 2 +-
.../AliasAnalysis/modref-call-args.f90 | 2 +-
.../AliasAnalysis/modref-call-dummies.f90 | 2 +-
.../AliasAnalysis/modref-call-equivalence.f90 | 2 +-
.../AliasAnalysis/modref-call-globals.f90 | 2 +-
.../modref-call-internal-proc.f90 | 2 +-
.../AliasAnalysis/modref-call-locals.f90 | 2 +-
.../AliasAnalysis/modref-call-not-fortran.fir | 2 +-
.../Analysis/AliasAnalysis/ptr-component.fir | 2 +-
flang/test/CMakeLists.txt | 2 +-
flang/test/Driver/omp-cse-region-boundary.f90 | 8 +-
flang/test/Fir/CUDA/cuda-abstract-result.mlir | 2 +-
flang/test/Fir/CUDA/cuda-alloc-free.fir | 2 +-
flang/test/Fir/CUDA/cuda-allocate.fir | 2 +-
flang/test/Fir/CUDA/cuda-code-gen.mlir | 2 +-
.../CUDA/cuda-compiler-generated-names.mlir | 2 +-
flang/test/Fir/CUDA/cuda-constructor-2.f90 | 2 +-
flang/test/Fir/CUDA/cuda-constructor.f90 | 2 +-
flang/test/Fir/CUDA/cuda-data-transfer.fir | 2 +-
flang/test/Fir/CUDA/cuda-device-context.mlir | 2 +-
flang/test/Fir/CUDA/cuda-device-global.f90 | 2 +-
.../test/Fir/CUDA/cuda-external-mangling.mlir | 2 +-
flang/test/Fir/CUDA/cuda-global-addr.mlir | 2 +-
flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir | 2 +-
.../Fir/CUDA/cuda-implicit-device-global.f90 | 2 +-
flang/test/Fir/CUDA/cuda-launch.fir | 2 +-
flang/test/Fir/CUDA/cuda-register-func.fir | 2 +-
flang/test/Fir/CUDA/cuda-sync-desc.mlir | 2 +-
flang/test/Fir/CUDA/cuda-target-rewrite.mlir | 2 +-
flang/test/Fir/OpenACC/legalize-data.fir | 2 +-
flang/test/Fir/OpenACC/openacc-mappable.fir | 2 +-
.../Fir/OpenACC/propagate-attr-folding.fir | 2 +-
flang/test/Fir/Todo/allocmem.fir | 2 +-
flang/test/Fir/Todo/boxproc_host.fir | 2 +-
flang/test/Fir/Todo/coordinate_of_2.fir | 2 +-
flang/test/Fir/Todo/coordinate_of_3.fir | 2 +-
flang/test/Fir/Todo/coordinate_of_4.fir | 2 +-
flang/test/Fir/Todo/end.fir | 2 +-
flang/test/Fir/Todo/global_len.fir | 2 +-
flang/test/Fir/Todo/len_param_index.fir | 2 +-
.../Fir/Todo/select_case_with_character.fir | 2 +-
flang/test/Fir/Todo/unboxproc.fir | 2 +-
flang/test/Fir/abstract-result-2.fir | 2 +-
flang/test/Fir/abstract-results-bindc.fir | 2 +-
flang/test/Fir/abstract-results.fir | 8 +-
flang/test/Fir/affine-demotion.fir | 2 +-
flang/test/Fir/affine-promotion.fir | 2 +-
flang/test/Fir/already-defined-free.fir | 2 +-
flang/test/Fir/annotate-constant.fir | 2 +-
.../test/Fir/array-coor-canonicalization.fir | 2 +-
flang/test/Fir/array-copies-pointers.fir | 4 +-
flang/test/Fir/array-modify.fir | 4 +-
flang/test/Fir/array-value-copy-2.fir | 4 +-
flang/test/Fir/array-value-copy-3.fir | 4 +-
flang/test/Fir/array-value-copy-4.fir | 4 +-
flang/test/Fir/array-value-copy-cam4.fir | 4 +-
flang/test/Fir/array-value-copy.fir | 2 +-
flang/test/Fir/box-offset.fir | 2 +-
flang/test/Fir/boxaddr-folding.fir | 2 +-
flang/test/Fir/boxproc-2.fir | 2 +-
flang/test/Fir/boxproc-openmp.fir | 2 +-
flang/test/Fir/cg-ops.fir | 2 +-
flang/test/Fir/char-conversion.fir | 2 +-
flang/test/Fir/char01.fir | 2 +-
flang/test/Fir/comdat-present.fir | 4 +-
flang/test/Fir/comdat.fir | 8 +-
flang/test/Fir/commute.fir | 2 +-
flang/test/Fir/compare.fir | 2 +-
flang/test/Fir/constant.fir | 2 +-
flang/test/Fir/convert-fold.fir | 2 +-
flang/test/Fir/convert-to-llvm-invalid.fir | 2 +-
.../Fir/convert-to-llvm-openmp-and-fir.fir | 2 +-
flang/test/Fir/convert-to-llvm-target.fir | 8 +-
flang/test/Fir/convert-to-llvm.fir | 14 +-
flang/test/Fir/convert-type-desc-to-llvm.fir | 14 +-
flang/test/Fir/coordinate_of_1.fir | 2 +-
flang/test/Fir/coordinateof.fir | 2 +-
flang/test/Fir/cse.fir | 2 +-
flang/test/Fir/cuf-invalid.fir | 2 +-
flang/test/Fir/cuf.mlir | 2 +-
flang/test/Fir/declare-codegen.fir | 6 +-
flang/test/Fir/declare.fir | 2 +-
flang/test/Fir/dispatch.f90 | 2 +-
flang/test/Fir/dummy-scope-codegen.fir | 6 +-
flang/test/Fir/dummy_scope.fir | 4 +-
flang/test/Fir/embox-char.fir | 2 +-
flang/test/Fir/embox-substring.fir | 2 +-
flang/test/Fir/embox-write.fir | 2 +-
.../test/Fir/external-mangling-emboxproc.fir | 2 +-
flang/test/Fir/external-mangling.fir | 4 +-
flang/test/Fir/field-index.fir | 2 +-
flang/test/Fir/fir-fast-math.fir | 2 +-
flang/test/Fir/fir-int-conversion.fir | 6 +-
flang/test/Fir/fir-ops.fir | 2 +-
flang/test/Fir/fir-types.fir | 2 +-
flang/test/Fir/global-attributes.fir | 4 +-
flang/test/Fir/global-initialization.fir | 2 +-
flang/test/Fir/invalid-types.fir | 2 +-
flang/test/Fir/invalid.fir | 2 +-
flang/test/Fir/is_assumed_size-codegen.fir | 2 +-
flang/test/Fir/logical-convert.fir | 8 +-
flang/test/Fir/loop01.fir | 4 +-
flang/test/Fir/loop02.fir | 4 +-
flang/test/Fir/loop03.fir | 2 +-
flang/test/Fir/memory-allocation-opt-2.fir | 2 +-
flang/test/Fir/memory-allocation-opt.fir | 2 +-
flang/test/Fir/memref-data-flow.fir | 2 +-
...-trivial-procedure-binding-description.f90 | 2 +-
flang/test/Fir/omp-declare-target-data.fir | 2 +-
flang/test/Fir/rebox-susbtring.fir | 2 +-
flang/test/Fir/rebox_assumed_rank_codegen.fir | 2 +-
flang/test/Fir/recursive-type.fir | 8 +-
flang/test/Fir/rename-msvc-libm.fir | 4 +-
.../test/Fir/struct-passing-aarch64-byval.fir | 2 +-
.../Fir/struct-passing-loongarch64-byreg.fir | 2 +-
.../struct-passing-x86-64-one-field-inreg.fir | 2 +-
...ct-passing-x86-64-several-fields-inreg.fir | 2 +-
flang/test/Fir/struct-return-aarch64.fir | 2 +-
.../Fir/struct-return-loongarch64-byreg.fir | 2 +-
flang/test/Fir/struct-return-x86-64.fir | 2 +-
.../test/Fir/target-rewrite-arg-position.fir | 2 +-
flang/test/Fir/target-rewrite-boxchar.fir | 14 +-
flang/test/Fir/target-rewrite-char-proc.fir | 2 +-
.../Fir/target-rewrite-complex-10-x86.fir | 2 +-
flang/test/Fir/target-rewrite-complex.fir | 22 +--
flang/test/Fir/target-rewrite-complex16.fir | 4 +-
.../target-rewrite-integer-loongarch64.fir | 2 +-
flang/test/Fir/target-rewrite-integer.fir | 14 +-
.../target-rewrite-selective-no-struct.fir | 2 +-
flang/test/Fir/target-rewrite-selective.fir | 4 +-
flang/test/Fir/target-rewrite-target-cpu.fir | 6 +-
.../Fir/target-rewrite-target-features.fir | 6 +-
flang/test/Fir/target-rewrite-triple.fir | 4 +-
flang/test/Fir/tbaa.fir | 4 +-
flang/test/Fir/types-to-llvm.fir | 2 +-
flang/test/Fir/undo-complex-pattern.fir | 2 +-
flang/test/Fir/vector-always-cfg.fir | 2 +-
flang/test/Fir/vector-always.fir | 2 +-
flang/test/HLFIR/all-elemental.fir | 2 +-
flang/test/HLFIR/all-lowering.fir | 2 +-
flang/test/HLFIR/all.fir | 2 +-
flang/test/HLFIR/any-elemental.fir | 2 +-
flang/test/HLFIR/any-lowering.fir | 2 +-
flang/test/HLFIR/any.fir | 2 +-
flang/test/HLFIR/apply-codegen.fir | 2 +-
flang/test/HLFIR/apply.fir | 2 +-
.../HLFIR/as_expr-codegen-polymorphic.fir | 2 +-
flang/test/HLFIR/as_expr-codegen.fir | 2 +-
flang/test/HLFIR/as_expr.fir | 2 +-
flang/test/HLFIR/assign-bufferize.fir | 2 +-
flang/test/HLFIR/assign-codegen-derived.fir | 2 +-
flang/test/HLFIR/assign-codegen.fir | 2 +-
flang/test/HLFIR/assign-side-effects.fir | 2 +-
flang/test/HLFIR/assign.fir | 2 +-
flang/test/HLFIR/associate-codegen.fir | 2 +-
flang/test/HLFIR/associate.fir | 2 +-
.../HLFIR/bufferize-destroy-for-derived.fir | 2 +-
.../bufferize-end-associate-for-derived.fir | 2 +-
flang/test/HLFIR/bufferize-poly-expr.fir | 2 +-
flang/test/HLFIR/bufferize-workshare.fir | 2 +-
flang/test/HLFIR/bufferize01.fir | 2 +-
flang/test/HLFIR/char_assign.fir | 2 +-
.../HLFIR/char_extremum-bufferization.fir | 2 +-
flang/test/HLFIR/char_extremum.fir | 2 +-
flang/test/HLFIR/concat-bufferization.fir | 2 +-
flang/test/HLFIR/concat.fir | 2 +-
.../convert-assign-inside-openacc-recipe.fir | 2 +-
flang/test/HLFIR/copy-in-out-codegen.fir | 2 +-
flang/test/HLFIR/copy-in-out.fir | 2 +-
flang/test/HLFIR/count-elemental.fir | 2 +-
.../count-lowering-default-int-kinds.fir | 2 +-
flang/test/HLFIR/count-lowering.fir | 2 +-
flang/test/HLFIR/count.fir | 2 +-
flang/test/HLFIR/cshift-lowering.fir | 2 +-
flang/test/HLFIR/declare-codegen.fir | 2 +-
flang/test/HLFIR/declare.fir | 2 +-
.../HLFIR/designate-codegen-complex-part.fir | 2 +-
.../designate-codegen-component-refs.fir | 2 +-
flang/test/HLFIR/designate-codegen.fir | 2 +-
flang/test/HLFIR/designate.fir | 2 +-
flang/test/HLFIR/destroy-codegen.fir | 2 +-
flang/test/HLFIR/destroy.fir | 2 +-
flang/test/HLFIR/dot_product-lowering.fir | 2 +-
flang/test/HLFIR/dot_product.fir | 2 +-
flang/test/HLFIR/dummy_scope.fir | 4 +-
flang/test/HLFIR/element-addr.fir | 2 +-
.../HLFIR/element-codegen-issue-118922.fir | 2 +-
flang/test/HLFIR/elemental-codegen-nested.fir | 2 +-
flang/test/HLFIR/elemental-codegen.fir | 2 +-
flang/test/HLFIR/elemental-cse.fir | 2 +-
flang/test/HLFIR/elemental-shallow-copy.fir | 2 +-
flang/test/HLFIR/elemental.fir | 2 +-
flang/test/HLFIR/elsewhere.fir | 2 +-
flang/test/HLFIR/eval_in_mem-codegen.fir | 2 +-
flang/test/HLFIR/eval_in_mem.fir | 2 +-
flang/test/HLFIR/expr-type.fir | 2 +-
flang/test/HLFIR/extents-of-shape-of.f90 | 2 +-
flang/test/HLFIR/forall-index.fir | 4 +-
flang/test/HLFIR/forall.fir | 2 +-
flang/test/HLFIR/forall_mask.fir | 2 +-
flang/test/HLFIR/get_length.fir | 4 +-
flang/test/HLFIR/get_length_codegen.fir | 2 +-
flang/test/HLFIR/getextent.fir | 2 +-
flang/test/HLFIR/inline-elemental.fir | 2 +-
flang/test/HLFIR/inline-hlfir-assign.fir | 2 +-
flang/test/HLFIR/invalid.fir | 2 +-
flang/test/HLFIR/matmul-lowering.fir | 2 +-
flang/test/HLFIR/matmul.fir | 2 +-
flang/test/HLFIR/matmul_transpose.fir | 2 +-
flang/test/HLFIR/maxloc-elemental.fir | 2 +-
flang/test/HLFIR/maxloc-lowering.fir | 2 +-
flang/test/HLFIR/maxloc.fir | 2 +-
flang/test/HLFIR/maxval-elemental.fir | 2 +-
flang/test/HLFIR/maxval-lowering.fir | 2 +-
flang/test/HLFIR/maxval.fir | 2 +-
flang/test/HLFIR/memory-effects.fir | 2 +-
flang/test/HLFIR/minloc-elemental.fir | 2 +-
flang/test/HLFIR/minloc-lowering.fir | 2 +-
flang/test/HLFIR/minloc.fir | 2 +-
flang/test/HLFIR/minval-elemental.fir | 2 +-
flang/test/HLFIR/minval-lowering.fir | 2 +-
flang/test/HLFIR/minval.fir | 2 +-
flang/test/HLFIR/mul_transpose.f90 | 8 +-
flang/test/HLFIR/no_reassoc-codegen.fir | 2 +-
flang/test/HLFIR/no_reassoc.fir | 2 +-
flang/test/HLFIR/null-codegen.fir | 2 +-
flang/test/HLFIR/null.fir | 2 +-
flang/test/HLFIR/opt-array-slice-assign.fir | 2 +-
.../HLFIR/opt-bufferization-eval_in_mem.fir | 2 +-
.../test/HLFIR/opt-bufferization-leslie3d.fir | 2 +-
...t-bufferization-non-realloc-assignment.fir | 2 +-
.../opt-bufferization-same-ptr-elemental.fir | 2 +-
flang/test/HLFIR/opt-bufferization.fir | 2 +-
flang/test/HLFIR/opt-scalar-assign.fir | 2 +-
flang/test/HLFIR/opt-variable-assign-omp.fir | 2 +-
.../forall-codegen-fuse-assignments.fir | 4 +-
.../forall-codegen-no-conflict.fir | 2 +-
.../order_assignments/forall-issue120190.fir | 2 +-
.../HLFIR/order_assignments/impure-where.fir | 2 +-
.../order_assignments/inlined-stack-temp.fir | 2 +-
.../lhs-conflicts-codegen.fir | 2 +-
.../order_assignments/runtime-stack-temp.fir | 2 +-
.../order_assignments/saving-mask-and-rhs.fir | 2 +-
.../user-defined-assignment-finalization.fir | 2 +-
.../user-defined-assignment.fir | 2 +-
.../vector-subscripts-codegen.fir | 2 +-
.../vector-subscripts-scheduling.fir | 2 +-
.../HLFIR/order_assignments/where-cleanup.f90 | 2 +-
.../where-codegen-no-conflict.fir | 2 +-
flang/test/HLFIR/parent_comp-codegen.fir | 2 +-
flang/test/HLFIR/parent_comp.fir | 2 +-
flang/test/HLFIR/product-lowering.fir | 2 +-
flang/test/HLFIR/product.fir | 2 +-
flang/test/HLFIR/region-assign.fir | 2 +-
flang/test/HLFIR/set_length-codegen.fir | 2 +-
flang/test/HLFIR/set_length.fir | 2 +-
flang/test/HLFIR/shapeof-lowering.fir | 2 +-
flang/test/HLFIR/shapeof.fir | 4 +-
.../simplify-hlfir-intrinsics-cshift.fir | 2 +-
.../simplify-hlfir-intrinsics-dotproduct.fir | 2 +-
.../simplify-hlfir-intrinsics-matmul.fir | 6 +-
.../HLFIR/simplify-hlfir-intrinsics-sum.fir | 2 +-
.../test/HLFIR/simplify-hlfir-intrinsics.fir | 2 +-
flang/test/HLFIR/sum-lowering.fir | 2 +-
flang/test/HLFIR/sum.fir | 2 +-
flang/test/HLFIR/transpose-lowering.fir | 2 +-
flang/test/HLFIR/transpose.fir | 2 +-
flang/test/HLFIR/where.fir | 2 +-
flang/test/Intrinsics/math-codegen.fir | 126 +++++++++---------
flang/test/Lower/CUDA/cuda-data-attribute.cuf | 2 +-
flang/test/Lower/CUDA/cuda-kernel-calls.cuf | 2 +-
.../Lower/CUDA/cuda-kernel-loop-directive.cuf | 2 +-
flang/test/Lower/CUDA/cuda-proc-attribute.cuf | 2 +-
.../Lower/HLFIR/elemental-result-length.f90 | 2 +-
.../HLFIR/internal-procedures-bindc-host.f90 | 2 +-
flang/test/Lower/HLFIR/substrings.f90 | 2 +-
flang/test/Lower/Intrinsics/achar.f90 | 4 +-
.../OpenMP/cfg-conversion-omp.private.f90 | 4 +-
flang/test/Lower/array-character.f90 | 2 +-
flang/test/Lower/select-type-2.f90 | 2 +-
flang/test/Lower/select-type-2.fir | 2 +-
flang/test/Lower/select-type.f90 | 2 +-
.../OpenMP/lower-workshare-alloca.mlir | 2 +-
.../OpenMP/lower-workshare-binding.mlir | 2 +-
.../OpenMP/lower-workshare-cleanup.mlir | 2 +-
.../OpenMP/lower-workshare-copyprivate.mlir | 2 +-
.../lower-workshare-correct-parallelize.mlir | 2 +-
.../OpenMP/lower-workshare-nested.mlir | 2 +-
.../OpenMP/lower-workshare-no-single.mlir | 2 +-
.../OpenMP/lower-workshare-nowait.mlir | 2 +-
.../OpenMP/lower-workshare-todo-cfg-dom.mlir | 2 +-
.../OpenMP/lower-workshare-todo-cfg.mlir | 2 +-
.../OpenMP/should-use-workshare-lowering.mlir | 2 +-
.../constant-argument-globalisation-2.fir | 2 +-
.../constant-argument-globalisation.fir | 2 +-
flang/test/Transforms/debug-107988.fir | 2 +-
flang/test/Transforms/debug-92391.fir | 2 +-
flang/test/Transforms/debug-96314.fir | 2 +-
flang/test/Transforms/debug-allocatable-1.fir | 2 +-
.../Transforms/debug-assumed-rank-array.fir | 2 +-
.../debug-assumed-shape-array-2.fir | 2 +-
.../Transforms/debug-assumed-shape-array.fir | 2 +-
.../Transforms/debug-assumed-size-array.fir | 2 +-
flang/test/Transforms/debug-char-type-1.fir | 2 +-
flang/test/Transforms/debug-class-type.fir | 2 +-
flang/test/Transforms/debug-complex-1.fir | 2 +-
.../test/Transforms/debug-derived-type-1.fir | 2 +-
.../test/Transforms/debug-derived-type-2.fir | 2 +-
flang/test/Transforms/debug-extra-global.fir | 2 +-
.../Transforms/debug-fixed-array-type.fir | 2 +-
flang/test/Transforms/debug-fn-info.fir | 2 +-
.../test/Transforms/debug-imported-entity.fir | 2 +-
flang/test/Transforms/debug-index-type.fir | 2 +-
.../Transforms/debug-line-table-existing.fir | 2 +-
.../Transforms/debug-line-table-inc-file.fir | 2 +-
.../debug-line-table-inc-same-file.fir | 2 +-
flang/test/Transforms/debug-line-table.fir | 6 +-
.../debug-local-global-storage-1.fir | 2 +-
flang/test/Transforms/debug-local-var.fir | 2 +-
flang/test/Transforms/debug-module-1.fir | 2 +-
flang/test/Transforms/debug-module-2.fir | 2 +-
flang/test/Transforms/debug-ptr-type.fir | 2 +-
flang/test/Transforms/debug-ref-type.fir | 2 +-
flang/test/Transforms/debug-tuple-type.fir | 2 +-
.../Transforms/debug-variable-array-dim.fir | 2 +-
.../Transforms/debug-variable-char-len.fir | 2 +-
flang/test/Transforms/debug-vector-type.fir | 2 +-
flang/test/Transforms/experimental.fir | 2 +-
flang/test/Transforms/function-attrs.fir | 2 +-
.../generic-loop-rewriting-todo.mlir | 2 +-
.../Transforms/generic-loop-rewriting.mlir | 2 +-
flang/test/Transforms/loop-versioning.fir | 2 +-
.../Transforms/omp-function-filtering.mlir | 2 +-
...p-map-info-finalization-implicit-field.fir | 2 +-
.../Transforms/omp-map-info-finalization.fir | 2 +-
.../omp-maps-for-privatized-symbols.fir | 2 +-
.../omp-reduction-cfg-conversion.fir | 2 +-
flang/test/Transforms/simplifyintrinsics.fir | 2 +-
flang/test/Transforms/stack-arrays-hlfir.f90 | 2 +-
flang/test/Transforms/stack-arrays.f90 | 2 +-
flang/test/Transforms/stack-arrays.fir | 2 +-
flang/test/Transforms/stack-reclaime.fir | 2 +-
.../test/Transforms/tbaa-with-dummy-scope.fir | 2 +-
flang/test/Transforms/tbaa.fir | 2 +-
flang/test/Transforms/tbaa2.fir | 2 +-
flang/tools/fir-opt/CMakeLists.txt | 26 ++--
flang/tools/fir-opt/fir-opt.cpp | 2 +-
362 files changed, 532 insertions(+), 526 deletions(-)
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-1.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-1.fir
index 4ccde65741f959..c94a6d526610d6 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-1.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-1.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// CHECK-LABEL: Testing : "_QPtest"
// CHECK-DAG: alloca_1#0 <-> address_of#0: NoAlias
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-2.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-2.fir
index d03348efd2a68c..9c6bd8870a3301 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-2.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-2.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// CHECK-LABEL: Testing : "_QFPtest"
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-3.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-3.fir
index eab438576c2bcf..874e8e637dd4c8 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-3.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-3.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// module m
// type t
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-4.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-4.fir
index 24baab80f83e96..26d712f5c6a136 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-4.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-4.fir
@@ -2,7 +2,7 @@
// use --mlir-disable-threading so that the AA queries are serialised
// as well as its diagnostic output.
-// RUN: fir-opt %s --test-fir-alias-analysis -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s --test-fir-alias-analysis -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// designate for a derived type component:
// module m
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-5.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-5.fir
index 06241385869120..64aadd4935f1b1 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-5.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-5.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// CHECK-LABEL: Testing : "_QPtest1"
// CHECK: arraya(ii)#0 <-> arrayc(ii)#0: NoAlias
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-6.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-6.fir
index 85c780312bd47d..8c289b65d91adc 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-6.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-6.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' 2>&1 | FileCheck %s
// CHECK: test_y(1)#0 <-> test_x(1)#0: MayAlias
func.func @_QPtest(%arg0: !fir.ref<!fir.box<!fir.ptr<!fir.array<?xf32>>>> {fir.bindc_name = "y"}) {
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-7.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-7.fir
index fdf2fc4353bbb9..ecc896c2725c7a 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-7.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-7.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' 2>&1 | FileCheck %s
// leslie3d case with two allocatable module variables
// that cannot alias:
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-8.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-8.fir
index a04c9523f472aa..e98f277e0acd1f 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-8.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-8.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' 2>&1 | FileCheck %s
// Exercise that a box reference does not alias with the address loaded from the box
// module mm
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-9.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-9.fir
index 91616a414676f9..9f2500a33852ac 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-9.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-9.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// Fortran source code:
// program TestTmpArrayAssignment
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-host-assoc.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-host-assoc.fir
index 7f90384ac99c56..01510ef7a086c2 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-host-assoc.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-host-assoc.fir
@@ -1,5 +1,5 @@
// Test alias analysis queries for host associated accesses.
-// RUN: fir-opt %s --test-fir-alias-analysis -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s --test-fir-alias-analysis -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// subroutine test1
// integer :: x(10)
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-private-allocatable.mlir b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-private-allocatable.mlir
index 5116622364fad8..95ee6f3d53d5df 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-private-allocatable.mlir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-private-allocatable.mlir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// Fortran code before simplification:
// SUBROUTINE mysub(ns,ne)
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-1.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-1.fir
index 88f411847172a0..865507fdaeb553 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-1.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-1.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// Fortran source code:
//
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-2.fir b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-2.fir
index c6b2e29a7188a9..213511026ef6b0 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-2.fir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-2.fir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// Fortran source code:
//
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private-ptr.mlir b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private-ptr.mlir
index 78207d21c45bf3..354373963ac3eb 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private-ptr.mlir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private-ptr.mlir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// Fortran code:
// program main
diff --git a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private.mlir b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private.mlir
index 4668b2c215c8c3..b7d5568685ac34 100644
--- a/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private.mlir
+++ b/flang/test/Analysis/AliasAnalysis/alias-analysis-omp-teams-distribute-private.mlir
@@ -1,6 +1,6 @@
// Use --mlir-disable-threading so that the AA queries are serialized
// as well as its diagnostic output.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
// Fortran code:
//
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-after-inlining.fir b/flang/test/Analysis/AliasAnalysis/modref-call-after-inlining.fir
index c9dd03c95d7e87..54218c6f9edef3 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-after-inlining.fir
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-after-inlining.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+// RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
// RUN: --mlir-disable-threading %s -o /dev/null 2>&1 | FileCheck %s
// Test fir.call modref with internal procedures after the host function has been inlined in
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-args.f90 b/flang/test/Analysis/AliasAnalysis/modref-call-args.f90
index 5fc2b8143377b0..adc10e30154c14 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-args.f90
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-args.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | %python %S/gen_mod_ref_test.py | \
-! RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+! RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
! RUN: --mlir-disable-threading -o /dev/null 2>&1 | FileCheck %s
! Test fir.call modref when arguments are passed to the call. This focus
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-dummies.f90 b/flang/test/Analysis/AliasAnalysis/modref-call-dummies.f90
index a4c57cff70927f..14872b2a6f7632 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-dummies.f90
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-dummies.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | %python %S/gen_mod_ref_test.py | \
-! RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+! RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
! RUN: --mlir-disable-threading -o /dev/null 2>&1 | FileCheck %s
! Test fir.call modref for dummy argument variables. This focus on
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-equivalence.f90 b/flang/test/Analysis/AliasAnalysis/modref-call-equivalence.f90
index 1bb2f7a66431f8..3dd3d4c259c3da 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-equivalence.f90
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-equivalence.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | %python %S/gen_mod_ref_test.py | \
-! RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+! RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
! RUN: --mlir-disable-threading -o /dev/null 2>&1 | FileCheck %s
! Test that mod ref effects for variables captured in internal procedures
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-globals.f90 b/flang/test/Analysis/AliasAnalysis/modref-call-globals.f90
index 695b38ed406a53..44eb0d763448b4 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-globals.f90
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-globals.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | %python %S/gen_mod_ref_test.py | \
-! RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+! RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
! RUN: --mlir-disable-threading -o /dev/null 2>&1 | FileCheck %s
! Test fir.call modref for global variables (module, saved, common).
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-internal-proc.f90 b/flang/test/Analysis/AliasAnalysis/modref-call-internal-proc.f90
index 2683880c7765c2..c529a6c8ad07c6 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-internal-proc.f90
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-internal-proc.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | %python %S/gen_mod_ref_test.py | \
-! RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+! RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
! RUN: --mlir-disable-threading -o /dev/null 2>&1 | FileCheck %s
! Test fir.call modref with internal procedures
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-locals.f90 b/flang/test/Analysis/AliasAnalysis/modref-call-locals.f90
index 3038d1a450b7ee..be9bbd396ff2e5 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-locals.f90
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-locals.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | %python %S/gen_mod_ref_test.py | \
-! RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+! RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
! RUN: --mlir-disable-threading -o /dev/null 2>&1 | FileCheck %s
! Test fir.call modref for local variables.
diff --git a/flang/test/Analysis/AliasAnalysis/modref-call-not-fortran.fir b/flang/test/Analysis/AliasAnalysis/modref-call-not-fortran.fir
index 1cae83fa4f2253..a32d30d1bf5df6 100644
--- a/flang/test/Analysis/AliasAnalysis/modref-call-not-fortran.fir
+++ b/flang/test/Analysis/AliasAnalysis/modref-call-not-fortran.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
+// RUN: fir-test-opt -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis-modref))' \
// RUN: --mlir-disable-threading %s -o /dev/null 2>&1 | FileCheck %s
// Test that fir.call modref is conservative when it cannot enusre it is
diff --git a/flang/test/Analysis/AliasAnalysis/ptr-component.fir b/flang/test/Analysis/AliasAnalysis/ptr-component.fir
index 856d8e2d94c989..bcf3c504712186 100644
--- a/flang/test/Analysis/AliasAnalysis/ptr-component.fir
+++ b/flang/test/Analysis/AliasAnalysis/ptr-component.fir
@@ -5,7 +5,7 @@
// is via fir.coordinate_of instead of hlfir.designate. We would like alias
// analysis results to be the same in both versions.
-// RUN: fir-opt %s -split-input-file -o /dev/null --mlir-disable-threading \
+// RUN: fir-test-opt %s -split-input-file -o /dev/null --mlir-disable-threading \
// RUN: -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' \
// RUN: 2>&1 | FileCheck -match-full-lines %s
diff --git a/flang/test/CMakeLists.txt b/flang/test/CMakeLists.txt
index cab214c2ef4c8c..2f5347b61da366 100644
--- a/flang/test/CMakeLists.txt
+++ b/flang/test/CMakeLists.txt
@@ -64,7 +64,7 @@ set(FLANG_TEST_DEPENDS
count
not
module_files
- fir-opt
+ fir-test-opt
tco
bbc
llvm-dis
diff --git a/flang/test/Driver/omp-cse-region-boundary.f90 b/flang/test/Driver/omp-cse-region-boundary.f90
index 726ac4899ba708..f14cfa704c33d8 100644
--- a/flang/test/Driver/omp-cse-region-boundary.f90
+++ b/flang/test/Driver/omp-cse-region-boundary.f90
@@ -1,10 +1,10 @@
!This test checks that when compiling an OpenMP program for the target device
!CSE is not done across target op region boundaries. It also checks that when
!compiling for the host CSE is done.
-!RUN: %flang_fc1 -fopenmp-is-target-device -emit-mlir -fopenmp %s -o - | fir-opt -cse | FileCheck %s -check-prefix=CHECK-DEVICE
-!RUN: %flang_fc1 -emit-mlir -fopenmp %s -o - | fir-opt -cse | FileCheck %s -check-prefix=CHECK-HOST
-!RUN: bbc -fopenmp-is-target-device -emit-fir -fopenmp %s -o - | fir-opt -cse | FileCheck %s -check-prefix=CHECK-DEVICE
-!RUN: bbc -emit-fir -fopenmp %s -o - | fir-opt -cse | FileCheck %s -check-prefix=CHECK-HOST
+!RUN: %flang_fc1 -fopenmp-is-target-device -emit-mlir -fopenmp %s -o - | fir-test-opt -cse | FileCheck %s -check-prefix=CHECK-DEVICE
+!RUN: %flang_fc1 -emit-mlir -fopenmp %s -o - | fir-test-opt -cse | FileCheck %s -check-prefix=CHECK-HOST
+!RUN: bbc -fopenmp-is-target-device -emit-fir -fopenmp %s -o - | fir-test-opt -cse | FileCheck %s -check-prefix=CHECK-DEVICE
+!RUN: bbc -emit-fir -fopenmp %s -o - | fir-test-opt -cse | FileCheck %s -check-prefix=CHECK-HOST
!Constant should be present inside target region.
!CHECK-DEVICE: omp.target
diff --git a/flang/test/Fir/CUDA/cuda-abstract-result.mlir b/flang/test/Fir/CUDA/cuda-abstract-result.mlir
index 8c59487ca5cd5c..6dd523f0b66ac9 100644
--- a/flang/test/Fir/CUDA/cuda-abstract-result.mlir
+++ b/flang/test/Fir/CUDA/cuda-abstract-result.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -pass-pipeline='builtin.module(gpu.module(gpu.func(abstract-result)))' %s | FileCheck %s
+// RUN: fir-test-opt -pass-pipeline='builtin.module(gpu.module(gpu.func(abstract-result)))' %s | FileCheck %s
gpu.module @test {
gpu.func @_QMinterval_mPtest1(%arg0: !fir.ref<!fir.type<_QMinterval_mTinterval{inf:f32,sup:f32}>>, %arg1: !fir.ref<f32>) -> !fir.type<_QMinterval_mTinterval{inf:f32,sup:f32}> {
diff --git a/flang/test/Fir/CUDA/cuda-alloc-free.fir b/flang/test/Fir/CUDA/cuda-alloc-free.fir
index 6194f0071cd796..111ff684d4db4a 100644
--- a/flang/test/Fir/CUDA/cuda-alloc-free.fir
+++ b/flang/test/Fir/CUDA/cuda-alloc-free.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cuf-convert %s | FileCheck %s
+// RUN: fir-test-opt --cuf-convert %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>} {
diff --git a/flang/test/Fir/CUDA/cuda-allocate.fir b/flang/test/Fir/CUDA/cuda-allocate.fir
index 35c6e2a77a697d..6e885f1a2c0655 100644
--- a/flang/test/Fir/CUDA/cuda-allocate.fir
+++ b/flang/test/Fir/CUDA/cuda-allocate.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cuf-convert %s | FileCheck %s
+// RUN: fir-test-opt --cuf-convert %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>} {
diff --git a/flang/test/Fir/CUDA/cuda-code-gen.mlir b/flang/test/Fir/CUDA/cuda-code-gen.mlir
index 3ad28fa7bd5179..87c058703b8d1f 100644
--- a/flang/test/Fir/CUDA/cuda-code-gen.mlir
+++ b/flang/test/Fir/CUDA/cuda-code-gen.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>} {
func.func @_QQmain() attributes {fir.bindc_name = "cufkernel_global"} {
diff --git a/flang/test/Fir/CUDA/cuda-compiler-generated-names.mlir b/flang/test/Fir/CUDA/cuda-compiler-generated-names.mlir
index 8c5503d7baf8c1..f1b747cf264c76 100644
--- a/flang/test/Fir/CUDA/cuda-compiler-generated-names.mlir
+++ b/flang/test/Fir/CUDA/cuda-compiler-generated-names.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s
module @mod1 attributes {gpu.container} {
gpu.module @gpu1 {
diff --git a/flang/test/Fir/CUDA/cuda-constructor-2.f90 b/flang/test/Fir/CUDA/cuda-constructor-2.f90
index 89fc99b736f4f8..7ea3726bed315c 100644
--- a/flang/test/Fir/CUDA/cuda-constructor-2.f90
+++ b/flang/test/Fir/CUDA/cuda-constructor-2.f90
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cuf-add-constructor %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cuf-add-constructor %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (https://github.com/llvm/llvm-project.git cae351f3453a0a26ec8eb2ddaf773c24a29d929e)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
diff --git a/flang/test/Fir/CUDA/cuda-constructor.f90 b/flang/test/Fir/CUDA/cuda-constructor.f90
index d02350b4f4198c..763aa61d822494 100644
--- a/flang/test/Fir/CUDA/cuda-constructor.f90
+++ b/flang/test/Fir/CUDA/cuda-constructor.f90
@@ -1,4 +1,4 @@
-! RUN: bbc -fcuda -emit-hlfir %s -o - | fir-opt --cuf-add-constructor | FileCheck %s
+! RUN: bbc -fcuda -emit-hlfir %s -o - | fir-test-opt --cuf-add-constructor | FileCheck %s
program main
real, device :: ahost(10)
diff --git a/flang/test/Fir/CUDA/cuda-data-transfer.fir b/flang/test/Fir/CUDA/cuda-data-transfer.fir
index 415d0015918bb3..d337fee9d5faaf 100644
--- a/flang/test/Fir/CUDA/cuda-data-transfer.fir
+++ b/flang/test/Fir/CUDA/cuda-data-transfer.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cuf-convert %s | FileCheck %s
+// RUN: fir-test-opt --cuf-convert %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>} {
diff --git a/flang/test/Fir/CUDA/cuda-device-context.mlir b/flang/test/Fir/CUDA/cuda-device-context.mlir
index 89d68721ccaf20..baa31576321337 100644
--- a/flang/test/Fir/CUDA/cuda-device-context.mlir
+++ b/flang/test/Fir/CUDA/cuda-device-context.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --simplify-intrinsics %s | FileCheck %s
+// RUN: fir-test-opt --simplify-intrinsics %s | FileCheck %s
func.func @_QPsum_in_device(%arg0: !fir.ref<!fir.array<?xi32>> {cuf.data_attr = #cuf.cuda<device>, fir.bindc_name = "a"}, %arg1: i32 {fir.bindc_name = "n"}) attributes {cuf.proc_attr = #cuf.cuda_proc<global>} {
%c5_i32 = arith.constant 5 : i32
diff --git a/flang/test/Fir/CUDA/cuda-device-global.f90 b/flang/test/Fir/CUDA/cuda-device-global.f90
index 8cac643b27c349..21dccd9ff31dc9 100644
--- a/flang/test/Fir/CUDA/cuda-device-global.f90
+++ b/flang/test/Fir/CUDA/cuda-device-global.f90
@@ -1,5 +1,5 @@
-// RUN: fir-opt --split-input-file --cuf-device-global %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cuf-device-global %s | FileCheck %s
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module} {
diff --git a/flang/test/Fir/CUDA/cuda-external-mangling.mlir b/flang/test/Fir/CUDA/cuda-external-mangling.mlir
index cd028a201e6fa9..c6787e2dcc5293 100644
--- a/flang/test/Fir/CUDA/cuda-external-mangling.mlir
+++ b/flang/test/Fir/CUDA/cuda-external-mangling.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --external-name-interop %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --external-name-interop %s | FileCheck %s
module @mod attributes {gpu.container_module} {
diff --git a/flang/test/Fir/CUDA/cuda-global-addr.mlir b/flang/test/Fir/CUDA/cuda-global-addr.mlir
index 3e50c7a51f49c0..64a369c04b81d5 100644
--- a/flang/test/Fir/CUDA/cuda-global-addr.mlir
+++ b/flang/test/Fir/CUDA/cuda-global-addr.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cuf-convert %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cuf-convert %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>} {
fir.global @_QMmod1Eadev {data_attr = #cuf.cuda<device>} : !fir.array<10xi32> {
diff --git a/flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir b/flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir
index 3db2336c90a7d4..f6dc9557ca4b3b 100644
--- a/flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir
+++ b/flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cuf-gpu-convert-to-llvm %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cuf-gpu-convert-to-llvm %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (git at github.com:clementval/llvm-project.git ddcfd4d2dc17bf66cee8c3ef6284118684a2b0e6)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
llvm.func @_QMmod1Phost_sub() {
diff --git a/flang/test/Fir/CUDA/cuda-implicit-device-global.f90 b/flang/test/Fir/CUDA/cuda-implicit-device-global.f90
index 9b22ed86e419ce..6f3b6c70625bbc 100644
--- a/flang/test/Fir/CUDA/cuda-implicit-device-global.f90
+++ b/flang/test/Fir/CUDA/cuda-implicit-device-global.f90
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cuf-device-global %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cuf-device-global %s | FileCheck %s
// Test that global used in device function are flagged with the correct
// attribute.
diff --git a/flang/test/Fir/CUDA/cuda-launch.fir b/flang/test/Fir/CUDA/cuda-launch.fir
index 8432b9ec926e38..78cf90ae24ab35 100644
--- a/flang/test/Fir/CUDA/cuda-launch.fir
+++ b/flang/test/Fir/CUDA/cuda-launch.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cuf-convert %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cuf-convert %s | FileCheck %s
module attributes {gpu.container_module, dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>} {
diff --git a/flang/test/Fir/CUDA/cuda-register-func.fir b/flang/test/Fir/CUDA/cuda-register-func.fir
index 25ab8dd786a4e0..61d0466d08fbfb 100644
--- a/flang/test/Fir/CUDA/cuda-register-func.fir
+++ b/flang/test/Fir/CUDA/cuda-register-func.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cuf-add-constructor %s | FileCheck %s
+// RUN: fir-test-opt --cuf-add-constructor %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<"dlti.endianness", "little">, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module, llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (https://github.com/llvm/llvm-project.git cae351f3453a0a26ec8eb2ddaf773c24a29d929e)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
gpu.module @cuda_device_mod {
diff --git a/flang/test/Fir/CUDA/cuda-sync-desc.mlir b/flang/test/Fir/CUDA/cuda-sync-desc.mlir
index 20b317f34a7f26..af9f7e4752735f 100644
--- a/flang/test/Fir/CUDA/cuda-sync-desc.mlir
+++ b/flang/test/Fir/CUDA/cuda-sync-desc.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cuf-convert %s | FileCheck %s
+// RUN: fir-test-opt --cuf-convert %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<i16 = dense<16> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, i1 = dense<8> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, !llvm.ptr<270> = dense<32> : vector<4xi64>, f64 = dense<64> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, "dlti.endianness" = "little", "dlti.stack_alignment" = 128 : i64>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.ident = "flang version 20.0.0 (git at github.com:clementval/llvm-project.git f37e52237791f58438790c77edeb8de08f692987)", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
fir.global @_QMdevptrEdev_ptr {data_attr = #cuf.cuda<device>} : !fir.box<!fir.ptr<!fir.array<?xf32>>> {
diff --git a/flang/test/Fir/CUDA/cuda-target-rewrite.mlir b/flang/test/Fir/CUDA/cuda-target-rewrite.mlir
index 0e7534e06c89c9..4c6b2122e115d8 100644
--- a/flang/test/Fir/CUDA/cuda-target-rewrite.mlir
+++ b/flang/test/Fir/CUDA/cuda-target-rewrite.mlir
@@ -1,5 +1,5 @@
// REQUIRES: x86-registered-target
-// RUN: fir-opt --split-input-file --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
gpu.module @testmod {
gpu.func @_QPvcpowdk(%arg0: !fir.ref<complex<f64>> {cuf.data_attr = #cuf.cuda<device>, fir.bindc_name = "a"}) attributes {cuf.proc_attr = #cuf.cuda_proc<global>} {
diff --git a/flang/test/Fir/OpenACC/legalize-data.fir b/flang/test/Fir/OpenACC/legalize-data.fir
index 6bc81dc08db303..d209aaa6fa41ba 100644
--- a/flang/test/Fir/OpenACC/legalize-data.fir
+++ b/flang/test/Fir/OpenACC/legalize-data.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -split-input-file --openacc-legalize-data-values %s | FileCheck %s
+// RUN: fir-test-opt -split-input-file --openacc-legalize-data-values %s | FileCheck %s
func.func @_QPsub1(%arg0: !fir.ref<i32> {fir.bindc_name = "i"}) {
%0:2 = hlfir.declare %arg0 {uniq_name = "_QFsub1Ei"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
diff --git a/flang/test/Fir/OpenACC/openacc-mappable.fir b/flang/test/Fir/OpenACC/openacc-mappable.fir
index 438cb29b991c7d..8e8b23356e22b2 100644
--- a/flang/test/Fir/OpenACC/openacc-mappable.fir
+++ b/flang/test/Fir/OpenACC/openacc-mappable.fir
@@ -1,5 +1,5 @@
// Use --mlir-disable-threading so that the diagnostic printing is serialized.
-// RUN: fir-opt %s -pass-pipeline='builtin.module(test-fir-openacc-interfaces)' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+// RUN: fir-test-opt %s -pass-pipeline='builtin.module(test-fir-openacc-interfaces)' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<f16 = dense<16> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, !llvm.ptr<270> = dense<32> : vector<4xi64>, f64 = dense<64> : vector<2xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, "dlti.endianness" = "little", "dlti.stack_alignment" = 128 : i64>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"} {
func.func @_QPsub() {
diff --git a/flang/test/Fir/OpenACC/propagate-attr-folding.fir b/flang/test/Fir/OpenACC/propagate-attr-folding.fir
index 99ac7516690e23..745e574c93e71d 100644
--- a/flang/test/Fir/OpenACC/propagate-attr-folding.fir
+++ b/flang/test/Fir/OpenACC/propagate-attr-folding.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s --opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s --opt-bufferization | FileCheck %s
// Check that OpenACC attributes are propagated to the defining operations when
// fir.box_addr is folded in bufferization optimization.
diff --git a/flang/test/Fir/Todo/allocmem.fir b/flang/test/Fir/Todo/allocmem.fir
index 27509b68195c52..ed2f80198cdd2a 100644
--- a/flang/test/Fir/Todo/allocmem.fir
+++ b/flang/test/Fir/Todo/allocmem.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.allocmem` of derived type with LEN parameters conversion to llvm.
// Not implemented yet.
diff --git a/flang/test/Fir/Todo/boxproc_host.fir b/flang/test/Fir/Todo/boxproc_host.fir
index c48a89ca5e32e3..5a1b8b14103695 100644
--- a/flang/test/Fir/Todo/boxproc_host.fir
+++ b/flang/test/Fir/Todo/boxproc_host.fir
@@ -1,4 +1,4 @@
-// RUN: not fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: not fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test that `fir.boxproc_host` fails conversion to llvm.
// At the moment this test fails since `fir.boxproc` type does not have a conversion.
diff --git a/flang/test/Fir/Todo/coordinate_of_2.fir b/flang/test/Fir/Todo/coordinate_of_2.fir
index 7ceead8de52794..71ab7b62c40efe 100644
--- a/flang/test/Fir/Todo/coordinate_of_2.fir
+++ b/flang/test/Fir/Todo/coordinate_of_2.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// CHECK: not yet implemented: fir.array nested inside other array and/or derived type
diff --git a/flang/test/Fir/Todo/coordinate_of_3.fir b/flang/test/Fir/Todo/coordinate_of_3.fir
index 305422052be27a..931c2158d15af1 100644
--- a/flang/test/Fir/Todo/coordinate_of_3.fir
+++ b/flang/test/Fir/Todo/coordinate_of_3.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// CHECK: not yet implemented: fir.array nested inside other array and/or derived type
diff --git a/flang/test/Fir/Todo/coordinate_of_4.fir b/flang/test/Fir/Todo/coordinate_of_4.fir
index 4593e19c0afb87..9b62a6651a291d 100644
--- a/flang/test/Fir/Todo/coordinate_of_4.fir
+++ b/flang/test/Fir/Todo/coordinate_of_4.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// `!fir.coordinate_of` - derived type with `!fir.len_param_index`. As
// `!fir.len_param_index` is not implemented yet, the error that we hit is
diff --git a/flang/test/Fir/Todo/end.fir b/flang/test/Fir/Todo/end.fir
index 667e396809b0ed..73deaab05382e0 100644
--- a/flang/test/Fir/Todo/end.fir
+++ b/flang/test/Fir/Todo/end.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.end` conversion to llvm.
// Not implemented yet.
diff --git a/flang/test/Fir/Todo/global_len.fir b/flang/test/Fir/Todo/global_len.fir
index cb3e770dcdd759..8912429d838a7d 100644
--- a/flang/test/Fir/Todo/global_len.fir
+++ b/flang/test/Fir/Todo/global_len.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.global_len` conversion to llvm.
// Not implemented yet.
diff --git a/flang/test/Fir/Todo/len_param_index.fir b/flang/test/Fir/Todo/len_param_index.fir
index 016d838afa7e7f..5a3a39843a02a5 100644
--- a/flang/test/Fir/Todo/len_param_index.fir
+++ b/flang/test/Fir/Todo/len_param_index.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.len_param_index` conversion to llvm.
// Not implemented yet.
diff --git a/flang/test/Fir/Todo/select_case_with_character.fir b/flang/test/Fir/Todo/select_case_with_character.fir
index bddcb1e18a1b38..1b739bd869181e 100644
--- a/flang/test/Fir/Todo/select_case_with_character.fir
+++ b/flang/test/Fir/Todo/select_case_with_character.fir
@@ -1,4 +1,4 @@
-// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: %not_todo_cmd fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.select_case` conversion to llvm with character type.
// Not implemented yet.
diff --git a/flang/test/Fir/Todo/unboxproc.fir b/flang/test/Fir/Todo/unboxproc.fir
index 4e887471f2ba21..8dd23048dcaccf 100644
--- a/flang/test/Fir/Todo/unboxproc.fir
+++ b/flang/test/Fir/Todo/unboxproc.fir
@@ -1,4 +1,4 @@
-// RUN: not fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
+// RUN: not fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s
// Test `fir.unboxproc` conversion to llvm.
// Not implemented yet.
diff --git a/flang/test/Fir/abstract-result-2.fir b/flang/test/Fir/abstract-result-2.fir
index 8e59f60c8c244f..629b9310a8cc29 100644
--- a/flang/test/Fir/abstract-result-2.fir
+++ b/flang/test/Fir/abstract-result-2.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s --abstract-result | FileCheck %s
+// RUN: fir-test-opt %s --abstract-result | FileCheck %s
// Check that the attributes are shifted along with their corresponding arguments
diff --git a/flang/test/Fir/abstract-results-bindc.fir b/flang/test/Fir/abstract-results-bindc.fir
index b2efffea31fb15..f87f5e391ce12c 100644
--- a/flang/test/Fir/abstract-results-bindc.fir
+++ b/flang/test/Fir/abstract-results-bindc.fir
@@ -1,7 +1,7 @@
// Test that bind_c derived type results are not moved to a hidden argument
// by the abstract-result pass. They will be dealt with according to the C
// struct returning ABI for the target in the target-rewrite pass.
-// RUN: fir-opt %s --abstract-result | FileCheck %s
+// RUN: fir-test-opt %s --abstract-result | FileCheck %s
!t = !fir.type<t{i:f32, j: i32, k: f32}>
!cptr = !fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>
diff --git a/flang/test/Fir/abstract-results.fir b/flang/test/Fir/abstract-results.fir
index 93e63dc657f0c2..73c2b5dc735557 100644
--- a/flang/test/Fir/abstract-results.fir
+++ b/flang/test/Fir/abstract-results.fir
@@ -1,10 +1,10 @@
// Test rewrite of functions that return fir.array<>, fir.type<>, fir.box<> to
// functions that take an additional argument for the result.
-// RUN: fir-opt %s --abstract-result | FileCheck %s --check-prefix=FUNC-REF
-// RUN: fir-opt %s --abstract-result=abstract-result-as-box | FileCheck %s --check-prefix=FUNC-BOX
-// RUN: fir-opt %s --abstract-result | FileCheck %s --check-prefix=GLOBAL-REF
-// RUN: fir-opt %s --abstract-result=abstract-result-as-box | FileCheck %s --check-prefix=GLOBAL-BOX
+// RUN: fir-test-opt %s --abstract-result | FileCheck %s --check-prefix=FUNC-REF
+// RUN: fir-test-opt %s --abstract-result=abstract-result-as-box | FileCheck %s --check-prefix=FUNC-BOX
+// RUN: fir-test-opt %s --abstract-result | FileCheck %s --check-prefix=GLOBAL-REF
+// RUN: fir-test-opt %s --abstract-result=abstract-result-as-box | FileCheck %s --check-prefix=GLOBAL-BOX
// ----------------------- Test declaration rewrite ----------------------------
diff --git a/flang/test/Fir/affine-demotion.fir b/flang/test/Fir/affine-demotion.fir
index bdb84be3624cb9..bbe75eb7c6e3dd 100644
--- a/flang/test/Fir/affine-demotion.fir
+++ b/flang/test/Fir/affine-demotion.fir
@@ -1,6 +1,6 @@
// Test affine demotion pass
-// RUN: fir-opt --split-input-file --demote-affine %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --demote-affine %s | FileCheck %s
#map0 = affine_map<()[s0, s1] -> (s1 - s0 + 1)>
#map1 = affine_map<()[s0] -> (s0 + 1)>
diff --git a/flang/test/Fir/affine-promotion.fir b/flang/test/Fir/affine-promotion.fir
index aae35c6ef56590..b3e8a2babfe24e 100644
--- a/flang/test/Fir/affine-promotion.fir
+++ b/flang/test/Fir/affine-promotion.fir
@@ -1,6 +1,6 @@
// Test affine promotion pass
-// RUN: fir-opt --split-input-file --promote-to-affine --affine-loop-invariant-code-motion --cse %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --promote-to-affine --affine-loop-invariant-code-motion --cse %s | FileCheck %s
!arr_d1 = !fir.ref<!fir.array<?xf32>>
#arr_len = affine_map<()[j1,k1] -> (k1 - j1 + 1)>
diff --git a/flang/test/Fir/already-defined-free.fir b/flang/test/Fir/already-defined-free.fir
index 1a6aa7b5b5404b..8f50d0d1f6c9e9 100644
--- a/flang/test/Fir/already-defined-free.fir
+++ b/flang/test/Fir/already-defined-free.fir
@@ -1,7 +1,7 @@
// Test that FIR codegen handles cases when free and malloc have
// already been defined in FIR (either by the user in Fortran via
// BIND(C) or by some FIR pass in between).
-// RUN: fir-opt --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir %s | FileCheck %s
func.func @already_declared_free_malloc() {
diff --git a/flang/test/Fir/annotate-constant.fir b/flang/test/Fir/annotate-constant.fir
index dafa3a3ce9293d..514fb33de5185b 100644
--- a/flang/test/Fir/annotate-constant.fir
+++ b/flang/test/Fir/annotate-constant.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -annotate-constant %s | FileCheck %s
+// RUN: fir-test-opt -annotate-constant %s | FileCheck %s
// CHECK-LABEL: func @annotate_test() -> !fir.ref<!fir.array<?xi32>> {
func.func @annotate_test() -> !fir.ref<!fir.array<?xi32>> {
diff --git a/flang/test/Fir/array-coor-canonicalization.fir b/flang/test/Fir/array-coor-canonicalization.fir
index bc58347bdf3928..221443144f16d1 100644
--- a/flang/test/Fir/array-coor-canonicalization.fir
+++ b/flang/test/Fir/array-coor-canonicalization.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --canonicalize %s | FileCheck %s
+// RUN: fir-test-opt --canonicalize %s | FileCheck %s
// CHECK-LABEL: func.func @_QPtest1(
// CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.array<120x2xi32>> {fir.bindc_name = "u"}) {
diff --git a/flang/test/Fir/array-copies-pointers.fir b/flang/test/Fir/array-copies-pointers.fir
index a304e5f84b9e17..ae8cd62380dbed 100644
--- a/flang/test/Fir/array-copies-pointers.fir
+++ b/flang/test/Fir/array-copies-pointers.fir
@@ -1,8 +1,8 @@
// Test array-copy-value pass (copy elision) with array assignment
// involving Fortran pointers. Focus in only on wether copy ellision
// is made or not.
-// RUN: fir-opt %s --array-value-copy -split-input-file | FileCheck --check-prefixes=ALL,NOOPT %s
-// RUN: fir-opt %s --array-value-copy="optimize-conflicts=true" -split-input-file | FileCheck --check-prefixes=ALL,OPT %s
+// RUN: fir-test-opt %s --array-value-copy -split-input-file | FileCheck --check-prefixes=ALL,NOOPT %s
+// RUN: fir-test-opt %s --array-value-copy="optimize-conflicts=true" -split-input-file | FileCheck --check-prefixes=ALL,OPT %s
// Test `pointer(:) = array(:)`
// ALL-LABEL: func @maybe_overlap
diff --git a/flang/test/Fir/array-modify.fir b/flang/test/Fir/array-modify.fir
index 09c9516ec57d30..764a6a7c8e356f 100644
--- a/flang/test/Fir/array-modify.fir
+++ b/flang/test/Fir/array-modify.fir
@@ -1,6 +1,6 @@
// Test array-copy-value pass (copy elision) with fir.array_modify
-// RUN: fir-opt %s --array-value-copy | FileCheck %s
-// RUN: fir-opt %s --array-value-copy="optimize-conflicts=true" | FileCheck %s
+// RUN: fir-test-opt %s --array-value-copy | FileCheck %s
+// RUN: fir-test-opt %s --array-value-copy="optimize-conflicts=true" | FileCheck %s
// Test user_defined_assignment(arg0(:), arg1(:))
func.func @no_overlap(%arg0: !fir.ref<!fir.array<100xf32>>, %arg1: !fir.ref<!fir.array<100xf32>>) {
diff --git a/flang/test/Fir/array-value-copy-2.fir b/flang/test/Fir/array-value-copy-2.fir
index 21b340af10c6b8..040ffd8d60d299 100644
--- a/flang/test/Fir/array-value-copy-2.fir
+++ b/flang/test/Fir/array-value-copy-2.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --array-value-copy --cfg-conversion %s | FileCheck %s
-// RUN: fir-opt --array-value-copy="optimize-conflicts=true" --cfg-conversion %s | FileCheck %s
+// RUN: fir-test-opt --array-value-copy --cfg-conversion %s | FileCheck %s
+// RUN: fir-test-opt --array-value-copy="optimize-conflicts=true" --cfg-conversion %s | FileCheck %s
// CHECK-LABEL: func @_QPslice1(
// CHECK-NOT: fir.allocmem
diff --git a/flang/test/Fir/array-value-copy-3.fir b/flang/test/Fir/array-value-copy-3.fir
index 945a857e466697..0771e83554d7b7 100644
--- a/flang/test/Fir/array-value-copy-3.fir
+++ b/flang/test/Fir/array-value-copy-3.fir
@@ -3,8 +3,8 @@
// before they can be used in component assignments, and to deallocate the components
// that may have been allocated in the end.
-// RUN: fir-opt --array-value-copy %s | FileCheck %s
-// RUN: fir-opt --array-value-copy="optimize-conflicts=true" %s | FileCheck %s
+// RUN: fir-test-opt --array-value-copy %s | FileCheck %s
+// RUN: fir-test-opt --array-value-copy="optimize-conflicts=true" %s | FileCheck %s
!t_with_alloc_comp = !fir.type<t{i:!fir.box<!fir.heap<!fir.array<?xi32>>>}>
diff --git a/flang/test/Fir/array-value-copy-4.fir b/flang/test/Fir/array-value-copy-4.fir
index 85def88e6887c4..4dd7e3b4897363 100644
--- a/flang/test/Fir/array-value-copy-4.fir
+++ b/flang/test/Fir/array-value-copy-4.fir
@@ -2,8 +2,8 @@
// Conversion was previously crashing as reported in
// https://github.com/llvm/llvm-project/issues/59342.
-// RUN: fir-opt --array-value-copy %s | FileCheck %s
-// RUN: fir-opt --array-value-copy="optimize-conflicts=true" %s | FileCheck %s
+// RUN: fir-test-opt --array-value-copy %s | FileCheck %s
+// RUN: fir-test-opt --array-value-copy="optimize-conflicts=true" %s | FileCheck %s
func.func @_QMmodPsub1(%arg0: !fir.box<!fir.array<?x!fir.type<_QMmodTrec1{dat:!fir.box<!fir.heap<!fir.array<?xi32>>>}>>> {fir.bindc_name = "x"}) {
%0 = fir.alloca !fir.box<!fir.type<_QMmodTrec1{dat:!fir.box<!fir.heap<!fir.array<?xi32>>>}>>
diff --git a/flang/test/Fir/array-value-copy-cam4.fir b/flang/test/Fir/array-value-copy-cam4.fir
index 3bb465cfaa59ff..8a73a2d3bf326c 100644
--- a/flang/test/Fir/array-value-copy-cam4.fir
+++ b/flang/test/Fir/array-value-copy-cam4.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --array-value-copy %s | FileCheck --check-prefix=NOOPT %s
-// RUN: fir-opt --array-value-copy="optimize-conflicts=true" %s | FileCheck --check-prefix=OPT %s
+// RUN: fir-test-opt --array-value-copy %s | FileCheck --check-prefix=NOOPT %s
+// RUN: fir-test-opt --array-value-copy="optimize-conflicts=true" %s | FileCheck --check-prefix=OPT %s
// Reproducer from SPEC CPU2017/527.cam4_r:
// module cam4
diff --git a/flang/test/Fir/array-value-copy.fir b/flang/test/Fir/array-value-copy.fir
index 58db8b3ae4cd23..99d97a241255d1 100644
--- a/flang/test/Fir/array-value-copy.fir
+++ b/flang/test/Fir/array-value-copy.fir
@@ -1,5 +1,5 @@
// Test for the array-value-copy pass
-// RUN: fir-opt --split-input-file --array-value-copy %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --array-value-copy %s | FileCheck %s
// Test simple fir.array_load/fir.array_fetch conversion to fir.array_coor
func.func @array_fetch_conversion(%arr1 : !fir.ref<!fir.array<?x?xf32>>, %m: index, %n: index) {
diff --git a/flang/test/Fir/box-offset.fir b/flang/test/Fir/box-offset.fir
index 98c2eaefb8d6b9..17f09bca6bd2a4 100644
--- a/flang/test/Fir/box-offset.fir
+++ b/flang/test/Fir/box-offset.fir
@@ -1,5 +1,5 @@
// Test fir.box_offset parse/print/parse/print identity.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_box_offset(%unlimited : !fir.ref<!fir.class<none>>, %type_star : !fir.ref<!fir.box<!fir.array<?xnone>>>) {
%box1 = fir.alloca !fir.box<i32>
diff --git a/flang/test/Fir/boxaddr-folding.fir b/flang/test/Fir/boxaddr-folding.fir
index 4fd23864ae49c9..f69268f4b502c8 100644
--- a/flang/test/Fir/boxaddr-folding.fir
+++ b/flang/test/Fir/boxaddr-folding.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --canonicalize %s -split-input-file | FileCheck %s
+// RUN: fir-test-opt --canonicalize %s -split-input-file | FileCheck %s
// CHECK-LABEL: func @check_no_folding
func.func @check_no_folding(%arg0 : !fir.ref<!fir.array<?xi32>>) {
diff --git a/flang/test/Fir/boxproc-2.fir b/flang/test/Fir/boxproc-2.fir
index 963dfa03663cb0..c5ca86663bccb3 100644
--- a/flang/test/Fir/boxproc-2.fir
+++ b/flang/test/Fir/boxproc-2.fir
@@ -1,5 +1,5 @@
// Test fir.boxproc type conversion in the boxed-procedure pass.
-// RUN: fir-opt --boxed-procedure %s | FileCheck %s
+// RUN: fir-test-opt --boxed-procedure %s | FileCheck %s
//CHECK-LABEL: func.func private @test1(!fir.type<a{x:i32,y:f64}>, () -> ()) -> none
func.func private @test1(!fir.type<a{x:i32, y:f64}>, !fir.boxproc<() -> ()>) -> none
diff --git a/flang/test/Fir/boxproc-openmp.fir b/flang/test/Fir/boxproc-openmp.fir
index 9db053ad93c665..7dd2ff41700001 100644
--- a/flang/test/Fir/boxproc-openmp.fir
+++ b/flang/test/Fir/boxproc-openmp.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --boxed-procedure %s | FileCheck %s
+// RUN: fir-test-opt --boxed-procedure %s | FileCheck %s
// Test the boxed procedure pass with OpenMP declaration operations.
// Check minimally, only arguments, yields and the private types.
diff --git a/flang/test/Fir/cg-ops.fir b/flang/test/Fir/cg-ops.fir
index c8c666a62a3d27..6ec636c5cc2df4 100644
--- a/flang/test/Fir/cg-ops.fir
+++ b/flang/test/Fir/cg-ops.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --pass-pipeline="builtin.module(cg-rewrite,cse)" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --pass-pipeline="builtin.module(cg-rewrite,cse)" %s | FileCheck %s
// CHECK-LABEL: func @codegen(
// CHECK-SAME: %[[arg:.*]]: !fir
diff --git a/flang/test/Fir/char-conversion.fir b/flang/test/Fir/char-conversion.fir
index 0eaad4ca73a047..cb16e35aca3a3a 100644
--- a/flang/test/Fir/char-conversion.fir
+++ b/flang/test/Fir/char-conversion.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --character-conversion %s | FileCheck %s
+// RUN: fir-test-opt --character-conversion %s | FileCheck %s
func.func @char_convert() {
%1 = fir.undefined i32
diff --git a/flang/test/Fir/char01.fir b/flang/test/Fir/char01.fir
index ec8c63f540a254..d3f5c744e529bd 100644
--- a/flang/test/Fir/char01.fir
+++ b/flang/test/Fir/char01.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | tco | FileCheck %s
+// RUN: fir-test-opt %s | tco | FileCheck %s
// CHECK-LABEL: @test
func.func @test(%arg0 : !fir.ref<!fir.char<1>>, %arg1 : !fir.ref<!fir.char<1,?>>, %arg2 : i32) {
diff --git a/flang/test/Fir/comdat-present.fir b/flang/test/Fir/comdat-present.fir
index 96d14e5973f4f7..9a042a1590ff64 100644
--- a/flang/test/Fir/comdat-present.fir
+++ b/flang/test/Fir/comdat-present.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt %s --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %s
-// RUN: fir-opt %s --fir-to-llvm-ir="target=x86_64-pc-windows-msvc" | FileCheck %s
+// RUN: fir-test-opt %s --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %s
+// RUN: fir-test-opt %s --fir-to-llvm-ir="target=x86_64-pc-windows-msvc" | FileCheck %s
fir.global linkonce_odr @global_linkonce_odr constant : i32 {
%0 = arith.constant 0 : i32
diff --git a/flang/test/Fir/comdat.fir b/flang/test/Fir/comdat.fir
index 2f5da505e4903f..c5b080c9188916 100644
--- a/flang/test/Fir/comdat.fir
+++ b/flang/test/Fir/comdat.fir
@@ -1,8 +1,8 @@
-// RUN: fir-opt %s --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %s --check-prefixes="CHECK-COMDAT"
-// RUN: fir-opt %s --fir-to-llvm-ir="target=x86_64-pc-windows-msvc" | FileCheck %s --check-prefixes="CHECK-COMDAT"
-// RUN: fir-opt %s --fir-to-llvm-ir="target=aarch64-apple-darwin" | FileCheck %s --check-prefixes="CHECK-NOCOMDAT"
-// RUN: fir-opt %s --fir-to-llvm-ir="target=powerpc64-ibm-aix" | FileCheck %s --check-prefixes="CHECK-NOCOMDAT"
+// RUN: fir-test-opt %s --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %s --check-prefixes="CHECK-COMDAT"
+// RUN: fir-test-opt %s --fir-to-llvm-ir="target=x86_64-pc-windows-msvc" | FileCheck %s --check-prefixes="CHECK-COMDAT"
+// RUN: fir-test-opt %s --fir-to-llvm-ir="target=aarch64-apple-darwin" | FileCheck %s --check-prefixes="CHECK-NOCOMDAT"
+// RUN: fir-test-opt %s --fir-to-llvm-ir="target=powerpc64-ibm-aix" | FileCheck %s --check-prefixes="CHECK-NOCOMDAT"
// CHECK-COMDAT: llvm.func linkonce @fun_linkonce(%arg0: i32) -> i32 comdat(@__llvm_comdat::@fun_linkonce)
// CHECK-NOCOMDAT: llvm.func linkonce @fun_linkonce(%arg0: i32) -> i32 {
diff --git a/flang/test/Fir/commute.fir b/flang/test/Fir/commute.fir
index 75338161d2d99c..fc6b7951c8abe1 100644
--- a/flang/test/Fir/commute.fir
+++ b/flang/test/Fir/commute.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | tco | FileCheck %s
+// RUN: fir-test-opt %s | tco | FileCheck %s
// CHECK-LABEL: define i32 @f1(i32 %0, i32 %1)
func.func @f1(%a : i32, %b : i32) -> i32 {
diff --git a/flang/test/Fir/compare.fir b/flang/test/Fir/compare.fir
index 2bd00bb85c4290..b825097c93ee4a 100644
--- a/flang/test/Fir/compare.fir
+++ b/flang/test/Fir/compare.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | tco --target=x86_64-unknown-linux-gnu | FileCheck %s
+// RUN: fir-test-opt %s | tco --target=x86_64-unknown-linux-gnu | FileCheck %s
// CHECK-LABEL: define i1 @cmp3(<2 x float> %0, <2 x float> %1)
func.func @cmp3(%a : complex<f32>, %b : complex<f32>) -> i1 {
diff --git a/flang/test/Fir/constant.fir b/flang/test/Fir/constant.fir
index c204b7c426146e..4e53435d624ebe 100644
--- a/flang/test/Fir/constant.fir
+++ b/flang/test/Fir/constant.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | tco | FileCheck %s
+// RUN: fir-test-opt %s | tco | FileCheck %s
// CHECK-LABEL: define [3 x i8] @x
func.func @x() -> !fir.char<1,3> {
diff --git a/flang/test/Fir/convert-fold.fir b/flang/test/Fir/convert-fold.fir
index fb30e634ba5e6d..8127b6e7ccf03f 100644
--- a/flang/test/Fir/convert-fold.fir
+++ b/flang/test/Fir/convert-fold.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --canonicalize %s | FileCheck %s
+// RUN: fir-test-opt --canonicalize %s | FileCheck %s
// CHECK-LABEL: @ftest
func.func @ftest(%x : i1) -> i1 {
diff --git a/flang/test/Fir/convert-to-llvm-invalid.fir b/flang/test/Fir/convert-to-llvm-invalid.fir
index 9f003e4eb7d59d..d7d580d7bb8816 100644
--- a/flang/test/Fir/convert-to-llvm-invalid.fir
+++ b/flang/test/Fir/convert-to-llvm-invalid.fir
@@ -1,6 +1,6 @@
// Test FIR to LLVM IR conversion invalid cases and diagnostics.
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" --verify-diagnostics %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" --verify-diagnostics %s
// Test `fir.shape` conversion failure because the op has uses.
diff --git a/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir b/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
index 8e4e1fe824d9f5..1f4d5f43caa538 100644
--- a/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
+++ b/flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --cfg-conversion --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cfg-conversion --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
func.func @_QPsb1(%arg0: !fir.ref<i32> {fir.bindc_name = "n"}, %arg1: !fir.ref<!fir.array<?xi32>> {fir.bindc_name = "arr"}) {
%c1_i64 = arith.constant 1 : i64
diff --git a/flang/test/Fir/convert-to-llvm-target.fir b/flang/test/Fir/convert-to-llvm-target.fir
index bb873080072fab..95ae21e7f23924 100644
--- a/flang/test/Fir/convert-to-llvm-target.fir
+++ b/flang/test/Fir/convert-to-llvm-target.fir
@@ -1,7 +1,7 @@
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix INT64
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes INT64
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefixes INT32
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s --check-prefixes INT64
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix INT64
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes INT64
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefixes INT32
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s --check-prefixes INT64
//=============================================================================
// SUMMARY: Tests for FIR --> LLVM MLIR conversion that *depend* on the target
diff --git a/flang/test/Fir/convert-to-llvm.fir b/flang/test/Fir/convert-to-llvm.fir
index 4c9f965e1241a0..cb38e9792692ad 100644
--- a/flang/test/Fir/convert-to-llvm.fir
+++ b/flang/test/Fir/convert-to-llvm.fir
@@ -1,10 +1,10 @@
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-pc-win32" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=aarch64-apple-darwin" %s | FileCheck %s --check-prefixes=CHECK,CHECK-NO-COMDAT,GENERIC
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=amdgcn-amd-amdhsa, datalayout=e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-P0" %s | FileCheck -check-prefixes=CHECK,AMDGPU %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-pc-win32" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT,GENERIC
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=aarch64-apple-darwin" %s | FileCheck %s --check-prefixes=CHECK,CHECK-NO-COMDAT,GENERIC
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=amdgcn-amd-amdhsa, datalayout=e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-P0" %s | FileCheck -check-prefixes=CHECK,AMDGPU %s
//===================================================
// SUMMARY: Tests for FIR --> LLVM MLIR conversion
diff --git a/flang/test/Fir/convert-type-desc-to-llvm.fir b/flang/test/Fir/convert-type-desc-to-llvm.fir
index 251c95d9c84216..14bcf918ffe697 100644
--- a/flang/test/Fir/convert-type-desc-to-llvm.fir
+++ b/flang/test/Fir/convert-type-desc-to-llvm.fir
@@ -1,10 +1,10 @@
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=i386-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=x86_64-pc-win32 type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=aarch64-apple-darwin type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-NO-COMDAT
-// RUN: fir-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=amdgcn-amd-amdhsa type-descriptors-renamed-for-assembly=1 datalayout=e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-P0" %s | FileCheck -check-prefixes=CHECK %s
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=i386-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gnu type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=x86_64-pc-win32 type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-COMDAT
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=aarch64-apple-darwin type-descriptors-renamed-for-assembly=true" %s | FileCheck %s --check-prefixes=CHECK,CHECK-NO-COMDAT
+// RUN: fir-test-opt --split-input-file --compiler-generated-names --fir-to-llvm-ir="target=amdgcn-amd-amdhsa type-descriptors-renamed-for-assembly=1 datalayout=e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-P0" %s | FileCheck -check-prefixes=CHECK %s
// Check descriptor for a derived type. Check that the f18Addendum flag is set
// to 1 meaning the addendum is present (true) and the addendum values are
diff --git a/flang/test/Fir/coordinate_of_1.fir b/flang/test/Fir/coordinate_of_1.fir
index ebde8c5a0d4652..445067652f1c40 100644
--- a/flang/test/Fir/coordinate_of_1.fir
+++ b/flang/test/Fir/coordinate_of_1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --verify-diagnostics %s
+// RUN: fir-test-opt --split-input-file --verify-diagnostics %s
func.func @_QPcoordinate_box_derived_with_fir_len(%arg0: !fir.box<!fir.type<derived_2{len1:i32}>>) -> i32 {
%lp = arith.constant 22 : i32
diff --git a/flang/test/Fir/coordinateof.fir b/flang/test/Fir/coordinateof.fir
index f96f5b48bb355f..7cf73dbae34e2a 100644
--- a/flang/test/Fir/coordinateof.fir
+++ b/flang/test/Fir/coordinateof.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | tco | FileCheck %s
+// RUN: fir-test-opt %s | tco | FileCheck %s
// tests on coordinate_of op
diff --git a/flang/test/Fir/cse.fir b/flang/test/Fir/cse.fir
index 8813b7c411f508..b26945a7d8da52 100644
--- a/flang/test/Fir/cse.fir
+++ b/flang/test/Fir/cse.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cse -split-input-file %s | FileCheck %s
+// RUN: fir-test-opt --cse -split-input-file %s | FileCheck %s
// Check that the redundant fir.load is removed.
func.func @fun(%arg0: !fir.ref<i64>) -> i64 {
diff --git a/flang/test/Fir/cuf-invalid.fir b/flang/test/Fir/cuf-invalid.fir
index a3b9be3ee8223b..fe5c873cd07a11 100644
--- a/flang/test/Fir/cuf-invalid.fir
+++ b/flang/test/Fir/cuf-invalid.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -split-input-file -verify-diagnostics %s
+// RUN: fir-test-opt -split-input-file -verify-diagnostics %s
func.func @_QPsub1() {
%0 = fir.alloca !fir.box<!fir.heap<!fir.array<?xf32>>> {bindc_name = "a", uniq_name = "_QFsub1Ea"}
diff --git a/flang/test/Fir/cuf.mlir b/flang/test/Fir/cuf.mlir
index 188044d04b8481..088f84d6199249 100644
--- a/flang/test/Fir/cuf.mlir
+++ b/flang/test/Fir/cuf.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file %s | fir-opt --split-input-file | FileCheck %s
+// RUN: fir-test-opt --split-input-file %s | fir-test-opt --split-input-file | FileCheck %s
// Simple round trip test of operations.
diff --git a/flang/test/Fir/declare-codegen.fir b/flang/test/Fir/declare-codegen.fir
index fe8d84ef2d19f9..1f66e472a38b24 100644
--- a/flang/test/Fir/declare-codegen.fir
+++ b/flang/test/Fir/declare-codegen.fir
@@ -1,7 +1,7 @@
// Test rewrite of fir.declare. The result is replaced by the memref operand.
-// RUN: fir-opt --cg-rewrite="preserve-declare=true" %s -o - | FileCheck %s --check-prefixes DECL
-// RUN: fir-opt --cg-rewrite="preserve-declare=false" %s -o - | FileCheck %s --check-prefixes NODECL
-// RUN: fir-opt --cg-rewrite %s -o - | FileCheck %s --check-prefixes NODECL
+// RUN: fir-test-opt --cg-rewrite="preserve-declare=true" %s -o - | FileCheck %s --check-prefixes DECL
+// RUN: fir-test-opt --cg-rewrite="preserve-declare=false" %s -o - | FileCheck %s --check-prefixes NODECL
+// RUN: fir-test-opt --cg-rewrite %s -o - | FileCheck %s --check-prefixes NODECL
func.func @test(%arg0: !fir.ref<!fir.array<12x23xi32>>) {
diff --git a/flang/test/Fir/declare.fir b/flang/test/Fir/declare.fir
index f335ae41b68714..21ec39e633f7c0 100644
--- a/flang/test/Fir/declare.fir
+++ b/flang/test/Fir/declare.fir
@@ -1,6 +1,6 @@
// Test fir.declare operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @numeric_declare(%arg0: !fir.ref<f32>) {
%0 = fir.declare %arg0 {uniq_name = "x"} : (!fir.ref<f32>) -> !fir.ref<f32>
diff --git a/flang/test/Fir/dispatch.f90 b/flang/test/Fir/dispatch.f90
index 2ffdcd5b1884da..98b00a554f8c97 100644
--- a/flang/test/Fir/dispatch.f90
+++ b/flang/test/Fir/dispatch.f90
@@ -1,4 +1,4 @@
-! RUN: bbc -emit-hlfir %s -o - | fir-opt --fir-polymorphic-op | FileCheck %s
+! RUN: bbc -emit-hlfir %s -o - | fir-test-opt --fir-polymorphic-op | FileCheck %s
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s --check-prefix=BT
! Tests codegen of fir.dispatch operation. This test is intentionally run from
diff --git a/flang/test/Fir/dummy-scope-codegen.fir b/flang/test/Fir/dummy-scope-codegen.fir
index 2e5c091552a7a6..eccca7799a1659 100644
--- a/flang/test/Fir/dummy-scope-codegen.fir
+++ b/flang/test/Fir/dummy-scope-codegen.fir
@@ -1,6 +1,6 @@
-// RUN: fir-opt --cg-rewrite="preserve-declare=true" %s -o - | FileCheck %s --check-prefixes DECL
-// RUN: fir-opt --cg-rewrite="preserve-declare=false" %s -o - | FileCheck %s --check-prefixes NODECL
-// RUN: fir-opt --cg-rewrite %s -o - | FileCheck %s --check-prefixes NODECL
+// RUN: fir-test-opt --cg-rewrite="preserve-declare=true" %s -o - | FileCheck %s --check-prefixes DECL
+// RUN: fir-test-opt --cg-rewrite="preserve-declare=false" %s -o - | FileCheck %s --check-prefixes NODECL
+// RUN: fir-test-opt --cg-rewrite %s -o - | FileCheck %s --check-prefixes NODECL
func.func @dummy_scope(%arg0: !fir.ref<f32>) {
%scope = fir.dummy_scope : !fir.dscope
diff --git a/flang/test/Fir/dummy_scope.fir b/flang/test/Fir/dummy_scope.fir
index 58985923a8f445..a57133de19a6fb 100644
--- a/flang/test/Fir/dummy_scope.fir
+++ b/flang/test/Fir/dummy_scope.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt %s | fir-opt | FileCheck %s
-// RUN: fir-opt %s | fir-opt -cse | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt -cse | FileCheck %s
// CHECK-LABEL: func.func @dummy_scope(
// CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<f32>) {
diff --git a/flang/test/Fir/embox-char.fir b/flang/test/Fir/embox-char.fir
index efb069f96520d4..d9bddfe5722ba8 100644
--- a/flang/test/Fir/embox-char.fir
+++ b/flang/test/Fir/embox-char.fir
@@ -9,7 +9,7 @@
// is computed in elements of the type used for the GEP
// computing the base of the slice.
-// RUN: fir-opt -o - -cg-rewrite --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt -o - -cg-rewrite --fir-to-llvm-ir %s | FileCheck %s
// RUN: tco -o - -cg-rewrite --fir-to-llvm-ir %s | FileCheck %s
// subroutine test(x)
diff --git a/flang/test/Fir/embox-substring.fir b/flang/test/Fir/embox-substring.fir
index f2042f9bda7fc4..3bdcf9e4338726 100644
--- a/flang/test/Fir/embox-substring.fir
+++ b/flang/test/Fir/embox-substring.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -o - -cg-rewrite --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt -o - -cg-rewrite --fir-to-llvm-ir %s | FileCheck %s
// RUN: tco -o - -cg-rewrite --fir-to-llvm-ir %s | FileCheck %s
// CHECK-LABEL: llvm.func @embox_index_substr(
diff --git a/flang/test/Fir/embox-write.fir b/flang/test/Fir/embox-write.fir
index 6068c090d4822c..4f8f87dd17c8a0 100644
--- a/flang/test/Fir/embox-write.fir
+++ b/flang/test/Fir/embox-write.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | tco | FileCheck %s
+// RUN: fir-test-opt %s | tco | FileCheck %s
// CHECK-LABEL: @set_all_n
func.func @set_all_n(%n : index, %x : i32) {
diff --git a/flang/test/Fir/external-mangling-emboxproc.fir b/flang/test/Fir/external-mangling-emboxproc.fir
index 07f581885c61b4..6919ab12244234 100644
--- a/flang/test/Fir/external-mangling-emboxproc.fir
+++ b/flang/test/Fir/external-mangling-emboxproc.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --external-name-interop %s | FileCheck %s
+// RUN: fir-test-opt --external-name-interop %s | FileCheck %s
func.func @_QPfoo() {
%e6 = fir.alloca tuple<i32,f64>
diff --git a/flang/test/Fir/external-mangling.fir b/flang/test/Fir/external-mangling.fir
index 68e3ca0b098411..b10e841fecd617 100644
--- a/flang/test/Fir/external-mangling.fir
+++ b/flang/test/Fir/external-mangling.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --external-name-interop="append-underscore=true" %s | FileCheck %s --check-prefix=CHECK-UNDER
-// RUN: fir-opt --external-name-interop="append-underscore=false" %s | FileCheck %s --check-prefix=CHECK-NOUNDER
+// RUN: fir-test-opt --external-name-interop="append-underscore=true" %s | FileCheck %s --check-prefix=CHECK-UNDER
+// RUN: fir-test-opt --external-name-interop="append-underscore=false" %s | FileCheck %s --check-prefix=CHECK-NOUNDER
// RUN: tco --external-name-interop="append-underscore=true" %s | FileCheck %s --check-prefix=CHECK-UNDER
// RUN: tco --external-name-interop="append-underscore=false" %s | FileCheck %s --check-prefix=CHECK-NOUNDER
// RUN: tco --external-name-interop="append-underscore=true" %s | tco --fir-to-llvm-ir | FileCheck %s --check-prefix=LLVMIR-UNDER
diff --git a/flang/test/Fir/field-index.fir b/flang/test/Fir/field-index.fir
index 08653752d71d30..eefeeccf87f719 100644
--- a/flang/test/Fir/field-index.fir
+++ b/flang/test/Fir/field-index.fir
@@ -1,5 +1,5 @@
// Test fir.field_index llvm code generation
-// RUN: fir-opt %s | tco | FileCheck %s
+// RUN: fir-test-opt %s | tco | FileCheck %s
// CHECK-DAG: %[[a:.*]] = type { float, i32 }
diff --git a/flang/test/Fir/fir-fast-math.fir b/flang/test/Fir/fir-fast-math.fir
index b9ebe7248eed99..177eb09ecbd584 100644
--- a/flang/test/Fir/fir-fast-math.fir
+++ b/flang/test/Fir/fir-fast-math.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// CHECK-LABEL: @test_callop
func.func @test_callop(%arg0 : f32) {
diff --git a/flang/test/Fir/fir-int-conversion.fir b/flang/test/Fir/fir-int-conversion.fir
index 700272bf13220c..2f052c177d0aa1 100644
--- a/flang/test/Fir/fir-int-conversion.fir
+++ b/flang/test/Fir/fir-int-conversion.fir
@@ -1,6 +1,6 @@
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,DEFAULT %s
-// RUN: fir-opt --kind-mapping="i1:4,i2:8,i4:16,i8:32,i16:64" --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,ALL-CUSTOM %s
-// RUN: fir-opt --kind-mapping="i2:1,i4:8,i16:32" --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,SOME-CUSTOM %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,DEFAULT %s
+// RUN: fir-test-opt --kind-mapping="i1:4,i2:8,i4:16,i8:32,i16:64" --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,ALL-CUSTOM %s
+// RUN: fir-test-opt --kind-mapping="i2:1,i4:8,i16:32" --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,SOME-CUSTOM %s
// Test `!fir.integer<KIND>` conversion with and without kind-mapping string
diff --git a/flang/test/Fir/fir-ops.fir b/flang/test/Fir/fir-ops.fir
index 5a30858511f0c9..195f1c2c260698 100644
--- a/flang/test/Fir/fir-ops.fir
+++ b/flang/test/Fir/fir-ops.fir
@@ -1,6 +1,6 @@
// Test the FIR operations
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// CHECK-LABEL: func private @it1() -> !fir.int<4>
// CHECK: func private @box1() -> !fir.boxchar<2>
diff --git a/flang/test/Fir/fir-types.fir b/flang/test/Fir/fir-types.fir
index 083aca31d8e05d..29de8fb9647889 100644
--- a/flang/test/Fir/fir-types.fir
+++ b/flang/test/Fir/fir-types.fir
@@ -1,6 +1,6 @@
// Test the FIR types
// Parse types and check that we can reparse what we print.
-// RUN: fir-opt --split-input-file %s | fir-opt --split-input-file | FileCheck %s
+// RUN: fir-test-opt --split-input-file %s | fir-test-opt --split-input-file | FileCheck %s
// Fortran Intrinsic types
// CHECK-LABEL: func private @it1() -> !fir.int<4>
diff --git a/flang/test/Fir/global-attributes.fir b/flang/test/Fir/global-attributes.fir
index 24442d671504f8..182315b2f42e4c 100644
--- a/flang/test/Fir/global-attributes.fir
+++ b/flang/test/Fir/global-attributes.fir
@@ -1,6 +1,6 @@
-// RUN: fir-opt --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir %s | FileCheck %s
// RUN: tco --fir-to-llvm-ir %s | FileCheck %s
-// RUN: fir-opt %s | FileCheck %s --check-prefix=READ-OUT
+// RUN: fir-test-opt %s | FileCheck %s --check-prefix=READ-OUT
// RUN: tco --emit-fir %s | FileCheck %s --check-prefix=READ-OUT
// CHECK: llvm.mlir.global external @_QMtest_0Edata_int() {{{.*}}test = "string_attribute_maintained"{{.*}}} : i32 {
diff --git a/flang/test/Fir/global-initialization.fir b/flang/test/Fir/global-initialization.fir
index b628acd66713b5..557f72310baec7 100644
--- a/flang/test/Fir/global-initialization.fir
+++ b/flang/test/Fir/global-initialization.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir %s | FileCheck %s
// RUN: tco --fir-to-llvm-ir %s | FileCheck %s
fir.global internal @_QEmask : !fir.array<32xi32> {
diff --git a/flang/test/Fir/invalid-types.fir b/flang/test/Fir/invalid-types.fir
index f4505097086ad8..c4a0b7a7343d81 100644
--- a/flang/test/Fir/invalid-types.fir
+++ b/flang/test/Fir/invalid-types.fir
@@ -1,5 +1,5 @@
// Test the FIR types parser diagnostics
-// RUN: fir-opt -split-input-file -verify-diagnostics %s
+// RUN: fir-test-opt -split-input-file -verify-diagnostics %s
// expected-error at +1 {{expected non-function type}}
func.func private @box3() -> !fir.boxproc<>
diff --git a/flang/test/Fir/invalid.fir b/flang/test/Fir/invalid.fir
index 7e3f9d64984129..b260df9efebf3f 100644
--- a/flang/test/Fir/invalid.fir
+++ b/flang/test/Fir/invalid.fir
@@ -1,6 +1,6 @@
// FIR ops diagnotic tests
-// RUN: fir-opt -split-input-file -verify-diagnostics %s
+// RUN: fir-test-opt -split-input-file -verify-diagnostics %s
// expected-error at +1{{custom op 'fir.string_lit' must have character type}}
%0 = fir.string_lit "Hello, World!"(13) : !fir.int<32>
diff --git a/flang/test/Fir/is_assumed_size-codegen.fir b/flang/test/Fir/is_assumed_size-codegen.fir
index 646446c00e8799..064862e44ff947 100644
--- a/flang/test/Fir/is_assumed_size-codegen.fir
+++ b/flang/test/Fir/is_assumed_size-codegen.fir
@@ -1,5 +1,5 @@
// Test fir.is_assumed_size lowering to runtime calls in fir-assumed-rank-op pass.
-// RUN: fir-opt -o - --fir-assumed-rank-op %s | FileCheck %s
+// RUN: fir-test-opt -o - --fir-assumed-rank-op %s | FileCheck %s
func.func @test_ranked(%arg0: !fir.class<!fir.array<?xnone>> ) -> i1 {
%1 = fir.is_assumed_size %arg0 : (!fir.class<!fir.array<?xnone>>) -> i1
diff --git a/flang/test/Fir/logical-convert.fir b/flang/test/Fir/logical-convert.fir
index 4cc081934db430..3c73a8c552a217 100644
--- a/flang/test/Fir/logical-convert.fir
+++ b/flang/test/Fir/logical-convert.fir
@@ -1,7 +1,7 @@
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s
// -----
// CHECK-LABEL: @test_l1_i1
diff --git a/flang/test/Fir/loop01.fir b/flang/test/Fir/loop01.fir
index 30d10b9bbdb979..7ff5f1ddd0a5ea 100644
--- a/flang/test/Fir/loop01.fir
+++ b/flang/test/Fir/loop01.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --split-input-file --cfg-conversion %s | FileCheck %s
-// RUN: fir-opt --split-input-file --cfg-conversion="set-nsw=false" %s | FileCheck %s --check-prefix=NO-NSW
+// RUN: fir-test-opt --split-input-file --cfg-conversion %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --cfg-conversion="set-nsw=false" %s | FileCheck %s --check-prefix=NO-NSW
// NO-NSW-NOT: overflow<nsw>
diff --git a/flang/test/Fir/loop02.fir b/flang/test/Fir/loop02.fir
index fb209a9dfeb426..a7b31025a42f56 100644
--- a/flang/test/Fir/loop02.fir
+++ b/flang/test/Fir/loop02.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --cfg-conversion="always-execute-loop-body=true" %s | FileCheck %s
-// RUN: fir-opt --cfg-conversion %s | FileCheck %s --check-prefix=NOOPT
+// RUN: fir-test-opt --cfg-conversion="always-execute-loop-body=true" %s | FileCheck %s
+// RUN: fir-test-opt --cfg-conversion %s | FileCheck %s --check-prefix=NOOPT
func.func @x(%addr : !fir.ref<index>) {
%bound = arith.constant 452 : index
diff --git a/flang/test/Fir/loop03.fir b/flang/test/Fir/loop03.fir
index b88dcaf8639be5..df80d75df88fb5 100644
--- a/flang/test/Fir/loop03.fir
+++ b/flang/test/Fir/loop03.fir
@@ -1,5 +1,5 @@
// Test the reduction semantics of fir.do_loop
-// RUN: fir-opt %s | FileCheck %s
+// RUN: fir-test-opt %s | FileCheck %s
func.func @reduction() {
%bound = arith.constant 10 : index
diff --git a/flang/test/Fir/memory-allocation-opt-2.fir b/flang/test/Fir/memory-allocation-opt-2.fir
index 2addb6ba8b9991..c162d581368aa8 100644
--- a/flang/test/Fir/memory-allocation-opt-2.fir
+++ b/flang/test/Fir/memory-allocation-opt-2.fir
@@ -1,5 +1,5 @@
// Test memory allocation pass for fir.alloca outside of function entry block
-// RUN: fir-opt --memory-allocation-opt="dynamic-array-on-heap=true" %s | FileCheck %s
+// RUN: fir-test-opt --memory-allocation-opt="dynamic-array-on-heap=true" %s | FileCheck %s
func.func @test_loop() {
%c1 = arith.constant 1 : index
diff --git a/flang/test/Fir/memory-allocation-opt.fir b/flang/test/Fir/memory-allocation-opt.fir
index cfbca2f83ef8ec..13ed4bb11c715d 100644
--- a/flang/test/Fir/memory-allocation-opt.fir
+++ b/flang/test/Fir/memory-allocation-opt.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --memory-allocation-opt="dynamic-array-on-heap=true maximum-array-alloc-size=1024" %s | FileCheck %s
+// RUN: fir-test-opt --memory-allocation-opt="dynamic-array-on-heap=true maximum-array-alloc-size=1024" %s | FileCheck %s
// Test for size of array being too big.
diff --git a/flang/test/Fir/memref-data-flow.fir b/flang/test/Fir/memref-data-flow.fir
index 89f28f4963f7f3..25ce7880bdad31 100644
--- a/flang/test/Fir/memref-data-flow.fir
+++ b/flang/test/Fir/memref-data-flow.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --fir-memref-dataflow-opt %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-memref-dataflow-opt %s | FileCheck %s
// Test that all load-store chains are removed
diff --git a/flang/test/Fir/non-trivial-procedure-binding-description.f90 b/flang/test/Fir/non-trivial-procedure-binding-description.f90
index 668928600157b1..c04d07bcae4bb9 100644
--- a/flang/test/Fir/non-trivial-procedure-binding-description.f90
+++ b/flang/test/Fir/non-trivial-procedure-binding-description.f90
@@ -1,5 +1,5 @@
! RUN: %flang_fc1 -emit-mlir %s -o - | FileCheck %s --check-prefix=BEFORE
-! RUN: %flang_fc1 -emit-mlir %s -o - | fir-opt --abstract-result | FileCheck %s --check-prefix=AFTER
+! RUN: %flang_fc1 -emit-mlir %s -o - | fir-test-opt --abstract-result | FileCheck %s --check-prefix=AFTER
module a
type f
contains
diff --git a/flang/test/Fir/omp-declare-target-data.fir b/flang/test/Fir/omp-declare-target-data.fir
index 171ea8fe4fcc2e..cc260abfd3af37 100644
--- a/flang/test/Fir/omp-declare-target-data.fir
+++ b/flang/test/Fir/omp-declare-target-data.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir %s | FileCheck %s
module attributes {omp.is_target_device = false} {
diff --git a/flang/test/Fir/rebox-susbtring.fir b/flang/test/Fir/rebox-susbtring.fir
index 8f7f4facd13a27..26716a1fc0799f 100644
--- a/flang/test/Fir/rebox-susbtring.fir
+++ b/flang/test/Fir/rebox-susbtring.fir
@@ -1,6 +1,6 @@
// Test translation to llvm IR of fir.rebox with substring array sections.
-// RUN: fir-opt -o - -cg-rewrite --fir-to-llvm-ir -cse %s | FileCheck %s
+// RUN: fir-test-opt -o - -cg-rewrite --fir-to-llvm-ir -cse %s | FileCheck %s
// RUN: tco -o - -cg-rewrite --fir-to-llvm-ir -cse %s | FileCheck %s
// Test a fir.rebox with a substring on a character array with constant
diff --git a/flang/test/Fir/rebox_assumed_rank_codegen.fir b/flang/test/Fir/rebox_assumed_rank_codegen.fir
index b4336b9279493a..6730226e617481 100644
--- a/flang/test/Fir/rebox_assumed_rank_codegen.fir
+++ b/flang/test/Fir/rebox_assumed_rank_codegen.fir
@@ -1,5 +1,5 @@
// Test fir.rebox_assumed_rank lowering to runtime calls in fir-assumed-rank-op pass.
-// RUN: fir-opt -o - --fir-assumed-rank-op %s | FileCheck %s
+// RUN: fir-test-opt -o - --fir-assumed-rank-op %s | FileCheck %s
func.func @test_simple(%arg0: !fir.box<!fir.array<*:f32>> ) {
%1 = fir.rebox_assumed_rank %arg0 lbs ones : (!fir.box<!fir.array<*:f32>>) -> !fir.box<!fir.array<*:f32>>
diff --git a/flang/test/Fir/recursive-type.fir b/flang/test/Fir/recursive-type.fir
index 48df8c1af1da88..fd89891b00787f 100644
--- a/flang/test/Fir/recursive-type.fir
+++ b/flang/test/Fir/recursive-type.fir
@@ -1,9 +1,9 @@
// Test lowering FIR to LLVM IR for recursive types
-// RUN: fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s
!t1 = !fir.type<t1 {a1:!fir.ptr<!fir.type<t1>>}>
!t2 = !fir.type<t2 {b1:f32,b2:!fir.ptr<!fir.type<t2>>,b3:i32,b4:!fir.ptr<!fir.type<t2>>}>
diff --git a/flang/test/Fir/rename-msvc-libm.fir b/flang/test/Fir/rename-msvc-libm.fir
index 1c1f34433bb824..f9efcd80596b3b 100644
--- a/flang/test/Fir/rename-msvc-libm.fir
+++ b/flang/test/Fir/rename-msvc-libm.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s -DHYPOTF=hypotf
-// RUN: fir-opt --fir-to-llvm-ir="target=aarch64-pc-windows-msvc" %s | FileCheck %s -DHYPOTF=_hypotf
+// RUN: fir-test-opt --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu" %s | FileCheck %s -DHYPOTF=hypotf
+// RUN: fir-test-opt --fir-to-llvm-ir="target=aarch64-pc-windows-msvc" %s | FileCheck %s -DHYPOTF=_hypotf
// Test hypotf renaming
diff --git a/flang/test/Fir/struct-passing-aarch64-byval.fir b/flang/test/Fir/struct-passing-aarch64-byval.fir
index 27143459dde2f2..f6c25dc46993fa 100644
--- a/flang/test/Fir/struct-passing-aarch64-byval.fir
+++ b/flang/test/Fir/struct-passing-aarch64-byval.fir
@@ -1,5 +1,5 @@
// Test AArch64 ABI rewrite of struct passed by value (BIND(C), VALUE derived types).
-// RUN: fir-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
// CHECK-LABEL: func.func private @small_i32(!fir.array<2xi64>)
func.func private @small_i32(!fir.type<small_i32{i:i32,j:i32,k:i32}>)
diff --git a/flang/test/Fir/struct-passing-loongarch64-byreg.fir b/flang/test/Fir/struct-passing-loongarch64-byreg.fir
index 585884504aacf3..ddf477a669e559 100644
--- a/flang/test/Fir/struct-passing-loongarch64-byreg.fir
+++ b/flang/test/Fir/struct-passing-loongarch64-byreg.fir
@@ -8,7 +8,7 @@
/// while the other examples only check the signatures.
// REQUIRES: loongarch-registered-target
-// RUN: fir-opt --split-input-file --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s
/// *********************** Struct with a single intrinsic component *********************** ///
diff --git a/flang/test/Fir/struct-passing-x86-64-one-field-inreg.fir b/flang/test/Fir/struct-passing-x86-64-one-field-inreg.fir
index e37e8dd4481d06..206e4698fcbc41 100644
--- a/flang/test/Fir/struct-passing-x86-64-one-field-inreg.fir
+++ b/flang/test/Fir/struct-passing-x86-64-one-field-inreg.fir
@@ -1,7 +1,7 @@
// Test X86-64 passing ABI of struct in registers for the simple case
// where the struct has a single intrinsic component that is not a complex.
// REQUIRES: x86-registered-target
-// RUN: fir-opt -target-rewrite="target=x86_64-unknown-linux-gnu" %s -o - | FileCheck %s
+// RUN: fir-test-opt -target-rewrite="target=x86_64-unknown-linux-gnu" %s -o - | FileCheck %s
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
diff --git a/flang/test/Fir/struct-passing-x86-64-several-fields-inreg.fir b/flang/test/Fir/struct-passing-x86-64-several-fields-inreg.fir
index 9a0a41e1da542a..dec7a99a586eef 100644
--- a/flang/test/Fir/struct-passing-x86-64-several-fields-inreg.fir
+++ b/flang/test/Fir/struct-passing-x86-64-several-fields-inreg.fir
@@ -1,7 +1,7 @@
// Test X86-64 passing ABI of struct in registers for the cases where the
// struct has more than one field.
// REQUIRES: x86-registered-target
-// RUN: fir-opt -target-rewrite="target=x86_64-unknown-linux-gnu" %s -o - | FileCheck %s
+// RUN: fir-test-opt -target-rewrite="target=x86_64-unknown-linux-gnu" %s -o - | FileCheck %s
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
diff --git a/flang/test/Fir/struct-return-aarch64.fir b/flang/test/Fir/struct-return-aarch64.fir
index 8b75c2cac7b6be..2811b2a349ebde 100644
--- a/flang/test/Fir/struct-return-aarch64.fir
+++ b/flang/test/Fir/struct-return-aarch64.fir
@@ -1,5 +1,5 @@
// Test AArch64 ABI rewrite of struct returned by value (BIND(C), VALUE derived types).
-// RUN: fir-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s
!composite = !fir.type<t1{i:f32,j:i32,k:f32}>
// CHECK-LABEL: func.func private @test_composite() -> !fir.array<2xi64>
diff --git a/flang/test/Fir/struct-return-loongarch64-byreg.fir b/flang/test/Fir/struct-return-loongarch64-byreg.fir
index eb3d4d50d88668..689c1e57148b3e 100644
--- a/flang/test/Fir/struct-return-loongarch64-byreg.fir
+++ b/flang/test/Fir/struct-return-loongarch64-byreg.fir
@@ -8,7 +8,7 @@
/// while the other examples only check the signatures.
// REQUIRES: loongarch-registered-target
-// RUN: fir-opt --split-input-file --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s
/// *********************** Struct with a single intrinsic component *********************** ///
diff --git a/flang/test/Fir/struct-return-x86-64.fir b/flang/test/Fir/struct-return-x86-64.fir
index f4c2add69ff7e9..18f2eadc88af4d 100644
--- a/flang/test/Fir/struct-return-x86-64.fir
+++ b/flang/test/Fir/struct-return-x86-64.fir
@@ -1,6 +1,6 @@
// Test X86-64 ABI rewrite of struct returned by value (BIND(C), VALUE derived types).
// REQUIRES: x86-registered-target
-// RUN: fir-opt --target-rewrite %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite %s | FileCheck %s
!fits_in_reg = !fir.type<t1{i:f32,j:i32,k:f32}>
!too_big = !fir.type<t2{i:!fir.array<5xf32>}>
diff --git a/flang/test/Fir/target-rewrite-arg-position.fir b/flang/test/Fir/target-rewrite-arg-position.fir
index 45e783662fb016..c0fc49ec65d7ba 100644
--- a/flang/test/Fir/target-rewrite-arg-position.fir
+++ b/flang/test/Fir/target-rewrite-arg-position.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
// Test with an argument shift.
diff --git a/flang/test/Fir/target-rewrite-boxchar.fir b/flang/test/Fir/target-rewrite-boxchar.fir
index 681536cde6a05a..4f9c2e5b424c00 100644
--- a/flang/test/Fir/target-rewrite-boxchar.fir
+++ b/flang/test/Fir/target-rewrite-boxchar.fir
@@ -1,10 +1,10 @@
-// RUN: fir-opt --target-rewrite="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT32
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
-// RUN: fir-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
-// RUN: fir-opt --target-rewrite="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
-// RUN: fir-opt --target-rewrite="target=amdgcn-amd-amdhsa" %s | FileCheck %s --check-prefix=INT64
-// RUN: fir-opt --target-rewrite="target=nvptx64-nvidia-cuda" %s | FileCheck %s --check-prefix=INT64
-// RUN: fir-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
+// RUN: fir-test-opt --target-rewrite="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT32
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
+// RUN: fir-test-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
+// RUN: fir-test-opt --target-rewrite="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
+// RUN: fir-test-opt --target-rewrite="target=amdgcn-amd-amdhsa" %s | FileCheck %s --check-prefix=INT64
+// RUN: fir-test-opt --target-rewrite="target=nvptx64-nvidia-cuda" %s | FileCheck %s --check-prefix=INT64
+// RUN: fir-test-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=INT64
// Test that we rewrite the signatures and bodies of functions that take boxchar
// parameters.
diff --git a/flang/test/Fir/target-rewrite-char-proc.fir b/flang/test/Fir/target-rewrite-char-proc.fir
index ccb1fc06f6f0d4..c70f344dd334df 100644
--- a/flang/test/Fir/target-rewrite-char-proc.fir
+++ b/flang/test/Fir/target-rewrite-char-proc.fir
@@ -1,7 +1,7 @@
// Test rewrite of character procedure pointer tuple argument to two different
// arguments: one for the function address, and one for the length. The length
// argument is added after other characters.
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
// CHECK: func private @takes_char_proc(() -> () {fir.char_proc}, i64)
func.func private @takes_char_proc(tuple<() -> (), i64> {fir.char_proc})
diff --git a/flang/test/Fir/target-rewrite-complex-10-x86.fir b/flang/test/Fir/target-rewrite-complex-10-x86.fir
index 651d1e78fdc93a..d1a17b746a0d4e 100644
--- a/flang/test/Fir/target-rewrite-complex-10-x86.fir
+++ b/flang/test/Fir/target-rewrite-complex-10-x86.fir
@@ -1,6 +1,6 @@
// Test COMPLEX(10) passing and returning on X86
// REQUIRES: x86-registered-target
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=AMD64
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=AMD64
// RUN: tco -target="x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=AMD64_LLVM
func.func @returncomplex10() -> complex<f80> {
diff --git a/flang/test/Fir/target-rewrite-complex.fir b/flang/test/Fir/target-rewrite-complex.fir
index e697abb6e3ab36..1d42b8bd7d336b 100644
--- a/flang/test/Fir/target-rewrite-complex.fir
+++ b/flang/test/Fir/target-rewrite-complex.fir
@@ -1,14 +1,14 @@
-// RUN: fir-opt --target-rewrite="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefix=I32
-// RUN: fir-opt --target-rewrite="target=i386-w64-windows-gnu" %s | FileCheck %s --check-prefix=I32_MINGW
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=X64
-// RUN: fir-opt --target-rewrite="target=x86_64-w64-windows-gnu" %s | FileCheck %s --check-prefix=X64_MINGW
-// RUN: fir-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=AARCH64
-// RUN: fir-opt --target-rewrite="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefix=PPC64le
-// RUN: fir-opt --target-rewrite="target=sparc64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=SPARCV9
-// RUN: fir-opt --target-rewrite="target=sparcv9-sun-solaris2.11" %s | FileCheck %s --check-prefix=SPARCV9
-// RUN: fir-opt --target-rewrite="target=riscv64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=RISCV64
-// RUN: fir-opt --target-rewrite="target=powerpc64-ibm-aix7.2.0.0" %s | FileCheck %s --check-prefix=PPC64
-// RUN: fir-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=LOONGARCH64
+// RUN: fir-test-opt --target-rewrite="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefix=I32
+// RUN: fir-test-opt --target-rewrite="target=i386-w64-windows-gnu" %s | FileCheck %s --check-prefix=I32_MINGW
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=X64
+// RUN: fir-test-opt --target-rewrite="target=x86_64-w64-windows-gnu" %s | FileCheck %s --check-prefix=X64_MINGW
+// RUN: fir-test-opt --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=AARCH64
+// RUN: fir-test-opt --target-rewrite="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefix=PPC64le
+// RUN: fir-test-opt --target-rewrite="target=sparc64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=SPARCV9
+// RUN: fir-test-opt --target-rewrite="target=sparcv9-sun-solaris2.11" %s | FileCheck %s --check-prefix=SPARCV9
+// RUN: fir-test-opt --target-rewrite="target=riscv64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=RISCV64
+// RUN: fir-test-opt --target-rewrite="target=powerpc64-ibm-aix7.2.0.0" %s | FileCheck %s --check-prefix=PPC64
+// RUN: fir-test-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=LOONGARCH64
// Test that we rewrite the signature and body of a function that returns a
// complex<4>.
diff --git a/flang/test/Fir/target-rewrite-complex16.fir b/flang/test/Fir/target-rewrite-complex16.fir
index 86a5b0051ab2ed..39485197f67a98 100644
--- a/flang/test/Fir/target-rewrite-complex16.fir
+++ b/flang/test/Fir/target-rewrite-complex16.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
-// RUN: fir-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s
// Test that we rewrite the signature and body of a func.function that returns a
// complex<16>.
diff --git a/flang/test/Fir/target-rewrite-integer-loongarch64.fir b/flang/test/Fir/target-rewrite-integer-loongarch64.fir
index 8421cbbb41a9d3..ed3eab2146eb3e 100644
--- a/flang/test/Fir/target-rewrite-integer-loongarch64.fir
+++ b/flang/test/Fir/target-rewrite-integer-loongarch64.fir
@@ -2,7 +2,7 @@
/// LoongArch64 LP64D ABI requires unsigned 32 bit integers to be sign extended.
// REQUIRES: loongarch-registered-target
-// RUN: fir-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=LOONGARCH64
+// RUN: fir-test-opt --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=LOONGARCH64
// RUN: tco -target="loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=LOONGARCH64_LLVM
// LOONGARCH64: func.func private @cfunc32(i32 {llvm.signext}) -> (i32 {llvm.signext}) attributes {fir.bindc_name = "cfunc32"}
diff --git a/flang/test/Fir/target-rewrite-integer.fir b/flang/test/Fir/target-rewrite-integer.fir
index 3be76e21a420f0..966d45a78ee6a1 100644
--- a/flang/test/Fir/target-rewrite-integer.fir
+++ b/flang/test/Fir/target-rewrite-integer.fir
@@ -1,10 +1,10 @@
-// RUN: fir-opt --split-input-file --target-rewrite="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=I32,ALL
-// RUN: fir-opt --split-input-file --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=X64,ALL
-// RUN: fir-opt --split-input-file --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=AARCH64,ALL
-// RUN: fir-opt --split-input-file --target-rewrite="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=PPC,ALL
-// RUN: fir-opt --split-input-file --target-rewrite="target=sparc64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=SPARCV9,ALL
-// RUN: fir-opt --split-input-file --target-rewrite="target=sparcv9-sun-solaris2.11" %s | FileCheck %s --check-prefixes=SPARCV9,ALL
-// RUN: fir-opt --split-input-file --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=LOONGARCH64,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=i386-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=I32,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=X64,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=aarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=AARCH64,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=powerpc64le-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=PPC,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=sparc64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=SPARCV9,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=sparcv9-sun-solaris2.11" %s | FileCheck %s --check-prefixes=SPARCV9,ALL
+// RUN: fir-test-opt --split-input-file --target-rewrite="target=loongarch64-unknown-linux-gnu" %s | FileCheck %s --check-prefixes=LOONGARCH64,ALL
// -----
diff --git a/flang/test/Fir/target-rewrite-selective-no-struct.fir b/flang/test/Fir/target-rewrite-selective-no-struct.fir
index ea3fa3319caabd..d71faa1032b867 100644
--- a/flang/test/Fir/target-rewrite-selective-no-struct.fir
+++ b/flang/test/Fir/target-rewrite-selective-no-struct.fir
@@ -1,5 +1,5 @@
// Test no-struct-conversion of target-rewrite pass.
-// RUN: fir-opt -target-rewrite="no-struct-conversion" %s | FileCheck %s
+// RUN: fir-test-opt -target-rewrite="no-struct-conversion" %s | FileCheck %s
func.func @test(%arg0: !fir.type<t{i:i32}>) {
return
diff --git a/flang/test/Fir/target-rewrite-selective.fir b/flang/test/Fir/target-rewrite-selective.fir
index bfbbafdc2e2b36..4f290c4da1f961 100644
--- a/flang/test/Fir/target-rewrite-selective.fir
+++ b/flang/test/Fir/target-rewrite-selective.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu no-complex-conversion" %s | FileCheck --check-prefix=CMPLXOFF %s
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu no-character-conversion" %s | FileCheck --check-prefix=CHAROFF %s
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu no-complex-conversion" %s | FileCheck --check-prefix=CMPLXOFF %s
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu no-character-conversion" %s | FileCheck --check-prefix=CHAROFF %s
// Verify that selective TargetRewrite with no-complex-conversion and
// no-character-conversion options works as expected.
diff --git a/flang/test/Fir/target-rewrite-target-cpu.fir b/flang/test/Fir/target-rewrite-target-cpu.fir
index 8450aaf7d15756..a3be78aabecb44 100644
--- a/flang/test/Fir/target-rewrite-target-cpu.fir
+++ b/flang/test/Fir/target-rewrite-target-cpu.fir
@@ -1,11 +1,11 @@
-// RUN: fir-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR
-// RUN: fir-opt --target-rewrite="target-cpu=gfx90a" %s | FileCheck %s --check-prefixes=ALL_MLIR,CHANGED_MLIR
+// RUN: fir-test-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR
+// RUN: fir-test-opt --target-rewrite="target-cpu=gfx90a" %s | FileCheck %s --check-prefixes=ALL_MLIR,CHANGED_MLIR
// RUN: tco %s | FileCheck %s --check-prefixes=ALL_LLVM,UNCHANGED_LLVM
// RUN: tco -target-cpu=gfx90a %s | FileCheck %s --check-prefixes=ALL_LLVM,CHANGED_LLVM
-// Check MLIR output from the 'fir-opt' tool
+// Check MLIR output from the 'fir-test-opt' tool
// ALL_MLIR: module attributes {
// ALL_MLIR-SAME: fir.target_cpu =
diff --git a/flang/test/Fir/target-rewrite-target-features.fir b/flang/test/Fir/target-rewrite-target-features.fir
index 6e6efa2678f2d0..a385bfe5d03f32 100644
--- a/flang/test/Fir/target-rewrite-target-features.fir
+++ b/flang/test/Fir/target-rewrite-target-features.fir
@@ -1,11 +1,11 @@
-// RUN: fir-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR
-// RUN: fir-opt --target-rewrite="target-features=+gfx9-insts,+wavefrontsize64" %s | FileCheck %s --check-prefixes=ALL_MLIR,CHANGED_MLIR
+// RUN: fir-test-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR
+// RUN: fir-test-opt --target-rewrite="target-features=+gfx9-insts,+wavefrontsize64" %s | FileCheck %s --check-prefixes=ALL_MLIR,CHANGED_MLIR
// RUN: tco %s | FileCheck %s --check-prefixes=ALL_LLVM,UNCHANGED_LLVM
// RUN: tco -target-features=+gfx9-insts,+wavefrontsize64 %s | FileCheck %s --check-prefixes=ALL_LLVM,CHANGED_LLVM
-// Check MLIR output from the 'fir-opt' tool
+// Check MLIR output from the 'fir-test-opt' tool
// ALL_MLIR: module attributes {
// ALL_MLIR-SAME: fir.target_features = #llvm.target_features<[
diff --git a/flang/test/Fir/target-rewrite-triple.fir b/flang/test/Fir/target-rewrite-triple.fir
index 79f9cd641ace5d..e6b88f229fe287 100644
--- a/flang/test/Fir/target-rewrite-triple.fir
+++ b/flang/test/Fir/target-rewrite-triple.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --target-rewrite %s | FileCheck %s --check-prefix=UNCHANGED
-// RUN: fir-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=CHANGED
+// RUN: fir-test-opt --target-rewrite %s | FileCheck %s --check-prefix=UNCHANGED
+// RUN: fir-test-opt --target-rewrite="target=x86_64-unknown-linux-gnu" %s | FileCheck %s --check-prefix=CHANGED
// UNCHANGED: llvm.target_triple = "aarch64-unknown-linux-gnu"
// CHANGED: llvm.target_triple = "x86_64-unknown-linux-gnu"
diff --git a/flang/test/Fir/tbaa.fir b/flang/test/Fir/tbaa.fir
index 401ebbc8c49fe6..0ad5f64e214b9b 100644
--- a/flang/test/Fir/tbaa.fir
+++ b/flang/test/Fir/tbaa.fir
@@ -1,7 +1,7 @@
// test without per-function tbaa trees so that this functionality does not bitrot
// per-function tbaa tbaa-codegen2.fir
-// RUN: fir-opt %s --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu apply-tbaa=true" --per-function-tbaa-trees=false | FileCheck %s
-// RUN: fir-opt %s --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu apply-tbaa=true" --per-function-tbaa-trees=false | FileCheck %s
+// RUN: fir-test-opt %s --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu apply-tbaa=true" --per-function-tbaa-trees=false | FileCheck %s
+// RUN: fir-test-opt %s --split-input-file --fir-to-llvm-ir="target=aarch64-unknown-linux-gnu apply-tbaa=true" --per-function-tbaa-trees=false | FileCheck %s
module {
func.func @tbaa(%arg0: !fir.class<!fir.array<?xnone>> {fir.bindc_name = "a"}) {
diff --git a/flang/test/Fir/types-to-llvm.fir b/flang/test/Fir/types-to-llvm.fir
index 80bdb6ad87c762..48e4ed8343c096 100644
--- a/flang/test/Fir/types-to-llvm.fir
+++ b/flang/test/Fir/types-to-llvm.fir
@@ -1,6 +1,6 @@
// Test FIR types conversion.
-// RUN: fir-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s | FileCheck %s
// Test sequence types `!fir.array`
diff --git a/flang/test/Fir/undo-complex-pattern.fir b/flang/test/Fir/undo-complex-pattern.fir
index 5c5f6319d48b1f..a942b0827ccd1a 100644
--- a/flang/test/Fir/undo-complex-pattern.fir
+++ b/flang/test/Fir/undo-complex-pattern.fir
@@ -1,5 +1,5 @@
// Test regrouping of + and - operations on complex components into complex operations
-// RUN: fir-opt --canonicalize %s | FileCheck %s
+// RUN: fir-test-opt --canonicalize %s | FileCheck %s
// CHECK-LABEL: @add
diff --git a/flang/test/Fir/vector-always-cfg.fir b/flang/test/Fir/vector-always-cfg.fir
index 45c2ea056a707c..4c58588c80b7d8 100644
--- a/flang/test/Fir/vector-always-cfg.fir
+++ b/flang/test/Fir/vector-always-cfg.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --fir-to-llvm-ir %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir %s | FileCheck %s
#access_group = #llvm.access_group<id = distinct[0]<>>
// CHECK: #[[ACCESS:.*]] = #llvm.access_group<id = distinct[0]<>>
diff --git a/flang/test/Fir/vector-always.fir b/flang/test/Fir/vector-always.fir
index 00eb0e7a756ee6..0e20fcfed00375 100644
--- a/flang/test/Fir/vector-always.fir
+++ b/flang/test/Fir/vector-always.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cfg-conversion %s | FileCheck %s
+// RUN: fir-test-opt --cfg-conversion %s | FileCheck %s
#access_group = #llvm.access_group<id = distinct[0]<>>
// CHECK: #[[ACCESS:.*]] = #llvm.access_group<id = distinct[0]<>>
diff --git a/flang/test/HLFIR/all-elemental.fir b/flang/test/HLFIR/all-elemental.fir
index 1ba8bb1b7a5fb4..fcc11af47d36de 100644
--- a/flang/test/HLFIR/all-elemental.fir
+++ b/flang/test/HLFIR/all-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
func.func @_QFPtest(%arg0: !fir.ref<!fir.array<4x7xi32>> {fir.bindc_name = "b"}, %arg1: !fir.ref<i32> {fir.bindc_name = "row"}, %arg2: !fir.ref<i32> {fir.bindc_name = "val"}) -> !fir.logical<4> {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/all-lowering.fir b/flang/test/HLFIR/all-lowering.fir
index df6771e565efc8..188531498e8c7d 100644
--- a/flang/test/HLFIR/all-lowering.fir
+++ b/flang/test/HLFIR/all-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.all operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
func.func @_QPall1(%arg0: !fir.box<!fir.array<?x!fir.logical<4>>> {fir.bindc_name = "a"}, %arg1: !fir.ref<!fir.logical<4>> {fir.bindc_name = "s"}) {
%0:2 = hlfir.declare %arg0 {uniq_name = "_QFall1Ea"} : (!fir.box<!fir.array<?x!fir.logical<4>>>) -> (!fir.box<!fir.array<?x!fir.logical<4>>>, !fir.box<!fir.array<?x!fir.logical<4>>>)
diff --git a/flang/test/HLFIR/all.fir b/flang/test/HLFIR/all.fir
index 00ce1b3a5fbaeb..2013de8cf9d30e 100644
--- a/flang/test/HLFIR/all.fir
+++ b/flang/test/HLFIR/all.fir
@@ -1,6 +1,6 @@
// Test hlfir.all operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// mask is an expression of known shape
func.func @all0(%arg0: !hlfir.expr<2x!fir.logical<4>>) {
diff --git a/flang/test/HLFIR/any-elemental.fir b/flang/test/HLFIR/any-elemental.fir
index a7c559679d9658..b05946baf9947a 100644
--- a/flang/test/HLFIR/any-elemental.fir
+++ b/flang/test/HLFIR/any-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
func.func @_QFPtest(%arg0: !fir.ref<!fir.array<4x7xi32>> {fir.bindc_name = "b"}, %arg1: !fir.ref<i32> {fir.bindc_name = "row"}, %arg2: !fir.ref<i32> {fir.bindc_name = "val"}) -> !fir.logical<4> {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/any-lowering.fir b/flang/test/HLFIR/any-lowering.fir
index 72fcdd37b61939..7f757b8132a075 100644
--- a/flang/test/HLFIR/any-lowering.fir
+++ b/flang/test/HLFIR/any-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.any operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// one argument ANY
func.func @_QPany1(%arg0: !fir.box<!fir.array<?x!fir.logical<4>>> {fir.bindc_name = "a"}, %arg1: !fir.ref<!fir.logical<4>> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/any.fir b/flang/test/HLFIR/any.fir
index dbea5ba478b9ae..5e83bd2017cc26 100644
--- a/flang/test/HLFIR/any.fir
+++ b/flang/test/HLFIR/any.fir
@@ -1,6 +1,6 @@
// Test hlfir.product operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// mask is an expression of known shape
func.func @any0(%arg0: !hlfir.expr<2x!fir.logical<4>>) {
diff --git a/flang/test/HLFIR/apply-codegen.fir b/flang/test/HLFIR/apply-codegen.fir
index aebe2c0e410f0d..1e915303f7728c 100644
--- a/flang/test/HLFIR/apply-codegen.fir
+++ b/flang/test/HLFIR/apply-codegen.fir
@@ -1,5 +1,5 @@
// Test hlfir.apply code generation
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @numeric_apply(%arg0 : !fir.ref<!fir.array<100xi32>>) {
%expr = hlfir.as_expr %arg0 : (!fir.ref<!fir.array<100xi32>>) -> !hlfir.expr<100xi32>
diff --git a/flang/test/HLFIR/apply.fir b/flang/test/HLFIR/apply.fir
index 6c712c3d527457..ae3adb87d023db 100644
--- a/flang/test/HLFIR/apply.fir
+++ b/flang/test/HLFIR/apply.fir
@@ -1,6 +1,6 @@
// Test hlfir.apply operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @numeric(%expr: !hlfir.expr<?x?xf32>) {
%c9 = arith.constant 9 : index
diff --git a/flang/test/HLFIR/as_expr-codegen-polymorphic.fir b/flang/test/HLFIR/as_expr-codegen-polymorphic.fir
index 30a8da72c3e486..e0ba0413d2da56 100644
--- a/flang/test/HLFIR/as_expr-codegen-polymorphic.fir
+++ b/flang/test/HLFIR/as_expr-codegen-polymorphic.fir
@@ -1,6 +1,6 @@
// Test hlfir.as_expr codegen for polymorphic expressions.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
!t = !fir.type<t{i:i32}>
func.func @as_expr_class(%arg0 : !fir.class<!t>, %arg1: !fir.ref<!t>) {
diff --git a/flang/test/HLFIR/as_expr-codegen.fir b/flang/test/HLFIR/as_expr-codegen.fir
index 7123e499e9f73c..dcc53d484ef993 100644
--- a/flang/test/HLFIR/as_expr-codegen.fir
+++ b/flang/test/HLFIR/as_expr-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.as_expr code generation
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @char_expr(%addr: !fir.ref<!fir.char<1,?>>, %len: index) {
%0:2 = hlfir.declare %addr typeparams %len {uniq_name = "c"} : (!fir.ref<!fir.char<1,?>>, index) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
diff --git a/flang/test/HLFIR/as_expr.fir b/flang/test/HLFIR/as_expr.fir
index d47059eb88886e..d65d71f5cf3298 100644
--- a/flang/test/HLFIR/as_expr.fir
+++ b/flang/test/HLFIR/as_expr.fir
@@ -1,6 +1,6 @@
// Test hlfir.as_expr operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @char_expr(%arg0: !fir.boxchar<1>) {
%0 = hlfir.as_expr %arg0 : (!fir.boxchar<1>) -> !hlfir.expr<!fir.char<1,?>>
diff --git a/flang/test/HLFIR/assign-bufferize.fir b/flang/test/HLFIR/assign-bufferize.fir
index 7c3a6088347f1e..0eef61ac1a33d9 100644
--- a/flang/test/HLFIR/assign-bufferize.fir
+++ b/flang/test/HLFIR/assign-bufferize.fir
@@ -1,7 +1,7 @@
// Test hlfir.assign rewrite in the bufferization pass.
// Assign in itself is not transformed, but its operands may be
// expressions that are bufferized and must be updated.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @keep_attributes(%arg0: !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,8>>>>>, %arg1: !fir.box<!fir.array<1x!fir.char<1,?>>>) {
%true = arith.constant true
diff --git a/flang/test/HLFIR/assign-codegen-derived.fir b/flang/test/HLFIR/assign-codegen-derived.fir
index c45c118ed46c59..a3f38377ae68b2 100644
--- a/flang/test/HLFIR/assign-codegen-derived.fir
+++ b/flang/test/HLFIR/assign-codegen-derived.fir
@@ -1,7 +1,7 @@
// Test hlfir.assign code generation to FIR of derived type requiring
// or not finalization.
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
!t_simple = !fir.type<simple{i:i32}>
fir.type_info @simple noinit nodestroy nofinal : !t_simple
diff --git a/flang/test/HLFIR/assign-codegen.fir b/flang/test/HLFIR/assign-codegen.fir
index 581d1ab0e7739c..25f78a12ac5ad2 100644
--- a/flang/test/HLFIR/assign-codegen.fir
+++ b/flang/test/HLFIR/assign-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.assign code generation to FIR
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @scalar_int(%arg0: !fir.ref<i32>, %arg1: !fir.ref<i32>) {
hlfir.assign %arg0 to %arg1 : !fir.ref<i32>, !fir.ref<i32>
diff --git a/flang/test/HLFIR/assign-side-effects.fir b/flang/test/HLFIR/assign-side-effects.fir
index dfd1c5886e4fa2..85294df24ef3ae 100644
--- a/flang/test/HLFIR/assign-side-effects.fir
+++ b/flang/test/HLFIR/assign-side-effects.fir
@@ -1,5 +1,5 @@
// Test side effects of hlfir.assign op.
-// RUN: fir-opt %s --test-side-effects --verify-diagnostics
+// RUN: fir-test-opt %s --test-side-effects --verify-diagnostics
func.func @test1(%x: !fir.ref<i32>, %i: i32) {
// expected-remark @below {{found an instance of 'write' on a op operand, on resource '<Default>'}}
diff --git a/flang/test/HLFIR/assign.fir b/flang/test/HLFIR/assign.fir
index eb02884d3b0f13..41aa57cd9bd760 100644
--- a/flang/test/HLFIR/assign.fir
+++ b/flang/test/HLFIR/assign.fir
@@ -1,6 +1,6 @@
// Test hlfir.assign operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @scalar_logical(%arg0: !fir.ref<!fir.logical<1>>, %arg1: !fir.ref<!fir.logical<1>>) {
hlfir.assign %arg1 to %arg0 : !fir.ref<!fir.logical<1>>, !fir.ref<!fir.logical<1>>
diff --git a/flang/test/HLFIR/associate-codegen.fir b/flang/test/HLFIR/associate-codegen.fir
index ad64959984a14a..c0cb1b50b23fec 100644
--- a/flang/test/HLFIR/associate-codegen.fir
+++ b/flang/test/HLFIR/associate-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.associate/hlfir.end_associate operation code generation to FIR.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @associate_int() {
%c42_i32 = arith.constant 42 : i32
diff --git a/flang/test/HLFIR/associate.fir b/flang/test/HLFIR/associate.fir
index 52563398da971b..b44f975eab84bc 100644
--- a/flang/test/HLFIR/associate.fir
+++ b/flang/test/HLFIR/associate.fir
@@ -1,7 +1,7 @@
// Test hlfir.associate and hlfir.end_associate operations parse, verify
// (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_cst_char(%arg0: !hlfir.expr<!fir.char<1,12>>) {
%c12 = arith.constant 12 : index
diff --git a/flang/test/HLFIR/bufferize-destroy-for-derived.fir b/flang/test/HLFIR/bufferize-destroy-for-derived.fir
index 618ebf80282252..0ef0c8a0597127 100644
--- a/flang/test/HLFIR/bufferize-destroy-for-derived.fir
+++ b/flang/test/HLFIR/bufferize-destroy-for-derived.fir
@@ -1,6 +1,6 @@
// Test buffer destruction for hlfir.destroy operations with
// operands of derived types.
-// RUN: fir-opt --bufferize-hlfir %s | FileCheck %s
+// RUN: fir-test-opt --bufferize-hlfir %s | FileCheck %s
func.func @_QPtest1(%arg0: !fir.box<!fir.array<?x!fir.type<_QMtypesTt1{x:!fir.box<!fir.heap<f32>>}>>> {fir.bindc_name = "x"}) {
%c0 = arith.constant 0 : index
diff --git a/flang/test/HLFIR/bufferize-end-associate-for-derived.fir b/flang/test/HLFIR/bufferize-end-associate-for-derived.fir
index aad297d0b072f8..b3e5fdb428bbe4 100644
--- a/flang/test/HLFIR/bufferize-end-associate-for-derived.fir
+++ b/flang/test/HLFIR/bufferize-end-associate-for-derived.fir
@@ -1,6 +1,6 @@
// Test buffer destruction for hlfir.end_associate operations with
// operands of derived types.
-// RUN: fir-opt --bufferize-hlfir %s | FileCheck %s
+// RUN: fir-test-opt --bufferize-hlfir %s | FileCheck %s
func.func @_QPtest1(%arg0: !fir.box<!fir.array<?x!fir.type<_QMtypesTt1{x:!fir.box<!fir.heap<f32>>}>>> {fir.bindc_name = "x"}) {
%c0 = arith.constant 0 : index
diff --git a/flang/test/HLFIR/bufferize-poly-expr.fir b/flang/test/HLFIR/bufferize-poly-expr.fir
index 49c2347b2b26d0..bd6a2d0f99a9fa 100644
--- a/flang/test/HLFIR/bufferize-poly-expr.fir
+++ b/flang/test/HLFIR/bufferize-poly-expr.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --bufferize-hlfir %s | FileCheck %s
+// RUN: fir-test-opt --bufferize-hlfir %s | FileCheck %s
func.func @test_poly_expr_without_associate() {
%5 = fir.alloca !fir.class<!fir.heap<!fir.type<_QFtestTt{c:i32}>>> {bindc_name = "r", uniq_name = "_QFtestEr"}
diff --git a/flang/test/HLFIR/bufferize-workshare.fir b/flang/test/HLFIR/bufferize-workshare.fir
index af5abb381937ec..69dc4569a9166f 100644
--- a/flang/test/HLFIR/bufferize-workshare.fir
+++ b/flang/test/HLFIR/bufferize-workshare.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --bufferize-hlfir %s | FileCheck %s
+// RUN: fir-test-opt --bufferize-hlfir %s | FileCheck %s
// CHECK-LABEL: func.func @simple(
// CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.array<42xi32>>) {
diff --git a/flang/test/HLFIR/bufferize01.fir b/flang/test/HLFIR/bufferize01.fir
index 40e2769e459c1d..869f76b632dbce 100644
--- a/flang/test/HLFIR/bufferize01.fir
+++ b/flang/test/HLFIR/bufferize01.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --bufferize-hlfir --split-input-file %s | FileCheck %s
+// RUN: fir-test-opt --bufferize-hlfir --split-input-file %s | FileCheck %s
// -----
diff --git a/flang/test/HLFIR/char_assign.fir b/flang/test/HLFIR/char_assign.fir
index 06748cdcebe6c9..2ad8939e9b4ae0 100644
--- a/flang/test/HLFIR/char_assign.fir
+++ b/flang/test/HLFIR/char_assign.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt --split-input-file %s -convert-hlfir-to-fir | FileCheck %s
// Verify that the special case of length-one character assignment
// is using valid fir.converts.
diff --git a/flang/test/HLFIR/char_extremum-bufferization.fir b/flang/test/HLFIR/char_extremum-bufferization.fir
index 4ce1471ae32717..d4f8ebcafb5172 100644
--- a/flang/test/HLFIR/char_extremum-bufferization.fir
+++ b/flang/test/HLFIR/char_extremum-bufferization.fir
@@ -1,6 +1,6 @@
// Test hlfir.concat operation lowering to operations operating on memory.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @_QPmax1(%arg0: !fir.boxchar<1> {fir.bindc_name = "c1"}, %arg1: !fir.boxchar<1> {fir.bindc_name = "c2"}, %arg2: !fir.boxchar<1> {fir.bindc_name = "c3"}) {
%0:2 = fir.unboxchar %arg0 : (!fir.boxchar<1>) -> (!fir.ref<!fir.char<1,?>>, index)
diff --git a/flang/test/HLFIR/char_extremum.fir b/flang/test/HLFIR/char_extremum.fir
index aa4b8d65898b9c..50a409140bb866 100644
--- a/flang/test/HLFIR/char_extremum.fir
+++ b/flang/test/HLFIR/char_extremum.fir
@@ -1,6 +1,6 @@
// Test hlfir.char_extremum operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// variable check
diff --git a/flang/test/HLFIR/concat-bufferization.fir b/flang/test/HLFIR/concat-bufferization.fir
index a68cc3c1ed2cac..2be3c0a7ed3ece 100644
--- a/flang/test/HLFIR/concat-bufferization.fir
+++ b/flang/test/HLFIR/concat-bufferization.fir
@@ -1,6 +1,6 @@
// Test hlfir.concat operation lowering to operations operating on memory.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @concat(%arg0: !fir.boxchar<1>, %arg1: !fir.boxchar<1>, %arg2: !fir.boxchar<1>) {
diff --git a/flang/test/HLFIR/concat.fir b/flang/test/HLFIR/concat.fir
index b4ecd2e43acfc9..1da34f9083fe44 100644
--- a/flang/test/HLFIR/concat.fir
+++ b/flang/test/HLFIR/concat.fir
@@ -1,6 +1,6 @@
// Test hlfir.concat operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @concat_var(%arg0: !fir.ref<!fir.char<1,10>>, %arg1: !fir.ref<!fir.char<1,20>>) {
%c30 = arith.constant 30 : index
diff --git a/flang/test/HLFIR/convert-assign-inside-openacc-recipe.fir b/flang/test/HLFIR/convert-assign-inside-openacc-recipe.fir
index 5a272bb95cc27c..4a169c71b6f702 100644
--- a/flang/test/HLFIR/convert-assign-inside-openacc-recipe.fir
+++ b/flang/test/HLFIR/convert-assign-inside-openacc-recipe.fir
@@ -1,6 +1,6 @@
// Check that hlfir.assign codegen is able to insert fir.alloca's inside
// the regions of the OpenACC recipe.
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
acc.reduction.recipe @reduction_add_box_heap_Uxi32 : !fir.box<!fir.heap<!fir.array<?xi32>>> reduction_operator <add> init {
^bb0(%arg0: !fir.box<!fir.heap<!fir.array<?xi32>>>):
diff --git a/flang/test/HLFIR/copy-in-out-codegen.fir b/flang/test/HLFIR/copy-in-out-codegen.fir
index f4ea36c2244e58..a19b52b08b68b3 100644
--- a/flang/test/HLFIR/copy-in-out-codegen.fir
+++ b/flang/test/HLFIR/copy-in-out-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.copy_in and hlfir.copy_out operation codegen
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @test_copy_in(%box: !fir.box<!fir.array<?xf64>>, %temp: !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>) {
%0:2 = hlfir.copy_in %box to %temp : (!fir.box<!fir.array<?xf64>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>) -> (!fir.box<!fir.array<?xf64>>, i1)
diff --git a/flang/test/HLFIR/copy-in-out.fir b/flang/test/HLFIR/copy-in-out.fir
index 2db0c89c7e44b6..1a6d789b163898 100644
--- a/flang/test/HLFIR/copy-in-out.fir
+++ b/flang/test/HLFIR/copy-in-out.fir
@@ -1,7 +1,7 @@
// Test hlfir.copy_in and hlfir.copy_out operation parse, verify (no errors),
// and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_copy_in(%box: !fir.box<!fir.array<?xf64>>, %temp: !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>, %is_present: i1) {
%0:2 = hlfir.copy_in %box to %temp : (!fir.box<!fir.array<?xf64>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?xf64>>>>) -> (!fir.box<!fir.array<?xf64>>, i1)
diff --git a/flang/test/HLFIR/count-elemental.fir b/flang/test/HLFIR/count-elemental.fir
index 0df5cc3c031ea5..4d41257a301b54 100644
--- a/flang/test/HLFIR/count-elemental.fir
+++ b/flang/test/HLFIR/count-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
func.func @_QFPtest(%arg0: !fir.ref<!fir.array<4x7xi32>> {fir.bindc_name = "b"}, %arg1: !fir.ref<i32> {fir.bindc_name = "row"}, %arg2: !fir.ref<i32> {fir.bindc_name = "val"}) -> i32 {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/count-lowering-default-int-kinds.fir b/flang/test/HLFIR/count-lowering-default-int-kinds.fir
index 4869ec688c825d..9a39ffda08f5b1 100644
--- a/flang/test/HLFIR/count-lowering-default-int-kinds.fir
+++ b/flang/test/HLFIR/count-lowering-default-int-kinds.fir
@@ -1,5 +1,5 @@
// Test hlfir.count operation lowering with different default integer kinds.
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
module attributes {fir.defaultkind = "a1c4d8i8l4r4", fir.kindmap = ""} {
func.func @test_i8(%arg0: !fir.box<!fir.array<?x?x!fir.logical<4>>> {fir.bindc_name = "x"}, %arg1: i64) -> !hlfir.expr<?xi64> {
diff --git a/flang/test/HLFIR/count-lowering.fir b/flang/test/HLFIR/count-lowering.fir
index a314b507d048c9..fb64c958ccae2b 100644
--- a/flang/test/HLFIR/count-lowering.fir
+++ b/flang/test/HLFIR/count-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.count operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
func.func @_QPcount1(%arg0: !fir.box<!fir.array<?x!fir.logical<4>>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "s"}) {
%0:2 = hlfir.declare %arg0 {uniq_name = "_QFcount1Ea"} : (!fir.box<!fir.array<?x!fir.logical<4>>>) -> (!fir.box<!fir.array<?x!fir.logical<4>>>, !fir.box<!fir.array<?x!fir.logical<4>>>)
diff --git a/flang/test/HLFIR/count.fir b/flang/test/HLFIR/count.fir
index c25f9b94124af8..351f4cb66cf9ae 100644
--- a/flang/test/HLFIR/count.fir
+++ b/flang/test/HLFIR/count.fir
@@ -1,6 +1,6 @@
// Test hlfir.count operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// mask is an expression of known shape
func.func @count0(%arg0: !hlfir.expr<2x!fir.logical<4>>) {
diff --git a/flang/test/HLFIR/cshift-lowering.fir b/flang/test/HLFIR/cshift-lowering.fir
index 44408d785f6825..55665d1558910d 100644
--- a/flang/test/HLFIR/cshift-lowering.fir
+++ b/flang/test/HLFIR/cshift-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.cshift operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// 1d boxed vector shift by scalar
func.func @cshift1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "sh"}) {
diff --git a/flang/test/HLFIR/declare-codegen.fir b/flang/test/HLFIR/declare-codegen.fir
index bd0d61a2559dbd..ea8630d7d53298 100644
--- a/flang/test/HLFIR/declare-codegen.fir
+++ b/flang/test/HLFIR/declare-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.declare operation code generation to FIR
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @numeric_declare(%arg0: !fir.ref<f32>) {
%0:2 = hlfir.declare %arg0 {uniq_name = "x"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
diff --git a/flang/test/HLFIR/declare.fir b/flang/test/HLFIR/declare.fir
index 3da3c195346670..805b1938b10ddf 100644
--- a/flang/test/HLFIR/declare.fir
+++ b/flang/test/HLFIR/declare.fir
@@ -1,6 +1,6 @@
// Test hlfir.declare operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @numeric_declare(%arg0: !fir.ref<f32>) {
%0:2 = hlfir.declare %arg0 {uniq_name = "x"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
diff --git a/flang/test/HLFIR/designate-codegen-complex-part.fir b/flang/test/HLFIR/designate-codegen-complex-part.fir
index 6f36cf4f4c4aeb..8e0d6a3075aa77 100644
--- a/flang/test/HLFIR/designate-codegen-complex-part.fir
+++ b/flang/test/HLFIR/designate-codegen-complex-part.fir
@@ -1,6 +1,6 @@
// Test code generation to FIR of hlfir.designate operations
// with complex parts.
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @test_set_scalar(%arg0: !fir.ref<complex<f32>>, %arg1: !fir.ref<f32>) {
%0:2 = hlfir.declare %arg0 {uniq_name = "a"} : (!fir.ref<complex<f32>>) -> (!fir.ref<complex<f32>>, !fir.ref<complex<f32>>)
diff --git a/flang/test/HLFIR/designate-codegen-component-refs.fir b/flang/test/HLFIR/designate-codegen-component-refs.fir
index 0e9d81f5cff8bc..d04e4dcd1bbae8 100644
--- a/flang/test/HLFIR/designate-codegen-component-refs.fir
+++ b/flang/test/HLFIR/designate-codegen-component-refs.fir
@@ -1,6 +1,6 @@
// Test code generation to FIR of hlfir.designate operations
// with component reference.
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @test_scalar(%arg0: !fir.ref<!fir.type<t1{scalar_i:i32,scalar_x:f32}>>) {
%0:2 = hlfir.declare %arg0 {uniq_name = "a"} : (!fir.ref<!fir.type<t1{scalar_i:i32,scalar_x:f32}>>) -> (!fir.ref<!fir.type<t1{scalar_i:i32,scalar_x:f32}>>, !fir.ref<!fir.type<t1{scalar_i:i32,scalar_x:f32}>>)
diff --git a/flang/test/HLFIR/designate-codegen.fir b/flang/test/HLFIR/designate-codegen.fir
index da0a1f82b516ea..4981ed1110672e 100644
--- a/flang/test/HLFIR/designate-codegen.fir
+++ b/flang/test/HLFIR/designate-codegen.fir
@@ -1,6 +1,6 @@
// Test code generation to FIR of hlfir.designate operations
// without component reference.
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @array_ref(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.ref<i64>) {
%0:2 = hlfir.declare %arg1 {uniq_name = "n"} : (!fir.ref<i64>) -> (!fir.ref<i64>, !fir.ref<i64>)
diff --git a/flang/test/HLFIR/designate.fir b/flang/test/HLFIR/designate.fir
index e477cab6cfa903..ee7674f3376d35 100644
--- a/flang/test/HLFIR/designate.fir
+++ b/flang/test/HLFIR/designate.fir
@@ -1,6 +1,6 @@
// Test hlfir.designate operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array(1)
func.func @array_ref(%arg0 : !fir.ref<!fir.array<10xi32>>) {
diff --git a/flang/test/HLFIR/destroy-codegen.fir b/flang/test/HLFIR/destroy-codegen.fir
index 76ecc351e97b84..7528c0875b4dcb 100644
--- a/flang/test/HLFIR/destroy-codegen.fir
+++ b/flang/test/HLFIR/destroy-codegen.fir
@@ -1,7 +1,7 @@
// Test hlfir.destroy code generation and hlfir.yield_element "implicit
// hlfir.destroy" aspect.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @test_move_with_cleanup(%arg0 : !fir.ref<!fir.array<100xi32>>) {
%must_free = arith.constant true
diff --git a/flang/test/HLFIR/destroy.fir b/flang/test/HLFIR/destroy.fir
index 5a2f7bfa55e1b1..13d02914a7e957 100644
--- a/flang/test/HLFIR/destroy.fir
+++ b/flang/test/HLFIR/destroy.fir
@@ -1,6 +1,6 @@
// Test hlfir.destroy operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test(%expr : !hlfir.expr<?x?xf64>) {
hlfir.destroy %expr : !hlfir.expr<?x?xf64>
diff --git a/flang/test/HLFIR/dot_product-lowering.fir b/flang/test/HLFIR/dot_product-lowering.fir
index 64d65665433f15..03445f8f2dee96 100644
--- a/flang/test/HLFIR/dot_product-lowering.fir
+++ b/flang/test/HLFIR/dot_product-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.matmul operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
func.func @_QPdot_product1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "lhs"}, %arg1: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "rhs"}, %arg2: !fir.ref<i32> {fir.bindc_name = "res"}) {
%0:2 = hlfir.declare %arg0 {uniq_name = "_QFdot_product1Elhs"} : (!fir.box<!fir.array<?xi32>>) -> (!fir.box<!fir.array<?xi32>>, !fir.box<!fir.array<?xi32>>)
diff --git a/flang/test/HLFIR/dot_product.fir b/flang/test/HLFIR/dot_product.fir
index 78b293eeff5c83..2a5211ad30f7ee 100644
--- a/flang/test/HLFIR/dot_product.fir
+++ b/flang/test/HLFIR/dot_product.fir
@@ -1,6 +1,6 @@
// Test hlfir.dot_product operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// arguments are expressions of known shape
func.func @dot_product0(%arg0: !hlfir.expr<2xi32>, %arg1: !hlfir.expr<2xi32>) {
diff --git a/flang/test/HLFIR/dummy_scope.fir b/flang/test/HLFIR/dummy_scope.fir
index 6b5c61e21f1d1c..ea494e8c8ea7bb 100644
--- a/flang/test/HLFIR/dummy_scope.fir
+++ b/flang/test/HLFIR/dummy_scope.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt %s | fir-opt | FileCheck %s
-// RUN: fir-opt %s | fir-opt -cse | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt -cse | FileCheck %s
// CHECK-LABEL: func.func @dummy_scope(
// CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<f32>) {
diff --git a/flang/test/HLFIR/element-addr.fir b/flang/test/HLFIR/element-addr.fir
index c3c48edd9b5639..b65f035f9e9513 100644
--- a/flang/test/HLFIR/element-addr.fir
+++ b/flang/test/HLFIR/element-addr.fir
@@ -1,5 +1,5 @@
// Test hlfir.element_addr operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_element_addr(%x: !fir.ref<!fir.array<100xf32>>, %vector: !fir.ref<!fir.array<20xi32>>, %y: !fir.ref<!fir.array<20xf32>>) {
%c20 = arith.constant 20 : index
diff --git a/flang/test/HLFIR/element-codegen-issue-118922.fir b/flang/test/HLFIR/element-codegen-issue-118922.fir
index 8fc0aa92a6b355..334b2d8a1a7124 100644
--- a/flang/test/HLFIR/element-codegen-issue-118922.fir
+++ b/flang/test/HLFIR/element-codegen-issue-118922.fir
@@ -1,6 +1,6 @@
// Test issue 113843 and 118922 fix: do not elide hlfir.elemental final as_expr
// copy if this is not the last operation.
-// RUN: fir-opt %s --bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s --bufferize-hlfir | FileCheck %s
func.func @_QMmPbug(%val: !fir.char<1>, %var: !fir.ref<!fir.array<10x!fir.char<1>>>) {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/elemental-codegen-nested.fir b/flang/test/HLFIR/elemental-codegen-nested.fir
index 3ef296249c7d64..3fd757fc9d37ec 100644
--- a/flang/test/HLFIR/elemental-codegen-nested.fir
+++ b/flang/test/HLFIR/elemental-codegen-nested.fir
@@ -1,5 +1,5 @@
// Test nested hlfir.elemental code generation
-// RUN: fir-opt %s --bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s --bufferize-hlfir | FileCheck %s
// CHECK-LABEL: func.func @_QPtest(
// CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<f32> {fir.bindc_name = "pi"},
diff --git a/flang/test/HLFIR/elemental-codegen.fir b/flang/test/HLFIR/elemental-codegen.fir
index 2443217f557f8b..a12a4b14e3ec01 100644
--- a/flang/test/HLFIR/elemental-codegen.fir
+++ b/flang/test/HLFIR/elemental-codegen.fir
@@ -1,5 +1,5 @@
// Test hlfir.elemental code generation
-// RUN: fir-opt %s --bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s --bufferize-hlfir | FileCheck %s
func.func @numeric_type(%arg0: !fir.ref<!fir.array<10x20xi32>>, %arg1: !fir.ref<!fir.array<10x20xi32>>) {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/elemental-cse.fir b/flang/test/HLFIR/elemental-cse.fir
index 62e1a94ebf5c7f..dd5ca88184da5e 100644
--- a/flang/test/HLFIR/elemental-cse.fir
+++ b/flang/test/HLFIR/elemental-cse.fir
@@ -1,5 +1,5 @@
// Test CSE for hlfir.elemental.
-// RUN: fir-opt %s --cse | FileCheck %s
+// RUN: fir-test-opt %s --cse | FileCheck %s
// Check that the CSE does not optimize the hlfir.elemental
// without handling the associated hlfir.destroy's, otherwise,
diff --git a/flang/test/HLFIR/elemental-shallow-copy.fir b/flang/test/HLFIR/elemental-shallow-copy.fir
index c57a2766e318de..f93312237e26dd 100644
--- a/flang/test/HLFIR/elemental-shallow-copy.fir
+++ b/flang/test/HLFIR/elemental-shallow-copy.fir
@@ -1,6 +1,6 @@
// Check that an elemental result of a derived type with an allocatable
// component is shallow-copied into the array result.
-// RUN: fir-opt %s --bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s --bufferize-hlfir | FileCheck %s
func.func @_QMtypesPtest() {
%false = arith.constant false
diff --git a/flang/test/HLFIR/elemental.fir b/flang/test/HLFIR/elemental.fir
index 174c39b99b3721..60c9ec5725ef45 100644
--- a/flang/test/HLFIR/elemental.fir
+++ b/flang/test/HLFIR/elemental.fir
@@ -1,7 +1,7 @@
// Test hlfir.elemental and hlfir.yield_element operation parse, verify
// (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @numeric_type(%x: !fir.ref<!fir.array<10x20xi32>>, %y: !fir.ref<!fir.array<10x20xi32>>) {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/elsewhere.fir b/flang/test/HLFIR/elsewhere.fir
index b0033a6dc5b4f5..a513358cf4c086 100644
--- a/flang/test/HLFIR/elsewhere.fir
+++ b/flang/test/HLFIR/elsewhere.fir
@@ -1,5 +1,5 @@
// Test hlfir.elsewhere operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_elsewhere(%mask: !fir.ref<!fir.array<10x!fir.logical<4>>>, %x: !fir.ref<!fir.array<10xf32>>, %y: !fir.box<!fir.array<?xf32>>) {
hlfir.where {
diff --git a/flang/test/HLFIR/eval_in_mem-codegen.fir b/flang/test/HLFIR/eval_in_mem-codegen.fir
index 26a989832ca927..e124024e0f6a5e 100644
--- a/flang/test/HLFIR/eval_in_mem-codegen.fir
+++ b/flang/test/HLFIR/eval_in_mem-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.eval_in_mem default code generation.
-// RUN: fir-opt %s --bufferize-hlfir -o - | FileCheck %s
+// RUN: fir-test-opt %s --bufferize-hlfir -o - | FileCheck %s
func.func @_QPtest() {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/eval_in_mem.fir b/flang/test/HLFIR/eval_in_mem.fir
index 34e48ed5be5452..cc34b964972e57 100644
--- a/flang/test/HLFIR/eval_in_mem.fir
+++ b/flang/test/HLFIR/eval_in_mem.fir
@@ -1,6 +1,6 @@
// Test hlfir.eval_in_mem operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @_QPtest() {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/expr-type.fir b/flang/test/HLFIR/expr-type.fir
index 835959ce54643a..bfe791b17a5424 100644
--- a/flang/test/HLFIR/expr-type.fir
+++ b/flang/test/HLFIR/expr-type.fir
@@ -1,6 +1,6 @@
// Test the HLFIR Expr type
// Parse types and check that we can reparse what we print.
-// RUN: fir-opt --split-input-file %s | fir-opt --split-input-file | FileCheck %s
+// RUN: fir-test-opt --split-input-file %s | fir-test-opt --split-input-file | FileCheck %s
// Scalar expression types
func.func private @scalar01() -> !hlfir.expr<!fir.char<1,?>>
diff --git a/flang/test/HLFIR/extents-of-shape-of.f90 b/flang/test/HLFIR/extents-of-shape-of.f90
index 1168004597d191..3f576aed7cd806 100644
--- a/flang/test/HLFIR/extents-of-shape-of.f90
+++ b/flang/test/HLFIR/extents-of-shape-of.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir %s -o - | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-HLFIR %s
-! RUN: bbc -emit-hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | fir-opt --bufferize-hlfir | fir-opt --convert-hlfir-to-fir | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-FIR %s
+! RUN: bbc -emit-hlfir %s -o - | fir-test-opt --lower-hlfir-intrinsics | fir-test-opt --bufferize-hlfir | fir-test-opt --convert-hlfir-to-fir | FileCheck --check-prefix CHECK-ALL --check-prefix CHECK-FIR %s
subroutine foo(a, b)
real :: a(2, 2), b(:, :)
interface
diff --git a/flang/test/HLFIR/forall-index.fir b/flang/test/HLFIR/forall-index.fir
index 814d845ef8ea68..b8f15efa1e7cb3 100644
--- a/flang/test/HLFIR/forall-index.fir
+++ b/flang/test/HLFIR/forall-index.fir
@@ -1,7 +1,7 @@
// Test hlfir.forall_index operation parse, verify (no errors), unparse,
// and canonicalization.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
-// RUN: fir-opt -canonicalize %s | FileCheck %s --check-prefix=CANONICALIZATION
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
+// RUN: fir-test-opt -canonicalize %s | FileCheck %s --check-prefix=CANONICALIZATION
func.func @forall_index(%x: !fir.ref<!fir.array<10xf32>>, %y: !fir.ref<!fir.array<10xf32>>) {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/forall.fir b/flang/test/HLFIR/forall.fir
index 2ae91deafcacde..8ae06f2ca9f2d7 100644
--- a/flang/test/HLFIR/forall.fir
+++ b/flang/test/HLFIR/forall.fir
@@ -1,5 +1,5 @@
// Test hlfir.forall operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @forall_test(%x: !fir.box<!fir.array<?xf32>>, %x2: !fir.box<!fir.array<?x?xf32>>) {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/forall_mask.fir b/flang/test/HLFIR/forall_mask.fir
index b0ca270084e386..e72a137c518d4c 100644
--- a/flang/test/HLFIR/forall_mask.fir
+++ b/flang/test/HLFIR/forall_mask.fir
@@ -1,5 +1,5 @@
// Test hlfir.forall_mask operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @forall_mask_test(%x: !fir.box<!fir.array<?xf32>>) {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/get_length.fir b/flang/test/HLFIR/get_length.fir
index e9e69391c12239..6b60779dff64e7 100644
--- a/flang/test/HLFIR/get_length.fir
+++ b/flang/test/HLFIR/get_length.fir
@@ -1,9 +1,9 @@
// Test hlfir.get_length operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s --check-prefix CHECK --check-prefix CHECK-ALL
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s --check-prefix CHECK --check-prefix CHECK-ALL
// Test canonicalization.
-// RUN: fir-opt %s --canonicalize | FileCheck %s --check-prefix CHECK-CANON --check-prefix CHECK-ALL
+// RUN: fir-test-opt %s --canonicalize | FileCheck %s --check-prefix CHECK-CANON --check-prefix CHECK-ALL
func.func @fixed_len_scalar(%arg0: !hlfir.expr<!fir.char<1,10>>) -> index {
%1 = hlfir.get_length %arg0 : (!hlfir.expr<!fir.char<1,10>>) -> index
diff --git a/flang/test/HLFIR/get_length_codegen.fir b/flang/test/HLFIR/get_length_codegen.fir
index 7cb36d2cd3c6c7..249d0e5c5c06d9 100644
--- a/flang/test/HLFIR/get_length_codegen.fir
+++ b/flang/test/HLFIR/get_length_codegen.fir
@@ -1,5 +1,5 @@
// Test hlfir.get_length code generation
-// RUN: fir-opt %s --bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s --bufferize-hlfir | FileCheck %s
func.func @_QPtest_char_get_length(%arg0: !fir.boxchar<1> {fir.bindc_name = "ch"}) -> index {
%c3 = arith.constant 3 : index
diff --git a/flang/test/HLFIR/getextent.fir b/flang/test/HLFIR/getextent.fir
index 3c50d1a64796cc..165bce87e2c179 100644
--- a/flang/test/HLFIR/getextent.fir
+++ b/flang/test/HLFIR/getextent.fir
@@ -1,5 +1,5 @@
// Test hlfir.get_extent operaiton parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @getextent(%arg0: !fir.shape<3>) {
%0 = hlfir.get_extent %arg0 {dim = 0 : index} : (!fir.shape<3>) -> index
diff --git a/flang/test/HLFIR/inline-elemental.fir b/flang/test/HLFIR/inline-elemental.fir
index 2d3beace4c7591..b56c9ccfce6a5c 100644
--- a/flang/test/HLFIR/inline-elemental.fir
+++ b/flang/test/HLFIR/inline-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --inline-elementals %s | FileCheck %s
+// RUN: fir-test-opt --inline-elementals %s | FileCheck %s
// check inlining one elemental into another
// a = b * c + d
diff --git a/flang/test/HLFIR/inline-hlfir-assign.fir b/flang/test/HLFIR/inline-hlfir-assign.fir
index f834e7971e3d50..a426805d181b3c 100644
--- a/flang/test/HLFIR/inline-hlfir-assign.fir
+++ b/flang/test/HLFIR/inline-hlfir-assign.fir
@@ -1,5 +1,5 @@
// Test inlining of hlfir.assign of arrays:
-// RUN: fir-opt --inline-hlfir-assign %s | FileCheck %s
+// RUN: fir-test-opt --inline-hlfir-assign %s | FileCheck %s
// The two assigns come from the following source forms:
// y(:,:) = x(:,:)
diff --git a/flang/test/HLFIR/invalid.fir b/flang/test/HLFIR/invalid.fir
index b35bec4b2a8999..6ffa1eb28978c3 100644
--- a/flang/test/HLFIR/invalid.fir
+++ b/flang/test/HLFIR/invalid.fir
@@ -1,6 +1,6 @@
// HLFIR ops diagnotic tests
-// RUN: fir-opt -strict-intrinsic-verifier -split-input-file -verify-diagnostics %s
+// RUN: fir-test-opt -strict-intrinsic-verifier -split-input-file -verify-diagnostics %s
func.func @bad_declare(%arg0: !fir.ref<f32>) {
// expected-error at +1 {{'hlfir.declare' op first result type is inconsistent with variable properties: expected '!fir.ref<f32>'}}
diff --git a/flang/test/HLFIR/matmul-lowering.fir b/flang/test/HLFIR/matmul-lowering.fir
index 51a859401bf4aa..ea4f3a13d0568d 100644
--- a/flang/test/HLFIR/matmul-lowering.fir
+++ b/flang/test/HLFIR/matmul-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.matmul operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
func.func @_QPmatmul1(%arg0: !fir.box<!fir.array<?x?xi32>> {fir.bindc_name = "lhs"}, %arg1: !fir.box<!fir.array<?x?xi32>> {fir.bindc_name = "rhs"}, %arg2: !fir.box<!fir.array<?x?xi32>> {fir.bindc_name = "res"}) {
%0:2 = hlfir.declare %arg0 {uniq_name = "_QFmatmul1Elhs"} : (!fir.box<!fir.array<?x?xi32>>) -> (!fir.box<!fir.array<?x?xi32>>, !fir.box<!fir.array<?x?xi32>>)
diff --git a/flang/test/HLFIR/matmul.fir b/flang/test/HLFIR/matmul.fir
index eaf85c39697372..d40e63af1f346f 100644
--- a/flang/test/HLFIR/matmul.fir
+++ b/flang/test/HLFIR/matmul.fir
@@ -1,6 +1,6 @@
// Test hlfir.matmul operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// arguments are expressions of known shape
func.func @matmul0(%arg0: !hlfir.expr<2x2xi32>, %arg1: !hlfir.expr<2x2xi32>) {
diff --git a/flang/test/HLFIR/matmul_transpose.fir b/flang/test/HLFIR/matmul_transpose.fir
index 967edecb463b2c..ab72c1d3c092b3 100644
--- a/flang/test/HLFIR/matmul_transpose.fir
+++ b/flang/test/HLFIR/matmul_transpose.fir
@@ -1,6 +1,6 @@
// Test hlfir.matmul_transpose operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// arguments are expressions of known shape
func.func @matmul_transpose0(%arg0: !hlfir.expr<2x2xi32>, %arg1: !hlfir.expr<2x2xi32>) {
diff --git a/flang/test/HLFIR/maxloc-elemental.fir b/flang/test/HLFIR/maxloc-elemental.fir
index c9210a59f03404..50db0002a163ac 100644
--- a/flang/test/HLFIR/maxloc-elemental.fir
+++ b/flang/test/HLFIR/maxloc-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
func.func @_QPtest(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "array"}, %arg1: !fir.ref<i32> {fir.bindc_name = "val"}, %arg2: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "m"}) {
%c0 = arith.constant 0 : index
diff --git a/flang/test/HLFIR/maxloc-lowering.fir b/flang/test/HLFIR/maxloc-lowering.fir
index be52627564c497..df416960595b88 100644
--- a/flang/test/HLFIR/maxloc-lowering.fir
+++ b/flang/test/HLFIR/maxloc-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.maxloc operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// simple one argument maxloc
func.func @_QPmaxloc1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/maxloc.fir b/flang/test/HLFIR/maxloc.fir
index 7325644d7e8cd9..d1ecb3232dab09 100644
--- a/flang/test/HLFIR/maxloc.fir
+++ b/flang/test/HLFIR/maxloc.fir
@@ -1,6 +1,6 @@
// Test hlfir.maxloc operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array is an expression of known shape
func.func @maxloc0(%arg0: !hlfir.expr<42xi32>) {
diff --git a/flang/test/HLFIR/maxval-elemental.fir b/flang/test/HLFIR/maxval-elemental.fir
index aa642253b08323..97d1be87ff94b6 100644
--- a/flang/test/HLFIR/maxval-elemental.fir
+++ b/flang/test/HLFIR/maxval-elemental.fir
@@ -1,5 +1,5 @@
// Test maxval inlining for both elemental and designate
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
// subroutine test(array)
// integer :: array(:), x
diff --git a/flang/test/HLFIR/maxval-lowering.fir b/flang/test/HLFIR/maxval-lowering.fir
index 7e025c41c6aeb5..40a6d373af2ea7 100644
--- a/flang/test/HLFIR/maxval-lowering.fir
+++ b/flang/test/HLFIR/maxval-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.maxval operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// simple one argument maxval
func.func @_QPmaxval1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/maxval.fir b/flang/test/HLFIR/maxval.fir
index 01252d390f201a..867541acc2f919 100644
--- a/flang/test/HLFIR/maxval.fir
+++ b/flang/test/HLFIR/maxval.fir
@@ -1,6 +1,6 @@
// Test hlfir.maxval operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array is an expression of known shape
func.func @maxval0(%arg0: !hlfir.expr<42xi32>) {
diff --git a/flang/test/HLFIR/memory-effects.fir b/flang/test/HLFIR/memory-effects.fir
index cac887ebe67dec..1543987bdcdf2f 100644
--- a/flang/test/HLFIR/memory-effects.fir
+++ b/flang/test/HLFIR/memory-effects.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s --test-side-effects --verify-diagnostics
+// RUN: fir-test-opt %s --test-side-effects --verify-diagnostics
func.func @concat(%arg0: !fir.ref<!fir.char<1,10>>, %arg1: !fir.ref<!fir.char<1, 20>>) {
// expected-remark at +1 {{operation has no memory effects}}
diff --git a/flang/test/HLFIR/minloc-elemental.fir b/flang/test/HLFIR/minloc-elemental.fir
index 9453a335b4fbf1..9be86a055f6f4c 100644
--- a/flang/test/HLFIR/minloc-elemental.fir
+++ b/flang/test/HLFIR/minloc-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
func.func @_QPtest(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "array"}, %arg1: !fir.ref<i32> {fir.bindc_name = "val"}, %arg2: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "m"}) {
%c0 = arith.constant 0 : index
diff --git a/flang/test/HLFIR/minloc-lowering.fir b/flang/test/HLFIR/minloc-lowering.fir
index 76d788812e24c9..80a10d96fc50e7 100644
--- a/flang/test/HLFIR/minloc-lowering.fir
+++ b/flang/test/HLFIR/minloc-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.minloc operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// simple one argument minloc
func.func @_QPminloc1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/minloc.fir b/flang/test/HLFIR/minloc.fir
index 9afb45f5bc198c..630692970d5378 100644
--- a/flang/test/HLFIR/minloc.fir
+++ b/flang/test/HLFIR/minloc.fir
@@ -1,6 +1,6 @@
// Test hlfir.minloc operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array is an expression of known shape
func.func @minloc0(%arg0: !hlfir.expr<42xi32>) {
diff --git a/flang/test/HLFIR/minval-elemental.fir b/flang/test/HLFIR/minval-elemental.fir
index 8da1b1bdf515b9..8e880f74d8dae6 100644
--- a/flang/test/HLFIR/minval-elemental.fir
+++ b/flang/test/HLFIR/minval-elemental.fir
@@ -1,5 +1,5 @@
// Test maxval inlining for both elemental and designate
-// RUN: fir-opt %s -opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s -opt-bufferization | FileCheck %s
// subroutine test(array)
// integer :: array(:), x
diff --git a/flang/test/HLFIR/minval-lowering.fir b/flang/test/HLFIR/minval-lowering.fir
index c9c78e3b2e4468..80839e8d5471ba 100644
--- a/flang/test/HLFIR/minval-lowering.fir
+++ b/flang/test/HLFIR/minval-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.minval operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// simple one argument minval
func.func @_QPminval1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/minval.fir b/flang/test/HLFIR/minval.fir
index 368cfd9660baa1..3215e7fc606d95 100644
--- a/flang/test/HLFIR/minval.fir
+++ b/flang/test/HLFIR/minval.fir
@@ -1,6 +1,6 @@
// Test hlfir.minval operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array is an expression of known shape
func.func @minval0(%arg0: !hlfir.expr<42xi32>) {
diff --git a/flang/test/HLFIR/mul_transpose.f90 b/flang/test/HLFIR/mul_transpose.f90
index 98a9c11e4b9c13..bd6b380272eb35 100644
--- a/flang/test/HLFIR/mul_transpose.f90
+++ b/flang/test/HLFIR/mul_transpose.f90
@@ -1,8 +1,8 @@
! RUN: bbc -emit-hlfir %s -o - | FileCheck --check-prefix CHECK-BASE --check-prefix CHECK-ALL %s
-! RUN: bbc -emit-hlfir %s -o - | fir-opt --canonicalize | FileCheck --check-prefix CHECK-CANONICAL --check-prefix CHECK-ALL %s
-! RUN: bbc -emit-hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING --check-prefix CHECK-ALL %s
-! RUN: bbc -emit-hlfir %s -o - | fir-opt --canonicalize | fir-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING-OPT --check-prefix CHECK-ALL %s
-! RUN: bbc -emit-hlfir %s -o - | fir-opt --lower-hlfir-intrinsics | fir-opt --bufferize-hlfir | FileCheck --check-prefix CHECK-BUFFERING --check-prefix CHECK-ALL %s
+! RUN: bbc -emit-hlfir %s -o - | fir-test-opt --canonicalize | FileCheck --check-prefix CHECK-CANONICAL --check-prefix CHECK-ALL %s
+! RUN: bbc -emit-hlfir %s -o - | fir-test-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING --check-prefix CHECK-ALL %s
+! RUN: bbc -emit-hlfir %s -o - | fir-test-opt --canonicalize | fir-test-opt --lower-hlfir-intrinsics | FileCheck --check-prefix CHECK-LOWERING-OPT --check-prefix CHECK-ALL %s
+! RUN: bbc -emit-hlfir %s -o - | fir-test-opt --lower-hlfir-intrinsics | fir-test-opt --bufferize-hlfir | FileCheck --check-prefix CHECK-BUFFERING --check-prefix CHECK-ALL %s
! Test passing a hlfir.expr from one intrinsic to another
subroutine mul_transpose(a, b, res)
diff --git a/flang/test/HLFIR/no_reassoc-codegen.fir b/flang/test/HLFIR/no_reassoc-codegen.fir
index f5686863b331cc..a8f21969e1ea1f 100644
--- a/flang/test/HLFIR/no_reassoc-codegen.fir
+++ b/flang/test/HLFIR/no_reassoc-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.noreassoc code generation to FIR.
-// RUN: fir-opt %s -bufferize-hlfir -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir -convert-hlfir-to-fir | FileCheck %s
func.func @no_reassoc_expr(%addr: !fir.ref<!fir.char<1,?>>, %len: index) {
%0:2 = hlfir.declare %addr typeparams %len {uniq_name = "c"} : (!fir.ref<!fir.char<1,?>>, index) -> (!fir.boxchar<1>, !fir.ref<!fir.char<1,?>>)
diff --git a/flang/test/HLFIR/no_reassoc.fir b/flang/test/HLFIR/no_reassoc.fir
index b30119b9d61803..b46a080506b2ea 100644
--- a/flang/test/HLFIR/no_reassoc.fir
+++ b/flang/test/HLFIR/no_reassoc.fir
@@ -1,6 +1,6 @@
// Test hlfir.no_reassoc operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @no_reassoc_value(%arg0: i32) {
%0 = hlfir.no_reassoc %arg0 : i32
diff --git a/flang/test/HLFIR/null-codegen.fir b/flang/test/HLFIR/null-codegen.fir
index 4568c45e922708..d0ecd40d46de87 100644
--- a/flang/test/HLFIR/null-codegen.fir
+++ b/flang/test/HLFIR/null-codegen.fir
@@ -1,6 +1,6 @@
// Test hlfir.null code generation to FIR
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @test() {
// CHECK: fir.zero_bits !fir.ref<none>
diff --git a/flang/test/HLFIR/null.fir b/flang/test/HLFIR/null.fir
index 4614f2bc25e5d0..6c6aaa854370a8 100644
--- a/flang/test/HLFIR/null.fir
+++ b/flang/test/HLFIR/null.fir
@@ -1,6 +1,6 @@
// Test hlfir.null operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test() {
// CHECK: hlfir.null !fir.ref<none>
diff --git a/flang/test/HLFIR/opt-array-slice-assign.fir b/flang/test/HLFIR/opt-array-slice-assign.fir
index 3db47b1da8cd33..729472e26c6e10 100644
--- a/flang/test/HLFIR/opt-array-slice-assign.fir
+++ b/flang/test/HLFIR/opt-array-slice-assign.fir
@@ -5,7 +5,7 @@
// or completely disjoint. In case they are identical, we still
// need to make sure that the one-based indices are used
// uniformly for both LHS and RHS.
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
func.func @_QPtest1(%arg0: !fir.ref<!fir.array<8000x120x3xf32>> {fir.bindc_name = "x"}) {
%c7998 = arith.constant 7998 : index
diff --git a/flang/test/HLFIR/opt-bufferization-eval_in_mem.fir b/flang/test/HLFIR/opt-bufferization-eval_in_mem.fir
index ce669073dbb1b5..8b890ef50b13b6 100644
--- a/flang/test/HLFIR/opt-bufferization-eval_in_mem.fir
+++ b/flang/test/HLFIR/opt-bufferization-eval_in_mem.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
// Fortran F2023 15.5.2.14 point 4. ensures that _QPfoo cannot access _QFtestEx
// and the temporary storage for the result can be avoided.
diff --git a/flang/test/HLFIR/opt-bufferization-leslie3d.fir b/flang/test/HLFIR/opt-bufferization-leslie3d.fir
index 351b3754cf4dbb..ce794e48c06731 100644
--- a/flang/test/HLFIR/opt-bufferization-leslie3d.fir
+++ b/flang/test/HLFIR/opt-bufferization-leslie3d.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
// leslie3d case with two allocatable module variables
// that cannot alias:
diff --git a/flang/test/HLFIR/opt-bufferization-non-realloc-assignment.fir b/flang/test/HLFIR/opt-bufferization-non-realloc-assignment.fir
index cc65dec01cc3cb..a37a395df43fdf 100644
--- a/flang/test/HLFIR/opt-bufferization-non-realloc-assignment.fir
+++ b/flang/test/HLFIR/opt-bufferization-non-realloc-assignment.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
// Verify that the shape match is not required for optimizing
// elemental assignment, when lhs not an allocatable.
diff --git a/flang/test/HLFIR/opt-bufferization-same-ptr-elemental.fir b/flang/test/HLFIR/opt-bufferization-same-ptr-elemental.fir
index ae91930d44eb12..3360fff64511ba 100644
--- a/flang/test/HLFIR/opt-bufferization-same-ptr-elemental.fir
+++ b/flang/test/HLFIR/opt-bufferization-same-ptr-elemental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
// Verify that the hlfir.assign of hlfir.elemental is optimized
// into element-per-element assignment:
diff --git a/flang/test/HLFIR/opt-bufferization.fir b/flang/test/HLFIR/opt-bufferization.fir
index faa8f4bcdb7789..b89e7786a4c745 100644
--- a/flang/test/HLFIR/opt-bufferization.fir
+++ b/flang/test/HLFIR/opt-bufferization.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
// simplified example
func.func @simple(%arg: !fir.ref<!fir.array<42xi32>>) {
diff --git a/flang/test/HLFIR/opt-scalar-assign.fir b/flang/test/HLFIR/opt-scalar-assign.fir
index 02ab02945b0426..cc5d2bda4e19dc 100644
--- a/flang/test/HLFIR/opt-scalar-assign.fir
+++ b/flang/test/HLFIR/opt-scalar-assign.fir
@@ -1,5 +1,5 @@
// Test optimized bufferization for hlfir.assign with scalar RHS.
-// RUN: fir-opt --opt-bufferization %s | FileCheck %s
+// RUN: fir-test-opt --opt-bufferization %s | FileCheck %s
func.func @_QPtest1() {
%cst = arith.constant 0.000000e+00 : f32
diff --git a/flang/test/HLFIR/opt-variable-assign-omp.fir b/flang/test/HLFIR/opt-variable-assign-omp.fir
index 10cb2b4408fb86..ef15ddff9ed68a 100755
--- a/flang/test/HLFIR/opt-variable-assign-omp.fir
+++ b/flang/test/HLFIR/opt-variable-assign-omp.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt %s --opt-bufferization | FileCheck %s
+// RUN: fir-test-opt %s --opt-bufferization | FileCheck %s
// Test that alias analysis doesn't crash determining if the arguments to
// hlfir.assign alias.
diff --git a/flang/test/HLFIR/order_assignments/forall-codegen-fuse-assignments.fir b/flang/test/HLFIR/order_assignments/forall-codegen-fuse-assignments.fir
index d5ee7a66c772ac..1bf863d7af323c 100644
--- a/flang/test/HLFIR/order_assignments/forall-codegen-fuse-assignments.fir
+++ b/flang/test/HLFIR/order_assignments/forall-codegen-fuse-assignments.fir
@@ -1,7 +1,7 @@
// Test code generation of hlfir.forall when assignment fusing is enabled
// and possible.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments=fuse-assignments=true | FileCheck %s --check-prefix=FUSE
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments=fuse-assignments=false | FileCheck %s --check-prefix=NOFUSE
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments=fuse-assignments=true | FileCheck %s --check-prefix=FUSE
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments=fuse-assignments=false | FileCheck %s --check-prefix=NOFUSE
func.func @test_assignment_fusing(%x: !fir.ref<!fir.array<10xi32>>, %y : !fir.box<!fir.array<?xi32>>) {
%c42 = arith.constant 42 : i32
diff --git a/flang/test/HLFIR/order_assignments/forall-codegen-no-conflict.fir b/flang/test/HLFIR/order_assignments/forall-codegen-no-conflict.fir
index 784367f4b05dfe..a06e1a83a728e8 100644
--- a/flang/test/HLFIR/order_assignments/forall-codegen-no-conflict.fir
+++ b/flang/test/HLFIR/order_assignments/forall-codegen-no-conflict.fir
@@ -1,5 +1,5 @@
// Test code generation of hlfir.forall, hlfir.forall_index, and hlfir.forall_mask.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @test_simple(%x: !fir.ref<!fir.array<10xi32>>) {
hlfir.forall lb {
diff --git a/flang/test/HLFIR/order_assignments/forall-issue120190.fir b/flang/test/HLFIR/order_assignments/forall-issue120190.fir
index ca10bbfefad57a..79c9d72411c452 100644
--- a/flang/test/HLFIR/order_assignments/forall-issue120190.fir
+++ b/flang/test/HLFIR/order_assignments/forall-issue120190.fir
@@ -1,7 +1,7 @@
// Regression test for https://github.com/llvm/llvm-project/issues/120190
// Verify that hlfir.forall lowering does not try hoisting mask evaluation
// that refer to the forall index inside nested regions only.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @issue120190(%array: !fir.ref<!fir.array<100xf32>>, %cdt: i1) {
%cst = arith.constant 0.000000e+00 : f32
diff --git a/flang/test/HLFIR/order_assignments/impure-where.fir b/flang/test/HLFIR/order_assignments/impure-where.fir
index 011a486b2baf7e..5754effecc3be3 100644
--- a/flang/test/HLFIR/order_assignments/impure-where.fir
+++ b/flang/test/HLFIR/order_assignments/impure-where.fir
@@ -1,7 +1,7 @@
// Test code generation of hlfir.where/hflir.elsewhere when an
// "impure" mask is used and several runs are needed. The mask
// must be saved so that the impure function is only evaluated once.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func private @impure() -> !fir.heap<!fir.array<10x!fir.logical<4>>>
func.func @test_elsewhere_impure_mask(%x: !fir.ref<!fir.array<10xi32>>, %y: !fir.ref<!fir.array<10xi32>>, %z: !fir.ref<!fir.array<10xi32>>, %mask: !fir.ref<!fir.array<10x!fir.logical<4>>>) {
diff --git a/flang/test/HLFIR/order_assignments/inlined-stack-temp.fir b/flang/test/HLFIR/order_assignments/inlined-stack-temp.fir
index 0724d019537c04..7e50a763e4b737 100644
--- a/flang/test/HLFIR/order_assignments/inlined-stack-temp.fir
+++ b/flang/test/HLFIR/order_assignments/inlined-stack-temp.fir
@@ -1,6 +1,6 @@
// Test code generation of hlfir.forall and hlfir.where when temporary
// storage is needed and can be allocated inline.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @test_scalar_save(%arg0: !fir.box<!fir.array<?xi32>>) {
%c10_i32 = arith.constant 10 : i32
diff --git a/flang/test/HLFIR/order_assignments/lhs-conflicts-codegen.fir b/flang/test/HLFIR/order_assignments/lhs-conflicts-codegen.fir
index ac6c0d89f73fb6..4fe637a0ca1e6b 100644
--- a/flang/test/HLFIR/order_assignments/lhs-conflicts-codegen.fir
+++ b/flang/test/HLFIR/order_assignments/lhs-conflicts-codegen.fir
@@ -1,7 +1,7 @@
// Test code generation of hlfir.region_assign when the LHS computed
// address must be saved before the assignment is evaluated. Because
// the assignment would modify the LHS evaluation.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
// Test simplified IR for:
//
diff --git a/flang/test/HLFIR/order_assignments/runtime-stack-temp.fir b/flang/test/HLFIR/order_assignments/runtime-stack-temp.fir
index 4c2d4168366711..7f7703c3edb107 100644
--- a/flang/test/HLFIR/order_assignments/runtime-stack-temp.fir
+++ b/flang/test/HLFIR/order_assignments/runtime-stack-temp.fir
@@ -1,6 +1,6 @@
// Test code generation of hlfir.forall and hlfir.where when temporary
// storage is needed and requires a runtime managed stack.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @test_runtime_stack(%arg0: !fir.box<!fir.array<?xi32>>, %n: !fir.ref<i32>) {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/order_assignments/saving-mask-and-rhs.fir b/flang/test/HLFIR/order_assignments/saving-mask-and-rhs.fir
index 1eb86d09a39c1d..aa1421f313aec8 100644
--- a/flang/test/HLFIR/order_assignments/saving-mask-and-rhs.fir
+++ b/flang/test/HLFIR/order_assignments/saving-mask-and-rhs.fir
@@ -1,6 +1,6 @@
// Test when the saved mask is used in the same run to save
// another value (like the RHS).
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @saving_mask_and_rhs(%arg0: !fir.ref<!fir.array<10xi32>>) {
%c-1 = arith.constant -1 : index
diff --git a/flang/test/HLFIR/order_assignments/user-defined-assignment-finalization.fir b/flang/test/HLFIR/order_assignments/user-defined-assignment-finalization.fir
index fbbc47185757f6..a0d7ecd5babeaf 100644
--- a/flang/test/HLFIR/order_assignments/user-defined-assignment-finalization.fir
+++ b/flang/test/HLFIR/order_assignments/user-defined-assignment-finalization.fir
@@ -1,6 +1,6 @@
// Test code generation of hlfir.region_assign with user defined
// assignment implying finalization of the RHS.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
//! module types
//! type ud_assign
diff --git a/flang/test/HLFIR/order_assignments/user-defined-assignment.fir b/flang/test/HLFIR/order_assignments/user-defined-assignment.fir
index 61836b8bcc57eb..2a9714e2bea4a7 100644
--- a/flang/test/HLFIR/order_assignments/user-defined-assignment.fir
+++ b/flang/test/HLFIR/order_assignments/user-defined-assignment.fir
@@ -1,6 +1,6 @@
// Test code generation of hlfir.region_assign with user defined
// assignment.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @test_simple_scalar(%i: !fir.ref<i32>, %l: !fir.ref<!fir.logical<4>>) {
hlfir.region_assign {
diff --git a/flang/test/HLFIR/order_assignments/vector-subscripts-codegen.fir b/flang/test/HLFIR/order_assignments/vector-subscripts-codegen.fir
index c75daf4f69cffb..b7275abfa10fe8 100644
--- a/flang/test/HLFIR/order_assignments/vector-subscripts-codegen.fir
+++ b/flang/test/HLFIR/order_assignments/vector-subscripts-codegen.fir
@@ -1,7 +1,7 @@
// Test code generation of hlfir.region_assign where the left-hand
// side terminator is an hlfir.elemental_addr (Fortran assignments to
// vector subscripted designators).
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @simple(%arg0: !fir.ref<!fir.array<100xf32>> , %arg1: !fir.ref<!fir.array<10xi64>> , %arg2: !fir.ref<!fir.array<10xf32>> ) {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/order_assignments/vector-subscripts-scheduling.fir b/flang/test/HLFIR/order_assignments/vector-subscripts-scheduling.fir
index b76492efe2a562..a66142eb7dd5eb 100644
--- a/flang/test/HLFIR/order_assignments/vector-subscripts-scheduling.fir
+++ b/flang/test/HLFIR/order_assignments/vector-subscripts-scheduling.fir
@@ -1,7 +1,7 @@
// Test local alloca and store inside hlfir.region_assign do not trigger the
// creation of a temporary for the LHS.
-// RUN: fir-opt -o - -lower-hlfir-ordered-assignments --debug-only=flang-ordered-assignment -flang-dbg-order-assignment-schedule-only %s 2>&1 | FileCheck %s
+// RUN: fir-test-opt -o - -lower-hlfir-ordered-assignments --debug-only=flang-ordered-assignment -flang-dbg-order-assignment-schedule-only %s 2>&1 | FileCheck %s
// REQUIRES: asserts
func.func @simple(%arg0: !fir.ref<!fir.array<100x10xf32>> , %arg1: !fir.ref<!fir.array<10xi64>> , %arg2: !fir.ref<!fir.array<10xf32>>, %i: i64, %f: f32) {
diff --git a/flang/test/HLFIR/order_assignments/where-cleanup.f90 b/flang/test/HLFIR/order_assignments/where-cleanup.f90
index b4d16452bd2cf1..6227b33bc4292f 100644
--- a/flang/test/HLFIR/order_assignments/where-cleanup.f90
+++ b/flang/test/HLFIR/order_assignments/where-cleanup.f90
@@ -1,5 +1,5 @@
// Test hlfir.where masked region cleanup lowering (the freemem in the tests).
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @loop_cleanup(%mask : !fir.ref<!fir.array<2x!fir.logical<4>>>, %x : !fir.ref<!fir.array<2xf32>>, %y : !fir.ref<!fir.array<2xf32>>) {
hlfir.where {
diff --git a/flang/test/HLFIR/order_assignments/where-codegen-no-conflict.fir b/flang/test/HLFIR/order_assignments/where-codegen-no-conflict.fir
index a1a357b45a64ed..d5fc862bf70f84 100644
--- a/flang/test/HLFIR/order_assignments/where-codegen-no-conflict.fir
+++ b/flang/test/HLFIR/order_assignments/where-codegen-no-conflict.fir
@@ -1,6 +1,6 @@
// Test code generation of hlfir.where, and hlfir.elsewhere when there
// is no need to create temporary storage.
-// RUN: fir-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
+// RUN: fir-test-opt %s --lower-hlfir-ordered-assignments | FileCheck %s
func.func @test_simple(%arg0: !fir.box<!fir.array<?xf32>>, %arg1: !fir.box<!fir.array<?x!fir.logical<4>>>) {
%cst = arith.constant 4.200000e+01 : f32
diff --git a/flang/test/HLFIR/parent_comp-codegen.fir b/flang/test/HLFIR/parent_comp-codegen.fir
index 186c539b122d90..715bc9fb4018e5 100644
--- a/flang/test/HLFIR/parent_comp-codegen.fir
+++ b/flang/test/HLFIR/parent_comp-codegen.fir
@@ -1,5 +1,5 @@
// Test hlfir.parent_comp code generation to FIR
-// RUN: fir-opt %s -convert-hlfir-to-fir | FileCheck %s
+// RUN: fir-test-opt %s -convert-hlfir-to-fir | FileCheck %s
func.func @test_scalar(%arg0: !fir.ref<!fir.type<t2{i:i32,j:i32}>>) {
%1 = hlfir.parent_comp %arg0 : (!fir.ref<!fir.type<t2{i:i32,j:i32}>>) -> !fir.ref<!fir.type<t1{i:i32}>>
diff --git a/flang/test/HLFIR/parent_comp.fir b/flang/test/HLFIR/parent_comp.fir
index c84f0a750efbc0..97e68481d0807e 100644
--- a/flang/test/HLFIR/parent_comp.fir
+++ b/flang/test/HLFIR/parent_comp.fir
@@ -1,5 +1,5 @@
// Test hlfir.parent_comp operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_scalar(%arg0: !fir.ref<!fir.type<t2{i:i32,j:i32}>>) {
%1 = hlfir.parent_comp %arg0 : (!fir.ref<!fir.type<t2{i:i32,j:i32}>>) -> !fir.ref<!fir.type<t1{i:i32}>>
diff --git a/flang/test/HLFIR/product-lowering.fir b/flang/test/HLFIR/product-lowering.fir
index 45ae1f7aeaf5a8..74d729ddfc0dc5 100644
--- a/flang/test/HLFIR/product-lowering.fir
+++ b/flang/test/HLFIR/product-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.product operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// one argument product
func.func @_QPproduct1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/product.fir b/flang/test/HLFIR/product.fir
index e10a4a2ee074ce..20f37eb70bfd9f 100644
--- a/flang/test/HLFIR/product.fir
+++ b/flang/test/HLFIR/product.fir
@@ -1,6 +1,6 @@
// Test hlfir.product operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array is an expression of known shape
func.func @product0(%arg0: !hlfir.expr<42xi32>) {
diff --git a/flang/test/HLFIR/region-assign.fir b/flang/test/HLFIR/region-assign.fir
index 39724d818cb025..7f5ec2cb5b7cbc 100644
--- a/flang/test/HLFIR/region-assign.fir
+++ b/flang/test/HLFIR/region-assign.fir
@@ -1,6 +1,6 @@
// Test hlfir.region_assign and hlfir.yield operation parse, verify (no errors),
// and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @region_assign_test(%y : !fir.box<!fir.array<?xi64>>, %x: !fir.box<!fir.array<?xf32>>) {
%c100 = arith.constant 100 : index
diff --git a/flang/test/HLFIR/set_length-codegen.fir b/flang/test/HLFIR/set_length-codegen.fir
index 571eb01a825ed4..a5b9d3d5fbfed8 100644
--- a/flang/test/HLFIR/set_length-codegen.fir
+++ b/flang/test/HLFIR/set_length-codegen.fir
@@ -1,5 +1,5 @@
// Test hlfir.set_length operation lowering to operations operating on memory.
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @test_cst_len(%str : !fir.boxchar<1>) {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/set_length.fir b/flang/test/HLFIR/set_length.fir
index 099a807f251661..a81537bc7c5095 100644
--- a/flang/test/HLFIR/set_length.fir
+++ b/flang/test/HLFIR/set_length.fir
@@ -1,5 +1,5 @@
// Test hlfir.set_length operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_cst_len(%str : !fir.boxchar<1>) {
%c10 = arith.constant 10 : index
diff --git a/flang/test/HLFIR/shapeof-lowering.fir b/flang/test/HLFIR/shapeof-lowering.fir
index 73e2270a0cd4ab..bec6cf4937d9a2 100644
--- a/flang/test/HLFIR/shapeof-lowering.fir
+++ b/flang/test/HLFIR/shapeof-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.shape_of lowering
-// RUN: fir-opt %s -bufferize-hlfir | FileCheck %s
+// RUN: fir-test-opt %s -bufferize-hlfir | FileCheck %s
func.func @shapeof_asexpr(%arg0: !fir.box<!fir.heap<!fir.array<?xf32>>>) -> !fir.shape<1> {
%c0 = arith.constant 0 : index
diff --git a/flang/test/HLFIR/shapeof.fir b/flang/test/HLFIR/shapeof.fir
index 43e22dd320c18b..55c82f22f2bd49 100644
--- a/flang/test/HLFIR/shapeof.fir
+++ b/flang/test/HLFIR/shapeof.fir
@@ -1,8 +1,8 @@
// Test hlfir.shape_of operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck --check-prefix CHECK --check-prefix CHECK-ALL %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck --check-prefix CHECK --check-prefix CHECK-ALL %s
// Test canonicalization
-// RUN: fir-opt %s --canonicalize | FileCheck --check-prefix CHECK-CANON --check-prefix CHECK-ALL %s
+// RUN: fir-test-opt %s --canonicalize | FileCheck --check-prefix CHECK-CANON --check-prefix CHECK-ALL %s
func.func @shapeof(%arg0: !hlfir.expr<2x2xi32>) -> !fir.shape<2> {
%shape = hlfir.shape_of %arg0 : (!hlfir.expr<2x2xi32>) -> !fir.shape<2>
diff --git a/flang/test/HLFIR/simplify-hlfir-intrinsics-cshift.fir b/flang/test/HLFIR/simplify-hlfir-intrinsics-cshift.fir
index d21d7755062ba7..938f6e8002164b 100644
--- a/flang/test/HLFIR/simplify-hlfir-intrinsics-cshift.fir
+++ b/flang/test/HLFIR/simplify-hlfir-intrinsics-cshift.fir
@@ -1,5 +1,5 @@
// Test hlfir.cshift simplification to hlfir.elemental:
-// RUN: fir-opt --simplify-hlfir-intrinsics %s | FileCheck %s
+// RUN: fir-test-opt --simplify-hlfir-intrinsics %s | FileCheck %s
func.func @cshift_vector(%arg0: !fir.box<!fir.array<?xi32>>, %arg1: !fir.ref<i32>) -> !hlfir.expr<?xi32>{
%res = hlfir.cshift %arg0 %arg1 : (!fir.box<!fir.array<?xi32>>, !fir.ref<i32>) -> !hlfir.expr<?xi32>
diff --git a/flang/test/HLFIR/simplify-hlfir-intrinsics-dotproduct.fir b/flang/test/HLFIR/simplify-hlfir-intrinsics-dotproduct.fir
index f59b1422dbc849..42618713d9f9ff 100644
--- a/flang/test/HLFIR/simplify-hlfir-intrinsics-dotproduct.fir
+++ b/flang/test/HLFIR/simplify-hlfir-intrinsics-dotproduct.fir
@@ -1,5 +1,5 @@
// Test hlfir.dot_product simplification to a reduction loop:
-// RUN: fir-opt --simplify-hlfir-intrinsics %s | FileCheck %s
+// RUN: fir-test-opt --simplify-hlfir-intrinsics %s | FileCheck %s
func.func @dot_product_integer(%arg0: !hlfir.expr<?xi16>, %arg1: !hlfir.expr<?xi32>) -> i32 {
%res = hlfir.dot_product %arg0 %arg1 : (!hlfir.expr<?xi16>, !hlfir.expr<?xi32>) -> i32
diff --git a/flang/test/HLFIR/simplify-hlfir-intrinsics-matmul.fir b/flang/test/HLFIR/simplify-hlfir-intrinsics-matmul.fir
index d29e9a26c20ba9..8fc6641c2b8cae 100644
--- a/flang/test/HLFIR/simplify-hlfir-intrinsics-matmul.fir
+++ b/flang/test/HLFIR/simplify-hlfir-intrinsics-matmul.fir
@@ -1,7 +1,7 @@
// Test hlfir.cshift simplification to hlfir.elemental:
-// RUN: fir-opt --simplify-hlfir-intrinsics=allow-new-side-effects=false %s | FileCheck %s --check-prefixes=ALL,NOANSE
-// RUN: fir-opt --simplify-hlfir-intrinsics=allow-new-side-effects=true %s | FileCheck %s --check-prefixes=ALL,ANSE
-// RUN: fir-opt --simplify-hlfir-intrinsics -flang-inline-matmul-as-elemental %s | FileCheck %s --check-prefixes=ALL,ELEMENTAL
+// RUN: fir-test-opt --simplify-hlfir-intrinsics=allow-new-side-effects=false %s | FileCheck %s --check-prefixes=ALL,NOANSE
+// RUN: fir-test-opt --simplify-hlfir-intrinsics=allow-new-side-effects=true %s | FileCheck %s --check-prefixes=ALL,ANSE
+// RUN: fir-test-opt --simplify-hlfir-intrinsics -flang-inline-matmul-as-elemental %s | FileCheck %s --check-prefixes=ALL,ELEMENTAL
func.func @matmul_matrix_matrix_integer(%arg0: !hlfir.expr<?x?xi16>, %arg1: !hlfir.expr<?x?xi32>) -> !hlfir.expr<?x?xi32> {
%res = hlfir.matmul %arg0 %arg1 : (!hlfir.expr<?x?xi16>, !hlfir.expr<?x?xi32>) -> !hlfir.expr<?x?xi32>
diff --git a/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir b/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
index d1915952d77eae..9fb82f1ac9e391 100644
--- a/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
+++ b/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --simplify-hlfir-intrinsics %s | FileCheck %s
+// RUN: fir-test-opt --simplify-hlfir-intrinsics %s | FileCheck %s
// box with known extents
func.func @sum_box_known_extents(%arg0: !fir.box<!fir.array<2x3xi32>>) -> !hlfir.expr<2xi32> {
diff --git a/flang/test/HLFIR/simplify-hlfir-intrinsics.fir b/flang/test/HLFIR/simplify-hlfir-intrinsics.fir
index 5fd21e98a8d874..e68c9138213868 100644
--- a/flang/test/HLFIR/simplify-hlfir-intrinsics.fir
+++ b/flang/test/HLFIR/simplify-hlfir-intrinsics.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --simplify-hlfir-intrinsics %s | FileCheck %s
+// RUN: fir-test-opt --simplify-hlfir-intrinsics %s | FileCheck %s
// box with known extents
func.func @transpose0(%arg0: !fir.box<!fir.array<1x2xi32>>) -> !hlfir.expr<2x1xi32> {
diff --git a/flang/test/HLFIR/sum-lowering.fir b/flang/test/HLFIR/sum-lowering.fir
index e34ac487e8f9be..2073f29df85a60 100644
--- a/flang/test/HLFIR/sum-lowering.fir
+++ b/flang/test/HLFIR/sum-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.sum operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
// simple one argument sum
func.func @_QPsum1(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "s"}) {
diff --git a/flang/test/HLFIR/sum.fir b/flang/test/HLFIR/sum.fir
index a33873edcce9d1..8693a67187beba 100644
--- a/flang/test/HLFIR/sum.fir
+++ b/flang/test/HLFIR/sum.fir
@@ -1,6 +1,6 @@
// Test hlfir.sum operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// array is an expression of known shape
func.func @sum0(%arg0: !hlfir.expr<42xi32>) {
diff --git a/flang/test/HLFIR/transpose-lowering.fir b/flang/test/HLFIR/transpose-lowering.fir
index 76d51c3438282c..67113680d744e8 100644
--- a/flang/test/HLFIR/transpose-lowering.fir
+++ b/flang/test/HLFIR/transpose-lowering.fir
@@ -1,5 +1,5 @@
// Test hlfir.transpose operation lowering to fir runtime call
-// RUN: fir-opt %s -lower-hlfir-intrinsics | FileCheck %s
+// RUN: fir-test-opt %s -lower-hlfir-intrinsics | FileCheck %s
func.func @_QPtranspose1(%arg0: !fir.ref<!fir.array<1x2xi32>> {fir.bindc_name = "m"}, %arg1: !fir.ref<!fir.array<2x1xi32>> {fir.bindc_name = "res"}) {
%c1 = arith.constant 1 : index
diff --git a/flang/test/HLFIR/transpose.fir b/flang/test/HLFIR/transpose.fir
index 14f9383d5775a1..fbd0547dfdaf0f 100644
--- a/flang/test/HLFIR/transpose.fir
+++ b/flang/test/HLFIR/transpose.fir
@@ -1,6 +1,6 @@
// Test hlfir.transpose operation parse, verify (no errors), and unparse
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
// square matrix of known shape
func.func @transpose0(%arg0: !hlfir.expr<2x2xi32>) {
diff --git a/flang/test/HLFIR/where.fir b/flang/test/HLFIR/where.fir
index 2aa242c9491dff..de07b132b212d0 100644
--- a/flang/test/HLFIR/where.fir
+++ b/flang/test/HLFIR/where.fir
@@ -1,5 +1,5 @@
// Test hlfir.where operation parse, verify (no errors), and unparse.
-// RUN: fir-opt %s | fir-opt | FileCheck %s
+// RUN: fir-test-opt %s | fir-test-opt | FileCheck %s
func.func @test_where(%mask: !fir.ref<!fir.array<10x!fir.logical<4>>>, %x: !fir.ref<!fir.array<10xf32>>, %y: !fir.box<!fir.array<?xf32>>) {
hlfir.where {
diff --git a/flang/test/Intrinsics/math-codegen.fir b/flang/test/Intrinsics/math-codegen.fir
index 2165a13b10de29..6e2e52ed085903 100644
--- a/flang/test/Intrinsics/math-codegen.fir
+++ b/flang/test/Intrinsics/math-codegen.fir
@@ -2,7 +2,7 @@
// TODO: verify that Fast-Math Flags and 'strictfp' are properly set.
//--- abs_fast.fir
-// RUN: fir-opt %t/abs_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/abs_fast.fir
+// RUN: fir-test-opt %t/abs_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/abs_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.fabs({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -74,7 +74,7 @@ func.func private @hypotf(f32, f32) -> f32
func.func private @hypot(f64, f64) -> f64
//--- abs_relaxed.fir
-// RUN: fir-opt %t/abs_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/abs_relaxed.fir
+// RUN: fir-test-opt %t/abs_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/abs_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.fabs({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -146,7 +146,7 @@ func.func private @hypotf(f32, f32) -> f32
func.func private @hypot(f64, f64) -> f64
//--- abs_precise.fir
-// RUN: fir-opt %t/abs_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/abs_precise.fir
+// RUN: fir-test-opt %t/abs_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/abs_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @fabsf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -221,7 +221,7 @@ func.func private @hypotf(f32, f32) -> f32
func.func private @hypot(f64, f64) -> f64
//--- aint_fast.fir
-// RUN: fir-opt %t/aint_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/aint_fast.fir
+// RUN: fir-test-opt %t/aint_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/aint_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.trunc.f32({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -248,7 +248,7 @@ func.func private @llvm.trunc.f32(f32) -> f32
func.func private @llvm.trunc.f64(f64) -> f64
//--- aint_relaxed.fir
-// RUN: fir-opt %t/aint_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/aint_relaxed.fir
+// RUN: fir-test-opt %t/aint_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/aint_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.trunc.f32({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -275,7 +275,7 @@ func.func private @llvm.trunc.f32(f32) -> f32
func.func private @llvm.trunc.f64(f64) -> f64
//--- aint_precise.fir
-// RUN: fir-opt %t/aint_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/aint_precise.fir
+// RUN: fir-test-opt %t/aint_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/aint_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.trunc.f32({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -302,7 +302,7 @@ func.func private @llvm.trunc.f32(f32) -> f32
func.func private @llvm.trunc.f64(f64) -> f64
//--- anint_fast.fir
-// RUN: fir-opt %t/anint_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/anint_fast.fir
+// RUN: fir-test-opt %t/anint_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/anint_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.round({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -327,7 +327,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- anint_relaxed.fir
-// RUN: fir-opt %t/anint_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/anint_relaxed.fir
+// RUN: fir-test-opt %t/anint_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/anint_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.round({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -352,7 +352,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- anint_precise.fir
-// RUN: fir-opt %t/anint_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/anint_precise.fir
+// RUN: fir-test-opt %t/anint_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/anint_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.round.f32({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -379,7 +379,7 @@ func.func private @llvm.round.f32(f32) -> f32
func.func private @llvm.round.f64(f64) -> f64
//--- atan_fast.fir
-// RUN: fir-opt %t/atan_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan_fast.fir
+// RUN: fir-test-opt %t/atan_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @atanf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -404,7 +404,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- atan_relaxed.fir
-// RUN: fir-opt %t/atan_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan_relaxed.fir
+// RUN: fir-test-opt %t/atan_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @atanf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -429,7 +429,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- atan_precise.fir
-// RUN: fir-opt %t/atan_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan_precise.fir
+// RUN: fir-test-opt %t/atan_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @atanf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -456,7 +456,7 @@ func.func private @atanf(f32) -> f32
func.func private @atan(f64) -> f64
//--- atan2_fast.fir
-// RUN: fir-opt %t/atan2_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan2_fast.fir
+// RUN: fir-test-opt %t/atan2_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan2_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @atan2f({{%[A-Za-z0-9._]+}}, {{%[A-Za-z0-9._]+}}) : (f32, f32) -> f32
@@ -483,7 +483,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}, %arg1: !fi
}
//--- atan2_relaxed.fir
-// RUN: fir-opt %t/atan2_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan2_relaxed.fir
+// RUN: fir-test-opt %t/atan2_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan2_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @atan2f({{%[A-Za-z0-9._]+}}, {{%[A-Za-z0-9._]+}}) : (f32, f32) -> f32
@@ -510,7 +510,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}, %arg1: !fi
}
//--- atan2_precise.fir
-// RUN: fir-opt %t/atan2_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan2_precise.fir
+// RUN: fir-test-opt %t/atan2_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/atan2_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @atan2f({{%[A-Za-z0-9._]+}}, {{%[A-Za-z0-9._]+}}) : (f32, f32) -> f32
@@ -539,7 +539,7 @@ func.func private @atan2f(f32, f32) -> f32
func.func private @atan2(f64, f64) -> f64
//--- ceiling_fast.fir
-// RUN: fir-opt %t/ceiling_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/ceiling_fast.fir
+// RUN: fir-test-opt %t/ceiling_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/ceiling_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.ceil({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -568,7 +568,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- ceiling_relaxed.fir
-// RUN: fir-opt %t/ceiling_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/ceiling_relaxed.fir
+// RUN: fir-test-opt %t/ceiling_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/ceiling_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.ceil({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -597,7 +597,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- ceiling_precise.fir
-// RUN: fir-opt %t/ceiling_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/ceiling_precise.fir
+// RUN: fir-test-opt %t/ceiling_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/ceiling_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @ceilf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -628,7 +628,7 @@ func.func private @ceilf(f32) -> f32
func.func private @ceil(f64) -> f64
//--- cos_fast.fir
-// RUN: fir-opt %t/cos_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cos_fast.fir
+// RUN: fir-test-opt %t/cos_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cos_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.cos({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -653,7 +653,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- cos_relaxed.fir
-// RUN: fir-opt %t/cos_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cos_relaxed.fir
+// RUN: fir-test-opt %t/cos_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cos_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.cos({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -678,7 +678,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- cos_precise.fir
-// RUN: fir-opt %t/cos_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cos_precise.fir
+// RUN: fir-test-opt %t/cos_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cos_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @cosf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -705,7 +705,7 @@ func.func private @cosf(f32) -> f32
func.func private @cos(f64) -> f64
//--- cosh_fast.fir
-// RUN: fir-opt %t/cosh_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cosh_fast.fir
+// RUN: fir-test-opt %t/cosh_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cosh_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @coshf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -732,7 +732,7 @@ func.func private @coshf(f32) -> f32
func.func private @cosh(f64) -> f64
//--- cosh_relaxed.fir
-// RUN: fir-opt %t/cosh_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cosh_relaxed.fir
+// RUN: fir-test-opt %t/cosh_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cosh_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @coshf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -759,7 +759,7 @@ func.func private @coshf(f32) -> f32
func.func private @cosh(f64) -> f64
//--- cosh_precise.fir
-// RUN: fir-opt %t/cosh_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cosh_precise.fir
+// RUN: fir-test-opt %t/cosh_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/cosh_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @coshf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -786,7 +786,7 @@ func.func private @coshf(f32) -> f32
func.func private @cosh(f64) -> f64
//--- erf_fast.fir
-// RUN: fir-opt %t/erf_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/erf_fast.fir
+// RUN: fir-test-opt %t/erf_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/erf_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @erff({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -811,7 +811,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- erf_relaxed.fir
-// RUN: fir-opt %t/erf_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/erf_relaxed.fir
+// RUN: fir-test-opt %t/erf_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/erf_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @erff({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -836,7 +836,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- erf_precise.fir
-// RUN: fir-opt %t/erf_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/erf_precise.fir
+// RUN: fir-test-opt %t/erf_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/erf_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @erff({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -863,7 +863,7 @@ func.func private @erff(f32) -> f32
func.func private @erf(f64) -> f64
//--- exp_fast.fir
-// RUN: fir-opt %t/exp_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exp_fast.fir
+// RUN: fir-test-opt %t/exp_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exp_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.exp({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -888,7 +888,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- exp_relaxed.fir
-// RUN: fir-opt %t/exp_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exp_relaxed.fir
+// RUN: fir-test-opt %t/exp_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exp_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.exp({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -913,7 +913,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- exp_precise.fir
-// RUN: fir-opt %t/exp_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exp_precise.fir
+// RUN: fir-test-opt %t/exp_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exp_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @expf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -940,7 +940,7 @@ func.func private @expf(f32) -> f32
func.func private @exp(f64) -> f64
//--- floor_fast.fir
-// RUN: fir-opt %t/floor_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/floor_fast.fir
+// RUN: fir-test-opt %t/floor_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/floor_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.floor({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -969,7 +969,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- floor_relaxed.fir
-// RUN: fir-opt %t/floor_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/floor_relaxed.fir
+// RUN: fir-test-opt %t/floor_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/floor_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.floor({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -998,7 +998,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- floor_precise.fir
-// RUN: fir-opt %t/floor_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/floor_precise.fir
+// RUN: fir-test-opt %t/floor_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/floor_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @floorf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1029,7 +1029,7 @@ func.func private @floorf(f32) -> f32
func.func private @floor(f64) -> f64
//--- log_fast.fir
-// RUN: fir-opt %t/log_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log_fast.fir
+// RUN: fir-test-opt %t/log_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.log({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1054,7 +1054,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- log_relaxed.fir
-// RUN: fir-opt %t/log_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log_relaxed.fir
+// RUN: fir-test-opt %t/log_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.log({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1079,7 +1079,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- log_precise.fir
-// RUN: fir-opt %t/log_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log_precise.fir
+// RUN: fir-test-opt %t/log_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @logf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1106,7 +1106,7 @@ func.func private @logf(f32) -> f32
func.func private @log(f64) -> f64
//--- log10_fast.fir
-// RUN: fir-opt %t/log10_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log10_fast.fir
+// RUN: fir-test-opt %t/log10_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log10_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.log10({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1131,7 +1131,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- log10_relaxed.fir
-// RUN: fir-opt %t/log10_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log10_relaxed.fir
+// RUN: fir-test-opt %t/log10_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log10_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.log10({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1156,7 +1156,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- log10_precise.fir
-// RUN: fir-opt %t/log10_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log10_precise.fir
+// RUN: fir-test-opt %t/log10_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/log10_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @log10f({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1183,7 +1183,7 @@ func.func private @log10f(f32) -> f32
func.func private @log10(f64) -> f64
//--- nint_fast.fir
-// RUN: fir-opt %t/nint_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/nint_fast.fir
+// RUN: fir-test-opt %t/nint_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/nint_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.lround.i32.f32({{%[A-Za-z0-9._]+}}) : (f32) -> i32
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.lround.i64.f32({{%[A-Za-z0-9._]+}}) : (f32) -> i64
@@ -1224,7 +1224,7 @@ func.func private @llvm.lround.i32.f64(f64) -> i32
func.func private @llvm.lround.i64.f64(f64) -> i64
//--- nint_relaxed.fir
-// RUN: fir-opt %t/nint_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/nint_relaxed.fir
+// RUN: fir-test-opt %t/nint_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/nint_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.lround.i32.f32({{%[A-Za-z0-9._]+}}) : (f32) -> i32
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.lround.i64.f32({{%[A-Za-z0-9._]+}}) : (f32) -> i64
@@ -1265,7 +1265,7 @@ func.func private @llvm.lround.i32.f64(f64) -> i32
func.func private @llvm.lround.i64.f64(f64) -> i64
//--- nint_precise.fir
-// RUN: fir-opt %t/nint_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/nint_precise.fir
+// RUN: fir-test-opt %t/nint_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/nint_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.lround.i32.f32({{%[A-Za-z0-9._]+}}) : (f32) -> i32
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.lround.i64.f32({{%[A-Za-z0-9._]+}}) : (f32) -> i64
@@ -1306,7 +1306,7 @@ func.func private @llvm.lround.i32.f64(f64) -> i32
func.func private @llvm.lround.i64.f64(f64) -> i64
//--- exponentiation_fast.fir
-// RUN: fir-opt %t/exponentiation_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_fast.fir
+// RUN: fir-test-opt %t/exponentiation_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_fast.fir
// CHECK: @_QPtest_real4
// CHECK: [[STOI:%[A-Za-z0-9._]+]] = llvm.sext {{%[A-Za-z0-9._]+}} : i16 to i32
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.powi.f32.i32({{%[A-Za-z0-9._]+}}, [[STOI]]) : (f32, i32) -> f32
@@ -1359,7 +1359,7 @@ func.func private @llvm.powi.f32.i32(f32, i32) -> f32
func.func private @llvm.powi.f64.i32(f64, i32) -> f64
//--- exponentiation_relaxed.fir
-// RUN: fir-opt %t/exponentiation_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_relaxed.fir
+// RUN: fir-test-opt %t/exponentiation_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: [[STOI:%[A-Za-z0-9._]+]] = llvm.sext {{%[A-Za-z0-9._]+}} : i16 to i32
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.powi.f32.i32({{%[A-Za-z0-9._]+}}, [[STOI]]) : (f32, i32) -> f32
@@ -1412,7 +1412,7 @@ func.func private @llvm.powi.f32.i32(f32, i32) -> f32
func.func private @llvm.powi.f64.i32(f64, i32) -> f64
//--- exponentiation_precise.fir
-// RUN: fir-opt %t/exponentiation_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_precise.fir
+// RUN: fir-test-opt %t/exponentiation_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_precise.fir
// CHECK: @_QPtest_real4
// CHECK: [[STOI:%[A-Za-z0-9._]+]] = llvm.sext {{%[A-Za-z0-9._]+}} : i16 to i32
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @llvm.powi.f32.i32({{%[A-Za-z0-9._]+}}, [[STOI]]) : (f32, i32) -> f32
@@ -1467,9 +1467,9 @@ func.func private @llvm.powi.f64.i32(f64, i32) -> f64
func.func private @pow(f64, f64) -> f64
//--- exponentiation_integer.fir
-// RUN: fir-opt %t/exponentiation_integer.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_integer.fir --check-prefixes="CHECK,CHECK-COMDAT"
-// RUN: fir-opt %t/exponentiation_integer.fir --fir-to-llvm-ir="target=x86_64-pc-windows-msvc" | FileCheck %t/exponentiation_integer.fir --check-prefixes="CHECK,CHECK-COMDAT"
-// RUN: fir-opt %t/exponentiation_integer.fir --fir-to-llvm-ir="target=aarch64-apple-darwin" | FileCheck %t/exponentiation_integer.fir --check-prefixes="CHECK,CHECK-NOCOMDAT"
+// RUN: fir-test-opt %t/exponentiation_integer.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/exponentiation_integer.fir --check-prefixes="CHECK,CHECK-COMDAT"
+// RUN: fir-test-opt %t/exponentiation_integer.fir --fir-to-llvm-ir="target=x86_64-pc-windows-msvc" | FileCheck %t/exponentiation_integer.fir --check-prefixes="CHECK,CHECK-COMDAT"
+// RUN: fir-test-opt %t/exponentiation_integer.fir --fir-to-llvm-ir="target=aarch64-apple-darwin" | FileCheck %t/exponentiation_integer.fir --check-prefixes="CHECK,CHECK-NOCOMDAT"
// CHECK-COMDAT: llvm.comdat_selector @__mlir_math_ipowi_i32 any
// CHECK-NOCOMDAT-NOT: llvm.comdat_selector @__mlir_math_ipowi_i32 any
// CHECK: @_QPtest_int4
@@ -1486,7 +1486,7 @@ func.func @_QPtest_int4(%arg0: !fir.ref<i32> {fir.bindc_name = "x"}, %arg1: !fir
}
//--- sign_fast.fir
-// RUN: fir-opt %t/sign_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sign_fast.fir
+// RUN: fir-test-opt %t/sign_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sign_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.copysign({{%[A-Za-z0-9._]+}}, {{%[A-Za-z0-9._]+}}) : (f32, f32) -> f32
@@ -1537,7 +1537,7 @@ func.func @_QPtest_real16(%arg0: !fir.ref<f128> {fir.bindc_name = "x"}, %arg1: !
}
//--- sign_relaxed.fir
-// RUN: fir-opt %t/sign_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sign_relaxed.fir
+// RUN: fir-test-opt %t/sign_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sign_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.copysign({{%[A-Za-z0-9._]+}}, {{%[A-Za-z0-9._]+}}) : (f32, f32) -> f32
@@ -1588,7 +1588,7 @@ func.func @_QPtest_real16(%arg0: !fir.ref<f128> {fir.bindc_name = "x"}, %arg1: !
}
//--- sign_precise.fir
-// RUN: fir-opt %t/sign_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sign_precise.fir
+// RUN: fir-test-opt %t/sign_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sign_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @copysignf({{%[A-Za-z0-9._]+}}, {{%[A-Za-z0-9._]+}}) : (f32, f32) -> f32
@@ -1643,7 +1643,7 @@ func.func private @copysignl(f80, f80) -> f80
func.func private @llvm.copysign.f128(f128, f128) -> f128
//--- sin_fast.fir
-// RUN: fir-opt %t/sin_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sin_fast.fir
+// RUN: fir-test-opt %t/sin_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sin_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.sin({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1668,7 +1668,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- sin_relaxed.fir
-// RUN: fir-opt %t/sin_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sin_relaxed.fir
+// RUN: fir-test-opt %t/sin_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sin_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.intr.sin({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1693,7 +1693,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- sin_precise.fir
-// RUN: fir-opt %t/sin_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sin_precise.fir
+// RUN: fir-test-opt %t/sin_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sin_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @sinf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1720,7 +1720,7 @@ func.func private @sinf(f32) -> f32
func.func private @sin(f64) -> f64
//--- sinh_fast.fir
-// RUN: fir-opt %t/sinh_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sinh_fast.fir
+// RUN: fir-test-opt %t/sinh_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sinh_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @sinhf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1747,7 +1747,7 @@ func.func private @sinhf(f32) -> f32
func.func private @sinh(f64) -> f64
//--- sinh_relaxed.fir
-// RUN: fir-opt %t/sinh_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sinh_relaxed.fir
+// RUN: fir-test-opt %t/sinh_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sinh_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @sinhf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1774,7 +1774,7 @@ func.func private @sinhf(f32) -> f32
func.func private @sinh(f64) -> f64
//--- sinh_precise.fir
-// RUN: fir-opt %t/sinh_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sinh_precise.fir
+// RUN: fir-test-opt %t/sinh_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/sinh_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @sinhf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1801,7 +1801,7 @@ func.func private @sinhf(f32) -> f32
func.func private @sinh(f64) -> f64
//--- tanh_fast.fir
-// RUN: fir-opt %t/tanh_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tanh_fast.fir
+// RUN: fir-test-opt %t/tanh_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tanh_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @tanhf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1826,7 +1826,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- tanh_relaxed.fir
-// RUN: fir-opt %t/tanh_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tanh_relaxed.fir
+// RUN: fir-test-opt %t/tanh_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tanh_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @tanhf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1851,7 +1851,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- tanh_precise.fir
-// RUN: fir-opt %t/tanh_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tanh_precise.fir
+// RUN: fir-test-opt %t/tanh_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tanh_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @tanhf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1878,7 +1878,7 @@ func.func private @tanhf(f32) -> f32
func.func private @tanh(f64) -> f64
//--- tan_fast.fir
-// RUN: fir-opt %t/tan_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tan_fast.fir
+// RUN: fir-test-opt %t/tan_fast.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tan_fast.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @tanf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1903,7 +1903,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- tan_relaxed.fir
-// RUN: fir-opt %t/tan_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tan_relaxed.fir
+// RUN: fir-test-opt %t/tan_relaxed.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tan_relaxed.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @tanf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
@@ -1928,7 +1928,7 @@ func.func @_QPtest_real8(%arg0: !fir.ref<f64> {fir.bindc_name = "x"}) -> f64 {
}
//--- tan_precise.fir
-// RUN: fir-opt %t/tan_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tan_precise.fir
+// RUN: fir-test-opt %t/tan_precise.fir --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" | FileCheck %t/tan_precise.fir
// CHECK: @_QPtest_real4
// CHECK: {{%[A-Za-z0-9._]+}} = llvm.call @tanf({{%[A-Za-z0-9._]+}}) : (f32) -> f32
diff --git a/flang/test/Lower/CUDA/cuda-data-attribute.cuf b/flang/test/Lower/CUDA/cuda-data-attribute.cuf
index 805250691a3897..9c04233cf23302 100644
--- a/flang/test/Lower/CUDA/cuda-data-attribute.cuf
+++ b/flang/test/Lower/CUDA/cuda-data-attribute.cuf
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
-! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-opt -convert-hlfir-to-fir | FileCheck %s --check-prefix=FIR
+! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-test-opt -convert-hlfir-to-fir | FileCheck %s --check-prefix=FIR
! Test lowering of CUDA attribute on variables.
diff --git a/flang/test/Lower/CUDA/cuda-kernel-calls.cuf b/flang/test/Lower/CUDA/cuda-kernel-calls.cuf
index eb24138638e960..fda489304a7bdc 100644
--- a/flang/test/Lower/CUDA/cuda-kernel-calls.cuf
+++ b/flang/test/Lower/CUDA/cuda-kernel-calls.cuf
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
-! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-opt | FileCheck %s
+! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-test-opt | FileCheck %s
! Test lowering of CUDA procedure calls.
diff --git a/flang/test/Lower/CUDA/cuda-kernel-loop-directive.cuf b/flang/test/Lower/CUDA/cuda-kernel-loop-directive.cuf
index 09aefc055e6fa1..a26232a6629a96 100644
--- a/flang/test/Lower/CUDA/cuda-kernel-loop-directive.cuf
+++ b/flang/test/Lower/CUDA/cuda-kernel-loop-directive.cuf
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
-! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-opt | FileCheck %s
+! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-test-opt | FileCheck %s
! Test lowering of CUDA kernel loop directive.
diff --git a/flang/test/Lower/CUDA/cuda-proc-attribute.cuf b/flang/test/Lower/CUDA/cuda-proc-attribute.cuf
index f8b8dd8e296b43..7504a468c97f67 100644
--- a/flang/test/Lower/CUDA/cuda-proc-attribute.cuf
+++ b/flang/test/Lower/CUDA/cuda-proc-attribute.cuf
@@ -1,5 +1,5 @@
! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
-! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-opt -convert-hlfir-to-fir | FileCheck %s
+! RUN: bbc -emit-hlfir -fcuda %s -o - | fir-test-opt -convert-hlfir-to-fir | FileCheck %s
! Test lowering of CUDA attribute on procedures.
diff --git a/flang/test/Lower/HLFIR/elemental-result-length.f90 b/flang/test/Lower/HLFIR/elemental-result-length.f90
index 278ef013d952e1..f320bef5d16188 100644
--- a/flang/test/Lower/HLFIR/elemental-result-length.f90
+++ b/flang/test/Lower/HLFIR/elemental-result-length.f90
@@ -1,4 +1,4 @@
-! RUN: bbc -emit-hlfir -o - %s | fir-opt --canonicalize | FileCheck %s
+! RUN: bbc -emit-hlfir -o - %s | fir-test-opt --canonicalize | FileCheck %s
module m1
contains
diff --git a/flang/test/Lower/HLFIR/internal-procedures-bindc-host.f90 b/flang/test/Lower/HLFIR/internal-procedures-bindc-host.f90
index 07f60b98b0941f..0ff8af3236cc43 100644
--- a/flang/test/Lower/HLFIR/internal-procedures-bindc-host.f90
+++ b/flang/test/Lower/HLFIR/internal-procedures-bindc-host.f90
@@ -2,7 +2,7 @@
! and host procedure in FIR even when BIND(C) is involved.
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
-! RUN: bbc -emit-hlfir -o - %s | fir-opt -external-name-interop -o - |FileCheck %s --check-prefix=AFTER_RENAME_PASS
+! RUN: bbc -emit-hlfir -o - %s | fir-test-opt -external-name-interop -o - |FileCheck %s --check-prefix=AFTER_RENAME_PASS
subroutine foo() bind(c, name="some_c_name")
call bar()
diff --git a/flang/test/Lower/HLFIR/substrings.f90 b/flang/test/Lower/HLFIR/substrings.f90
index 1a423ebe01bea0..b10698f33073d2 100644
--- a/flang/test/Lower/HLFIR/substrings.f90
+++ b/flang/test/Lower/HLFIR/substrings.f90
@@ -1,7 +1,7 @@
! Test lowering of substrings to HLFIR
! Note: cse is run to make the expected output more readable by sharing
! the boilerplate between the different susbtring cases.
-! RUN: bbc -emit-hlfir -o - %s | fir-opt -cse -o - | FileCheck %s
+! RUN: bbc -emit-hlfir -o - %s | fir-test-opt -cse -o - | FileCheck %s
! CHECK-LABEL: func.func @_QPcst_len(
subroutine cst_len(array, scalar)
diff --git a/flang/test/Lower/Intrinsics/achar.f90 b/flang/test/Lower/Intrinsics/achar.f90
index 32cf30dde9ab22..6922ee58168a36 100644
--- a/flang/test/Lower/Intrinsics/achar.f90
+++ b/flang/test/Lower/Intrinsics/achar.f90
@@ -1,5 +1,5 @@
-! RUN: bbc -emit-fir -hlfir=false %s -o - | fir-opt --canonicalize | FileCheck %s
-! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | fir-opt --canonicalize | FileCheck %s
+! RUN: bbc -emit-fir -hlfir=false %s -o - | fir-test-opt --canonicalize | FileCheck %s
+! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | fir-test-opt --canonicalize | FileCheck %s
! CHECK-LABEL: func.func @_QPtest1(
diff --git a/flang/test/Lower/OpenMP/cfg-conversion-omp.private.f90 b/flang/test/Lower/OpenMP/cfg-conversion-omp.private.f90
index 44036492f55957..a9d012d34356f3 100644
--- a/flang/test/Lower/OpenMP/cfg-conversion-omp.private.f90
+++ b/flang/test/Lower/OpenMP/cfg-conversion-omp.private.f90
@@ -4,10 +4,10 @@
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: -o - test.f90 2>&1 | \
-! RUN: fir-opt --cfg-conversion -o test.cfg-conv.mlir
+! RUN: fir-test-opt --cfg-conversion -o test.cfg-conv.mlir
! RUN: FileCheck --input-file=test.cfg-conv.mlir %s --check-prefix="CFGConv"
-! RUN: fir-opt --convert-hlfir-to-fir --cg-rewrite --fir-to-llvm-ir test.cfg-conv.mlir -o - | \
+! RUN: fir-test-opt --convert-hlfir-to-fir --cg-rewrite --fir-to-llvm-ir test.cfg-conv.mlir -o - | \
! RUN: FileCheck %s --check-prefix="LLVMDialect"
!--- test.f90
diff --git a/flang/test/Lower/array-character.f90 b/flang/test/Lower/array-character.f90
index 53adc5c02958c3..3c88f781aa0db0 100644
--- a/flang/test/Lower/array-character.f90
+++ b/flang/test/Lower/array-character.f90
@@ -1,4 +1,4 @@
-! RUN: bbc -hlfir=false -fwrapv %s -o - | fir-opt --canonicalize --cse | FileCheck %s
+! RUN: bbc -hlfir=false -fwrapv %s -o - | fir-test-opt --canonicalize --cse | FileCheck %s
! CHECK-LABEL: func @_QPissue(
! CHECK-SAME: %[[VAL_0:.*]]: !fir.boxchar<1>{{.*}}, %[[VAL_1:.*]]: !fir.boxchar<1>{{.*}}) {
diff --git a/flang/test/Lower/select-type-2.f90 b/flang/test/Lower/select-type-2.f90
index 7b4cf96069e53d..6f00d746b20cf1 100644
--- a/flang/test/Lower/select-type-2.f90
+++ b/flang/test/Lower/select-type-2.f90
@@ -1,4 +1,4 @@
-! RUN: bbc -emit-fir -hlfir=false %s -o - | fir-opt --fir-polymorphic-op | FileCheck %s
+! RUN: bbc -emit-fir -hlfir=false %s -o - | fir-test-opt --fir-polymorphic-op | FileCheck %s
module select_type_2
type p1
integer :: a
diff --git a/flang/test/Lower/select-type-2.fir b/flang/test/Lower/select-type-2.fir
index 87b42611752f90..57933b52c0cbc0 100644
--- a/flang/test/Lower/select-type-2.fir
+++ b/flang/test/Lower/select-type-2.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --fir-polymorphic-op %s | FileCheck %s
+// RUN: fir-test-opt --fir-polymorphic-op %s | FileCheck %s
// Test that cf.br for the default select case passes the blocks argument
// as expected.
diff --git a/flang/test/Lower/select-type.f90 b/flang/test/Lower/select-type.f90
index e4ff2fef0efd3f..6c59b46666bea4 100644
--- a/flang/test/Lower/select-type.f90
+++ b/flang/test/Lower/select-type.f90
@@ -1,5 +1,5 @@
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
-! RUN: bbc -emit-fir -hlfir=false %s -o - | fir-opt --fir-polymorphic-op | FileCheck --check-prefix=CFG %s
+! RUN: bbc -emit-fir -hlfir=false %s -o - | fir-test-opt --fir-polymorphic-op | FileCheck --check-prefix=CFG %s
module select_type_lower_test
type p1
integer :: a
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-alloca.mlir b/flang/test/Transforms/OpenMP/lower-workshare-alloca.mlir
index 82daa142042a30..4de8f33919eea3 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-alloca.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-alloca.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Checks that fir.alloca is hoisted out and copyprivate'd
func.func @wsfunc() {
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-binding.mlir b/flang/test/Transforms/OpenMP/lower-workshare-binding.mlir
index f1d0e8e2296140..4cb22cb71e82eb 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-binding.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-binding.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Checks that the omp.workshare.loop_wrapper binds to the correct omp.workshare
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-cleanup.mlir b/flang/test/Transforms/OpenMP/lower-workshare-cleanup.mlir
index ca288917a3ac49..fa1b9bdee4e201 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-cleanup.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-cleanup.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Check that we cleanup unused pure operations from the parallel and single
// regions
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-copyprivate.mlir b/flang/test/Transforms/OpenMP/lower-workshare-copyprivate.mlir
index d7a04e198ceed9..6c66647137cd05 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-copyprivate.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-copyprivate.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Check if we store the correct values
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-correct-parallelize.mlir b/flang/test/Transforms/OpenMP/lower-workshare-correct-parallelize.mlir
index 31db8213b5f001..883746491bb583 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-correct-parallelize.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-correct-parallelize.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Check that the safe to parallelize `fir.declare` op will not be parallelized
// due to its operand %alloc not being reloaded outside the omp.single.
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-nested.mlir b/flang/test/Transforms/OpenMP/lower-workshare-nested.mlir
index bfd65f04d94b12..9f637401e89e3a 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-nested.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-nested.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Checks that the nested loop_wrapper gets parallelized
func.func @wsfunc(%cond : i1) {
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-no-single.mlir b/flang/test/Transforms/OpenMP/lower-workshare-no-single.mlir
index 1fd379a6e5eb48..d0c633b4ea2060 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-no-single.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-no-single.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Check that we do not emit an omp.single for the constant operation
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-nowait.mlir b/flang/test/Transforms/OpenMP/lower-workshare-nowait.mlir
index 940662e0bdccc2..bc0d9a07cfb01c 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-nowait.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-nowait.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Check that we correctly handle nowait
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg-dom.mlir b/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg-dom.mlir
index 83c49cd635d082..5a4ade6f17c61b 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg-dom.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg-dom.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s 2>&1 | FileCheck %s
+// RUN: fir-test-opt --lower-workshare --allow-unregistered-dialect %s 2>&1 | FileCheck %s
// CHECK: warning: omp workshare with unstructured control flow is currently unsupported and will be serialized.
diff --git a/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg.mlir b/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg.mlir
index a27cf880694014..07216631a1c455 100644
--- a/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg.mlir
+++ b/flang/test/Transforms/OpenMP/lower-workshare-todo-cfg.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --lower-workshare --allow-unregistered-dialect %s 2>&1 | FileCheck %s
+// RUN: fir-test-opt --lower-workshare --allow-unregistered-dialect %s 2>&1 | FileCheck %s
// CHECK: warning: omp workshare with unstructured control flow is currently unsupported and will be serialized.
diff --git a/flang/test/Transforms/OpenMP/should-use-workshare-lowering.mlir b/flang/test/Transforms/OpenMP/should-use-workshare-lowering.mlir
index 91b08123cce422..386f5c8d798327 100644
--- a/flang/test/Transforms/OpenMP/should-use-workshare-lowering.mlir
+++ b/flang/test/Transforms/OpenMP/should-use-workshare-lowering.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --bufferize-hlfir %s | FileCheck %s
+// RUN: fir-test-opt --bufferize-hlfir %s | FileCheck %s
// Checks that we correctly identify when to use the lowering to
// omp.workshare.loop_wrapper
diff --git a/flang/test/Transforms/constant-argument-globalisation-2.fir b/flang/test/Transforms/constant-argument-globalisation-2.fir
index 03e08a0dcb914b..74d3ed5309da20 100644
--- a/flang/test/Transforms/constant-argument-globalisation-2.fir
+++ b/flang/test/Transforms/constant-argument-globalisation-2.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --constant-argument-globalisation-opt < %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --constant-argument-globalisation-opt < %s | FileCheck %s
module {
// Test for "two conditional writes to the same alloca doesn't get replaced."
diff --git a/flang/test/Transforms/constant-argument-globalisation.fir b/flang/test/Transforms/constant-argument-globalisation.fir
index 5656de0f601e73..69d56966df0e67 100644
--- a/flang/test/Transforms/constant-argument-globalisation.fir
+++ b/flang/test/Transforms/constant-argument-globalisation.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --constant-argument-globalisation-opt < %s | FileCheck %s
+// RUN: fir-test-opt --constant-argument-globalisation-opt < %s | FileCheck %s
// RUN: %flang_fc1 -emit-llvm -flang-deprecated-no-hlfir -O2 -o - %s | FileCheck --check-prefix=DISABLE %s
module {
func.func @sub1(%arg0: !fir.ref<i32> {fir.bindc_name = "x"}, %arg1: !fir.ref<i32> {fir.bindc_name = "y"}) {
diff --git a/flang/test/Transforms/debug-107988.fir b/flang/test/Transforms/debug-107988.fir
index 0ba4296138f503..def7656536459e 100644
--- a/flang/test/Transforms/debug-107988.fir
+++ b/flang/test/Transforms/debug-107988.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @test(%arg0: !fir.ref<!fir.char<1,?>> {fir.bindc_name = "str"}, %arg1: i64) {
diff --git a/flang/test/Transforms/debug-92391.fir b/flang/test/Transforms/debug-92391.fir
index 2d83be995a0f67..d8a02c108c8549 100644
--- a/flang/test/Transforms/debug-92391.fir
+++ b/flang/test/Transforms/debug-92391.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>, #dlti.dl_entry<"dlti.endianness", "little">>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"} {
func.func @my_square_(%arg0: !fir.ref<i32> {fir.bindc_name = "x"} ) -> i32 attributes {fir.internal_name = "_QPmy_square"} {
diff --git a/flang/test/Transforms/debug-96314.fir b/flang/test/Transforms/debug-96314.fir
index e2d0f24a1105cd..0578ee265cc206 100644
--- a/flang/test/Transforms/debug-96314.fir
+++ b/flang/test/Transforms/debug-96314.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QMhelperPmod_sub(%arg0: !fir.ref<i32> {fir.bindc_name = "a"} ) {
diff --git a/flang/test/Transforms/debug-allocatable-1.fir b/flang/test/Transforms/debug-allocatable-1.fir
index fd0beaddcdb707..d87c2781289f5e 100644
--- a/flang/test/Transforms/debug-allocatable-1.fir
+++ b/flang/test/Transforms/debug-allocatable-1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
diff --git a/flang/test/Transforms/debug-assumed-rank-array.fir b/flang/test/Transforms/debug-assumed-rank-array.fir
index ce474cd259619b..4506f899f1c338 100644
--- a/flang/test/Transforms/debug-assumed-rank-array.fir
+++ b/flang/test/Transforms/debug-assumed-rank-array.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QFPfn(%arg0: !fir.box<!fir.array<*:i32>> ) {
diff --git a/flang/test/Transforms/debug-assumed-shape-array-2.fir b/flang/test/Transforms/debug-assumed-shape-array-2.fir
index 212a3453d110dc..7ba76b06465182 100644
--- a/flang/test/Transforms/debug-assumed-shape-array-2.fir
+++ b/flang/test/Transforms/debug-assumed-shape-array-2.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
// Test assumed shape array with variable lower bound.
diff --git a/flang/test/Transforms/debug-assumed-shape-array.fir b/flang/test/Transforms/debug-assumed-shape-array.fir
index cb3927a7d79cf3..4d3cc5269d8e22 100644
--- a/flang/test/Transforms/debug-assumed-shape-array.fir
+++ b/flang/test/Transforms/debug-assumed-shape-array.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>, #dlti.dl_entry<"dlti.endianness", "little">>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"} {
func.func @ff_(%arg0: !fir.box<!fir.array<?x?xi32>> {fir.bindc_name = "arr"}, %arg1: !fir.box<!fir.array<?x?xi32>> {fir.bindc_name = "arr1"}) {
diff --git a/flang/test/Transforms/debug-assumed-size-array.fir b/flang/test/Transforms/debug-assumed-size-array.fir
index 892502cb64a595..36795d3d605c9c 100644
--- a/flang/test/Transforms/debug-assumed-size-array.fir
+++ b/flang/test/Transforms/debug-assumed-size-array.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QMhelperPfn(%arg0: !fir.ref<!fir.array<5x?xi32>> {fir.bindc_name = "a1"}, %arg1: !fir.ref<!fir.array<?xi32>> {fir.bindc_name = "a2"}, %arg2: !fir.ref<!fir.array<2x?xi32>> {fir.bindc_name = "a3"}) {
diff --git a/flang/test/Transforms/debug-char-type-1.fir b/flang/test/Transforms/debug-char-type-1.fir
index 630b52d96cb858..b21e4467fa934c 100644
--- a/flang/test/Transforms/debug-char-type-1.fir
+++ b/flang/test/Transforms/debug-char-type-1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
fir.global @_QMhelperEstr1 : !fir.char<1,40> {
diff --git a/flang/test/Transforms/debug-class-type.fir b/flang/test/Transforms/debug-class-type.fir
index aad15a831fd2fa..9aec1c51fff91b 100644
--- a/flang/test/Transforms/debug-class-type.fir
+++ b/flang/test/Transforms/debug-class-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
fir.type_info @_QTtest_type nofinal : !fir.type<_QTtest_type{a:i32,b:!fir.box<!fir.heap<!fir.array<?x?xf32>>>}> dispatch_table {
diff --git a/flang/test/Transforms/debug-complex-1.fir b/flang/test/Transforms/debug-complex-1.fir
index 633f27af99fb16..8947ff30d4ec13 100644
--- a/flang/test/Transforms/debug-complex-1.fir
+++ b/flang/test/Transforms/debug-complex-1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
// check conversion of complex type of different size. Both fir and mlir
// variants are checked.
diff --git a/flang/test/Transforms/debug-derived-type-1.fir b/flang/test/Transforms/debug-derived-type-1.fir
index cfbd361a91e726..117d388e66df05 100644
--- a/flang/test/Transforms/debug-derived-type-1.fir
+++ b/flang/test/Transforms/debug-derived-type-1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
// Only enabled on x86_64
// REQUIRES: x86-registered-target
diff --git a/flang/test/Transforms/debug-derived-type-2.fir b/flang/test/Transforms/debug-derived-type-2.fir
index 63e842619edbec..fc4e4d1361538b 100644
--- a/flang/test/Transforms/debug-derived-type-2.fir
+++ b/flang/test/Transforms/debug-derived-type-2.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
fir.global @_QMmEvar : !fir.type<_QMmTt1{elm:!fir.array<5xi32>,elm2:!fir.array<5x8xi32>}> {} loc(#loc1)
diff --git a/flang/test/Transforms/debug-extra-global.fir b/flang/test/Transforms/debug-extra-global.fir
index d3bc22ad0c59b0..f20a172a089fa2 100644
--- a/flang/test/Transforms/debug-extra-global.fir
+++ b/flang/test/Transforms/debug-extra-global.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
fir.global linkonce_odr @_QFEXnXxcx constant target : !fir.char<1,3> {
diff --git a/flang/test/Transforms/debug-fixed-array-type.fir b/flang/test/Transforms/debug-fixed-array-type.fir
index a15975c7cc92af..2e6031b3ffc7ee 100644
--- a/flang/test/Transforms/debug-fixed-array-type.fir
+++ b/flang/test/Transforms/debug-fixed-array-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
diff --git a/flang/test/Transforms/debug-fn-info.fir b/flang/test/Transforms/debug-fn-info.fir
index 85cfd13643ec3f..4595682b4c8916 100644
--- a/flang/test/Transforms/debug-fn-info.fir
+++ b/flang/test/Transforms/debug-fn-info.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
diff --git a/flang/test/Transforms/debug-imported-entity.fir b/flang/test/Transforms/debug-imported-entity.fir
index 7be6531a703a89..e93030deae2efa 100644
--- a/flang/test/Transforms/debug-imported-entity.fir
+++ b/flang/test/Transforms/debug-imported-entity.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
diff --git a/flang/test/Transforms/debug-index-type.fir b/flang/test/Transforms/debug-index-type.fir
index 20bd8471d7cf64..801cc516ae7953 100644
--- a/flang/test/Transforms/debug-index-type.fir
+++ b/flang/test/Transforms/debug-index-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func private @str(%arg0: index) -> i32 loc(#loc1)
diff --git a/flang/test/Transforms/debug-line-table-existing.fir b/flang/test/Transforms/debug-line-table-existing.fir
index 0e006303c8a81d..b3dad789cd3259 100644
--- a/flang/test/Transforms/debug-line-table-existing.fir
+++ b/flang/test/Transforms/debug-line-table-existing.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
// REQUIRES: system-linux
// Test that there are no changes to a function with existed fused loc debug
diff --git a/flang/test/Transforms/debug-line-table-inc-file.fir b/flang/test/Transforms/debug-line-table-inc-file.fir
index 216cd5e016f2f8..af7af2274020c2 100644
--- a/flang/test/Transforms/debug-line-table-inc-file.fir
+++ b/flang/test/Transforms/debug-line-table-inc-file.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --add-debug-info="debug-level=LineTablesOnly" --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info="debug-level=LineTablesOnly" --mlir-print-debuginfo %s | FileCheck %s
// REQUIRES: system-linux
// Test for included functions that have a different debug location than the current file
diff --git a/flang/test/Transforms/debug-line-table-inc-same-file.fir b/flang/test/Transforms/debug-line-table-inc-same-file.fir
index bcaf4497982310..694938fca81f8e 100644
--- a/flang/test/Transforms/debug-line-table-inc-same-file.fir
+++ b/flang/test/Transforms/debug-line-table-inc-same-file.fir
@@ -1,5 +1,5 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
// REQUIRES: system-linux
// Test that there is only one FileAttribute generated for multiple functions
diff --git a/flang/test/Transforms/debug-line-table.fir b/flang/test/Transforms/debug-line-table.fir
index d6e54fd1ac467e..c7de3946901509 100644
--- a/flang/test/Transforms/debug-line-table.fir
+++ b/flang/test/Transforms/debug-line-table.fir
@@ -1,7 +1,7 @@
-// RUN: fir-opt --add-debug-info="debug-level=Full" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=FULL
-// RUN: fir-opt --add-debug-info="debug-level=LineTablesOnly" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=LINETABLE
-// RUN: fir-opt --add-debug-info="is-optimized=true" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=OPT
+// RUN: fir-test-opt --add-debug-info="debug-level=Full" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=FULL
+// RUN: fir-test-opt --add-debug-info="debug-level=LineTablesOnly" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=LINETABLE
+// RUN: fir-test-opt --add-debug-info="is-optimized=true" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=OPT
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QPsb() {
diff --git a/flang/test/Transforms/debug-local-global-storage-1.fir b/flang/test/Transforms/debug-local-global-storage-1.fir
index 2638464dbab0b8..b2d65736e81ae1 100644
--- a/flang/test/Transforms/debug-local-global-storage-1.fir
+++ b/flang/test/Transforms/debug-local-global-storage-1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<i64, dense<64> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr<272>, dense<64> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<271>, dense<32> : vector<4xi64>>, #dlti.dl_entry<!llvm.ptr<270>, dense<32> : vector<4xi64>>, #dlti.dl_entry<f128, dense<128> : vector<2xi64>>, #dlti.dl_entry<f80, dense<128> : vector<2xi64>>, #dlti.dl_entry<i128, dense<128> : vector<2xi64>>, #dlti.dl_entry<i8, dense<8> : vector<2xi64>>, #dlti.dl_entry<!llvm.ptr, dense<64> : vector<4xi64>>, #dlti.dl_entry<i1, dense<8> : vector<2xi64>>, #dlti.dl_entry<f16, dense<16> : vector<2xi64>>, #dlti.dl_entry<f64, dense<64> : vector<2xi64>>, #dlti.dl_entry<i32, dense<32> : vector<2xi64>>, #dlti.dl_entry<i16, dense<16> : vector<2xi64>>, #dlti.dl_entry<"dlti.stack_alignment", 128 : i64>, #dlti.dl_entry<"dlti.endianness", "little">>, fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"} {
func.func @_QMexamplePmod_sub() {
diff --git a/flang/test/Transforms/debug-local-var.fir b/flang/test/Transforms/debug-local-var.fir
index b7a1ff7185a637..699a599cfd61db 100644
--- a/flang/test/Transforms/debug-local-var.fir
+++ b/flang/test/Transforms/debug-local-var.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
diff --git a/flang/test/Transforms/debug-module-1.fir b/flang/test/Transforms/debug-module-1.fir
index 71457d32b15960..319447e0c294dd 100644
--- a/flang/test/Transforms/debug-module-1.fir
+++ b/flang/test/Transforms/debug-module-1.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
diff --git a/flang/test/Transforms/debug-module-2.fir b/flang/test/Transforms/debug-module-2.fir
index c8d618ce34b266..db4bd0f8207f9b 100644
--- a/flang/test/Transforms/debug-module-2.fir
+++ b/flang/test/Transforms/debug-module-2.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" --mlir-print-debuginfo %s | FileCheck %s
module {
fir.global @_QMhelperEgli : i32 {
diff --git a/flang/test/Transforms/debug-ptr-type.fir b/flang/test/Transforms/debug-ptr-type.fir
index 64e64cb1a19aee..cd1157ef24ba5d 100644
--- a/flang/test/Transforms/debug-ptr-type.fir
+++ b/flang/test/Transforms/debug-ptr-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
fir.global @_QMhelperEpar : !fir.box<!fir.ptr<!fir.array<?x?xf32>>> {
diff --git a/flang/test/Transforms/debug-ref-type.fir b/flang/test/Transforms/debug-ref-type.fir
index 2b3af485385d8a..1b7a41f30d421d 100644
--- a/flang/test/Transforms/debug-ref-type.fir
+++ b/flang/test/Transforms/debug-ref-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func private @_FortranAioBeginExternalListOutput(i8) -> !fir.ref<i8> loc(#loc1)
diff --git a/flang/test/Transforms/debug-tuple-type.fir b/flang/test/Transforms/debug-tuple-type.fir
index c9b0d16c06e1ae..5cea5ecdb696ef 100644
--- a/flang/test/Transforms/debug-tuple-type.fir
+++ b/flang/test/Transforms/debug-tuple-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func private @fn1(!fir.ref<tuple<f64, f64>>)
diff --git a/flang/test/Transforms/debug-variable-array-dim.fir b/flang/test/Transforms/debug-variable-array-dim.fir
index 1f401041dee575..11023aaec61228 100644
--- a/flang/test/Transforms/debug-variable-array-dim.fir
+++ b/flang/test/Transforms/debug-variable-array-dim.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @foo_(%arg0: !fir.ref<!fir.array<?x?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "n"}, %arg2: !fir.ref<i32> {fir.bindc_name = "m"}, %arg3: !fir.ref<i32> {fir.bindc_name = "p"}) attributes {fir.internal_name = "_QPfoo"} {
diff --git a/flang/test/Transforms/debug-variable-char-len.fir b/flang/test/Transforms/debug-variable-char-len.fir
index 9e177d22d5b10e..9820e9b2566c81 100644
--- a/flang/test/Transforms/debug-variable-char-len.fir
+++ b/flang/test/Transforms/debug-variable-char-len.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func @foo(%arg0: !fir.ref<!fir.char<1,?>> {fir.bindc_name = "str1"} , %arg1: !fir.ref<i64> {fir.bindc_name = "len1"} loc("/home/haqadeer/work/fortran/t1/../str.f90":1:1), %arg2: i64) {
diff --git a/flang/test/Transforms/debug-vector-type.fir b/flang/test/Transforms/debug-vector-type.fir
index 63846ce006c6ce..8d2422871165bf 100644
--- a/flang/test/Transforms/debug-vector-type.fir
+++ b/flang/test/Transforms/debug-vector-type.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
+// RUN: fir-test-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
func.func private @foo1(%arg0: !fir.vector<20:bf16>)
diff --git a/flang/test/Transforms/experimental.fir b/flang/test/Transforms/experimental.fir
index 060e348d9d936a..53f593efe9b238 100644
--- a/flang/test/Transforms/experimental.fir
+++ b/flang/test/Transforms/experimental.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --simplify-intrinsics='enable-experimental=true' %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --simplify-intrinsics='enable-experimental=true' %s | FileCheck %s
// check that a simple function compiled with experimental enabled
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.target_triple = "native"} {
diff --git a/flang/test/Transforms/function-attrs.fir b/flang/test/Transforms/function-attrs.fir
index 5f871a1a7b6c50..15728cf8a812bf 100644
--- a/flang/test/Transforms/function-attrs.fir
+++ b/flang/test/Transforms/function-attrs.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --function-attr %s | FileCheck %s
+// RUN: fir-test-opt --function-attr %s | FileCheck %s
// If a function has a body and is not bind(c), and if the dummy argument doesn't have the target,
// asynchronous, volatile, or pointer attribute, then add llvm.nocapture to the dummy argument.
diff --git a/flang/test/Transforms/generic-loop-rewriting-todo.mlir b/flang/test/Transforms/generic-loop-rewriting-todo.mlir
index 9ea6bf001b6685..92582f6984d8d4 100644
--- a/flang/test/Transforms/generic-loop-rewriting-todo.mlir
+++ b/flang/test/Transforms/generic-loop-rewriting-todo.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --omp-generic-loop-conversion -verify-diagnostics %s
+// RUN: fir-test-opt --omp-generic-loop-conversion -verify-diagnostics %s
func.func @_QPtarget_loop() {
%c0 = arith.constant 0 : i32
diff --git a/flang/test/Transforms/generic-loop-rewriting.mlir b/flang/test/Transforms/generic-loop-rewriting.mlir
index a18ea9853602ac..dbde14d2cd34db 100644
--- a/flang/test/Transforms/generic-loop-rewriting.mlir
+++ b/flang/test/Transforms/generic-loop-rewriting.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --omp-generic-loop-conversion %s | FileCheck %s
+// RUN: fir-test-opt --omp-generic-loop-conversion %s | FileCheck %s
omp.private {type = private} @_QFtarget_teams_loopEi_private_ref_i32 : !fir.ref<i32> alloc {
^bb0(%arg0: !fir.ref<i32>):
diff --git a/flang/test/Transforms/loop-versioning.fir b/flang/test/Transforms/loop-versioning.fir
index 2f7c439ed3f4e1..9fc7d2aae606fc 100644
--- a/flang/test/Transforms/loop-versioning.fir
+++ b/flang/test/Transforms/loop-versioning.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --loop-versioning %s | FileCheck %s
+// RUN: fir-test-opt --loop-versioning %s | FileCheck %s
// subroutine sum1d(a, n)
diff --git a/flang/test/Transforms/omp-function-filtering.mlir b/flang/test/Transforms/omp-function-filtering.mlir
index 46291e9321f76a..93b7fd2d1925a0 100644
--- a/flang/test/Transforms/omp-function-filtering.mlir
+++ b/flang/test/Transforms/omp-function-filtering.mlir
@@ -1,4 +1,4 @@
-// RUN: fir-opt -split-input-file --omp-function-filtering %s | FileCheck %s
+// RUN: fir-test-opt -split-input-file --omp-function-filtering %s | FileCheck %s
// CHECK: func.func @any
// CHECK: return
diff --git a/flang/test/Transforms/omp-map-info-finalization-implicit-field.fir b/flang/test/Transforms/omp-map-info-finalization-implicit-field.fir
index bcf8b63075dbf8..b8772a4fa68dae 100644
--- a/flang/test/Transforms/omp-map-info-finalization-implicit-field.fir
+++ b/flang/test/Transforms/omp-map-info-finalization-implicit-field.fir
@@ -1,7 +1,7 @@
// Tests that we implicitly map alloctable fields of a record when referenced in
// a target region.
-// RUN: fir-opt --split-input-file --omp-map-info-finalization %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --omp-map-info-finalization %s | FileCheck %s
!record_t = !fir.type<_QFTrecord_t{
not_to_implicitly_map:
diff --git a/flang/test/Transforms/omp-map-info-finalization.fir b/flang/test/Transforms/omp-map-info-finalization.fir
index a7254bcddd5232..7082e6fe71bad2 100644
--- a/flang/test/Transforms/omp-map-info-finalization.fir
+++ b/flang/test/Transforms/omp-map-info-finalization.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --omp-map-info-finalization %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --omp-map-info-finalization %s | FileCheck %s
func.func @test_descriptor_expansion_pass(%arg0: !fir.box<!fir.array<?xi32>>) {
%0 = fir.alloca !fir.box<!fir.heap<i32>>
diff --git a/flang/test/Transforms/omp-maps-for-privatized-symbols.fir b/flang/test/Transforms/omp-maps-for-privatized-symbols.fir
index d32444aaabf237..b64dbb822a6e6a 100644
--- a/flang/test/Transforms/omp-maps-for-privatized-symbols.fir
+++ b/flang/test/Transforms/omp-maps-for-privatized-symbols.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --omp-maps-for-privatized-symbols %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --omp-maps-for-privatized-symbols %s | FileCheck %s
module attributes {omp.is_target_device = false} {
omp.private {type = private} @_QFtarget_simpleEsimple_var_private_ref_box_heap_i32 : !fir.ref<!fir.box<!fir.heap<i32>>> alloc {
^bb0(%arg0: !fir.ref<!fir.box<!fir.heap<i32>>>):
diff --git a/flang/test/Transforms/omp-reduction-cfg-conversion.fir b/flang/test/Transforms/omp-reduction-cfg-conversion.fir
index cbe599f0da5d22..3ea6283e6f7f37 100644
--- a/flang/test/Transforms/omp-reduction-cfg-conversion.fir
+++ b/flang/test/Transforms/omp-reduction-cfg-conversion.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --cfg-conversion %s | FileCheck %s
+// RUN: fir-test-opt --cfg-conversion %s | FileCheck %s
omp.declare_reduction @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
^bb0(%arg0: !fir.ref<!fir.box<!fir.array<3xi32>>>):
diff --git a/flang/test/Transforms/simplifyintrinsics.fir b/flang/test/Transforms/simplifyintrinsics.fir
index b2af152e5a913d..78ff3092e0040a 100644
--- a/flang/test/Transforms/simplifyintrinsics.fir
+++ b/flang/test/Transforms/simplifyintrinsics.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --simplify-intrinsics %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --simplify-intrinsics %s | FileCheck %s
// Call to SUM with 1D I32 array is replaced.
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.target_triple = "native"} {
diff --git a/flang/test/Transforms/stack-arrays-hlfir.f90 b/flang/test/Transforms/stack-arrays-hlfir.f90
index 296edbaf35417e..e7b99bf43631bb 100644
--- a/flang/test/Transforms/stack-arrays-hlfir.f90
+++ b/flang/test/Transforms/stack-arrays-hlfir.f90
@@ -6,7 +6,7 @@
! RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - \
-! RUN: | fir-opt --lower-hlfir-ordered-assignments \
+! RUN: | fir-test-opt --lower-hlfir-ordered-assignments \
! RUN: --bufferize-hlfir \
! RUN: --convert-hlfir-to-fir \
! RUN: --array-value-copy \
diff --git a/flang/test/Transforms/stack-arrays.f90 b/flang/test/Transforms/stack-arrays.f90
index 2c8a6fc15504a1..a89c4b0dd42b61 100644
--- a/flang/test/Transforms/stack-arrays.f90
+++ b/flang/test/Transforms/stack-arrays.f90
@@ -1,4 +1,4 @@
-! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | fir-opt --array-value-copy | fir-opt --stack-arrays | FileCheck %s
+! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | fir-test-opt --array-value-copy | fir-test-opt --stack-arrays | FileCheck %s
! In order to verify the whole MLIR pipeline, make the driver generate LLVM IR.
! This is only to check that -fstack-arrays enables the stack-arrays pass so
diff --git a/flang/test/Transforms/stack-arrays.fir b/flang/test/Transforms/stack-arrays.fir
index 4a417ed981ab15..62983776344905 100644
--- a/flang/test/Transforms/stack-arrays.fir
+++ b/flang/test/Transforms/stack-arrays.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --stack-arrays %s | FileCheck %s
+// RUN: fir-test-opt --stack-arrays %s | FileCheck %s
// Simplest transformation
func.func @simple() {
diff --git a/flang/test/Transforms/stack-reclaime.fir b/flang/test/Transforms/stack-reclaime.fir
index 96416df8b20135..ae5a4882248712 100644
--- a/flang/test/Transforms/stack-reclaime.fir
+++ b/flang/test/Transforms/stack-reclaime.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --stack-reclaim %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --stack-reclaim %s | FileCheck %s
func.func @alloca_in_loop(%lb : index, %ub : index, %step : index, %b : i1, %addr : !fir.ref<index>) {
fir.do_loop %iv = %lb to %ub step %step unordered {
diff --git a/flang/test/Transforms/tbaa-with-dummy-scope.fir b/flang/test/Transforms/tbaa-with-dummy-scope.fir
index 738692814cde51..0f53b4f1946f49 100644
--- a/flang/test/Transforms/tbaa-with-dummy-scope.fir
+++ b/flang/test/Transforms/tbaa-with-dummy-scope.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --fir-add-alias-tags --split-input-file %s | FileCheck %s
+// RUN: fir-test-opt --fir-add-alias-tags --split-input-file %s | FileCheck %s
// subroutine test(x, y)
// real, target :: x, y
diff --git a/flang/test/Transforms/tbaa.fir b/flang/test/Transforms/tbaa.fir
index f8e16b174e9c74..657ccb16c1b7f7 100644
--- a/flang/test/Transforms/tbaa.fir
+++ b/flang/test/Transforms/tbaa.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --split-input-file --fir-add-alias-tags %s | FileCheck %s
+// RUN: fir-test-opt --split-input-file --fir-add-alias-tags %s | FileCheck %s
// subroutine oneArg(a)
// integer :: a(:)
diff --git a/flang/test/Transforms/tbaa2.fir b/flang/test/Transforms/tbaa2.fir
index 5c2503d69a8bec..6ed8bf5e2e3333 100644
--- a/flang/test/Transforms/tbaa2.fir
+++ b/flang/test/Transforms/tbaa2.fir
@@ -1,5 +1,5 @@
// Test fir alias analysis pass on a larger real life code example (from the RFC)
-// RUN: fir-opt --fir-add-alias-tags %s | FileCheck %s
+// RUN: fir-test-opt --fir-add-alias-tags %s | FileCheck %s
fir.global @_QMmodEa : !fir.box<!fir.heap<!fir.array<?xf32>>> {
%c0 = arith.constant 0 : index
diff --git a/flang/tools/fir-opt/CMakeLists.txt b/flang/tools/fir-opt/CMakeLists.txt
index efbde329b8b8c0..7950aca0d29d2f 100644
--- a/flang/tools/fir-opt/CMakeLists.txt
+++ b/flang/tools/fir-opt/CMakeLists.txt
@@ -3,15 +3,10 @@ llvm_update_compile_flags(fir-opt)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
-if(FLANG_INCLUDE_TESTS)
- set(test_libs
- FIRTestAnalysis
- FIRTestOpenACCInterfaces
- MLIRTestIR
- )
-endif()
+add_library(fir-opt-common INTERFACE)
+target_link_libraries(fir-opt PRIVATE fir-opt-common)
-target_link_libraries(fir-opt PRIVATE
+target_link_libraries(fir-opt-common INTERFACE
CUFAttrs
CUFDialect
FIRDialect
@@ -23,10 +18,9 @@ target_link_libraries(fir-opt PRIVATE
FIROpenACCSupport
FlangOpenMPTransforms
FIRAnalysis
- ${test_libs}
)
-mlir_target_link_libraries(fir-opt PRIVATE
+mlir_target_link_libraries(fir-opt-common INTERFACE
${dialect_libs}
${extension_libs}
@@ -45,3 +39,15 @@ mlir_target_link_libraries(fir-opt PRIVATE
MLIRVectorToLLVM
MLIROptLib
)
+
+if(FLANG_INCLUDE_TESTS)
+ add_flang_executable(fir-test-opt fir-opt.cpp)
+ llvm_update_compile_flags(fir-test-opt)
+ target_compile_definitions(fir-test-opt PRIVATE FIR_TEST_OPT)
+ target_link_libraries(fir-test-opt PRIVATE
+ fir-opt-common
+ FIRTestAnalysis
+ FIRTestOpenACCInterfaces
+ MLIRTestIR
+ )
+endif()
diff --git a/flang/tools/fir-opt/fir-opt.cpp b/flang/tools/fir-opt/fir-opt.cpp
index ef510ff77ad253..b37733562d3704 100644
--- a/flang/tools/fir-opt/fir-opt.cpp
+++ b/flang/tools/fir-opt/fir-opt.cpp
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
fir::registerOptTransformPasses();
hlfir::registerHLFIRPasses();
flangomp::registerFlangOpenMPPasses();
-#ifdef FLANG_INCLUDE_TESTS
+#ifdef FIR_TEST_OPT
fir::test::registerTestFIRAliasAnalysisPass();
fir::test::registerTestFIROpenACCInterfacesPass();
mlir::registerSideEffectTestPasses();
More information about the flang-commits
mailing list