[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 15:05:56 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Paul T Robinson (pogo59)

<details>
<summary>Changes</summary>

Removed foo-registered-target constraints from a bunch of tests, because mostly the driver doesn't need to have a target availabile. I ran check-clang-driver using a build with only the XCore target, and these all passed.

There are ~50 tests that still have foo-registered-target, and it looks like most of them are either doing codegen when they don't need to, or don't really belong in the Driver tests. But that's a task for another day.

---

Patch is 63.54 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/94055.diff


133 Files Affected:

- (modified) clang/test/Driver/aarch64-outliner.c (-1) 
- (modified) clang/test/Driver/amdgcn-gz-options.cl (+1-1) 
- (modified) clang/test/Driver/amdgpu-hip-system-arch.c (-2) 
- (modified) clang/test/Driver/amdgpu-invalid-target-id.s (-3) 
- (modified) clang/test/Driver/amdgpu-macros.cl (-1) 
- (modified) clang/test/Driver/amdgpu-openmp-system-arch-fail.c (-2) 
- (modified) clang/test/Driver/amdgpu-openmp-toolchain.c (-2) 
- (modified) clang/test/Driver/arm-float-abi-runtime-path.c (-2) 
- (modified) clang/test/Driver/arm-float-abi.c (-1) 
- (modified) clang/test/Driver/arm-machine-outliner.c (-1) 
- (modified) clang/test/Driver/cl-options.cu (-3) 
- (modified) clang/test/Driver/clang-offload-bundler-zlib.c (-1) 
- (modified) clang/test/Driver/clang-offload-bundler-zstd.c (-1) 
- (modified) clang/test/Driver/compress-noias.c (-1) 
- (modified) clang/test/Driver/cuda-arch-translation.cu (-3) 
- (modified) clang/test/Driver/cuda-bad-arch.cu (-3) 
- (modified) clang/test/Driver/cuda-bail-out.cu (-3) 
- (modified) clang/test/Driver/cuda-bindings.cu (-3) 
- (modified) clang/test/Driver/cuda-constructor-alias.cu (-3) 
- (modified) clang/test/Driver/cuda-cross-compiling.c (-2) 
- (modified) clang/test/Driver/cuda-detect-path.cu (-2) 
- (modified) clang/test/Driver/cuda-detect.cu (-3) 
- (modified) clang/test/Driver/cuda-external-tools.cu (-3) 
- (modified) clang/test/Driver/cuda-macosx.cu (-3) 
- (modified) clang/test/Driver/cuda-march.cu (-3) 
- (modified) clang/test/Driver/cuda-omp-unsupported-debug-options.cu (-2) 
- (modified) clang/test/Driver/cuda-openmp-driver.cu (-3) 
- (modified) clang/test/Driver/cuda-options.cu (-2) 
- (modified) clang/test/Driver/cuda-output-asm.cu (-3) 
- (modified) clang/test/Driver/cuda-phases.cu (-3) 
- (modified) clang/test/Driver/cuda-ptxas-path.cu (-3) 
- (modified) clang/test/Driver/cuda-version-check.cu (-3) 
- (modified) clang/test/Driver/cuda-windows.cu (-3) 
- (modified) clang/test/Driver/driverkit-arm64.c (-1) 
- (modified) clang/test/Driver/driverkit-arm64e.c (-1) 
- (modified) clang/test/Driver/driverkit-cplusplus.cpp (-1) 
- (modified) clang/test/Driver/driverkit-exceptions.cpp (-1) 
- (modified) clang/test/Driver/driverkit-path.c (-1) 
- (modified) clang/test/Driver/driverkit-rtti.cpp (-1) 
- (modified) clang/test/Driver/driverkit-target-cpu.c (-1) 
- (modified) clang/test/Driver/dwarf-target-version-clamp.cu (-3) 
- (modified) clang/test/Driver/elfiamcu-header-search.c (-2) 
- (modified) clang/test/Driver/global-isel.c (-2) 
- (modified) clang/test/Driver/gpu-libc-headers.c (-3) 
- (modified) clang/test/Driver/hexagon-toolchain-elf.c (-1) 
- (modified) clang/test/Driver/hip-autolink.hip (-3) 
- (modified) clang/test/Driver/hip-binding.hip (-3) 
- (modified) clang/test/Driver/hip-code-object-version.hip (-3) 
- (modified) clang/test/Driver/hip-cuid-hash.hip (-3) 
- (modified) clang/test/Driver/hip-cuid.hip (-3) 
- (modified) clang/test/Driver/hip-default-gpu-arch.hip (-3) 
- (modified) clang/test/Driver/hip-device-compile.hip (-3) 
- (modified) clang/test/Driver/hip-device-libs.hip (-3) 
- (modified) clang/test/Driver/hip-fpie-option.hip (+1-1) 
- (modified) clang/test/Driver/hip-gsplit-dwarf-options.hip (+1-1) 
- (modified) clang/test/Driver/hip-gz-options.hip (+1-1) 
- (modified) clang/test/Driver/hip-host-cpu-features.hip (-3) 
- (modified) clang/test/Driver/hip-include-path.hip (-2) 
- (modified) clang/test/Driver/hip-inputs.hip (-3) 
- (modified) clang/test/Driver/hip-invalid-target-id.hip (-3) 
- (modified) clang/test/Driver/hip-launch-api.hip (-3) 
- (modified) clang/test/Driver/hip-link-bc-to-bc.hip (-2) 
- (modified) clang/test/Driver/hip-link-bundle-archive.hip (-2) 
- (modified) clang/test/Driver/hip-link-save-temps.hip (-3) 
- (modified) clang/test/Driver/hip-link-static-library.hip (-3) 
- (modified) clang/test/Driver/hip-no-device-libs.hip (-3) 
- (modified) clang/test/Driver/hip-offload-arch.hip (-2) 
- (modified) clang/test/Driver/hip-offload-compress-zlib.hip (-2) 
- (modified) clang/test/Driver/hip-offload-compress-zstd.hip (-2) 
- (modified) clang/test/Driver/hip-options.hip (+1-4) 
- (modified) clang/test/Driver/hip-output-file-name.hip (-3) 
- (modified) clang/test/Driver/hip-phases.hip (-3) 
- (modified) clang/test/Driver/hip-printf.hip (-3) 
- (modified) clang/test/Driver/hip-rdc-device-only.hip (-3) 
- (modified) clang/test/Driver/hip-sanitize-options.hip (-2) 
- (modified) clang/test/Driver/hip-save-temps.hip (-3) 
- (modified) clang/test/Driver/hip-std.hip (-3) 
- (modified) clang/test/Driver/hip-syntax-only.hip (-3) 
- (modified) clang/test/Driver/hip-target-id.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-device-only.hip (-2) 
- (modified) clang/test/Driver/hip-toolchain-dwarf.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-features.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-mllvm.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-no-rdc.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-opt.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-rdc-separate.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-rdc-static-lib.hip (-3) 
- (modified) clang/test/Driver/hip-toolchain-rdc.hip (-3) 
- (modified) clang/test/Driver/hip-unbundle-preproc.hipi (-2) 
- (modified) clang/test/Driver/hip-wavefront-size.hip (-2) 
- (modified) clang/test/Driver/hip-windows-filename.hip (+1-1) 
- (modified) clang/test/Driver/hipspv-device-libs.hip (-1) 
- (modified) clang/test/Driver/hipspv-pass-plugin.hip (-1) 
- (modified) clang/test/Driver/hipspv-toolchain-rdc.hip (-1) 
- (modified) clang/test/Driver/hipspv-toolchain.hip (-1) 
- (modified) clang/test/Driver/indirect-tls-seg-refs.c (-2) 
- (modified) clang/test/Driver/invalid-offload-options.cpp (-1) 
- (modified) clang/test/Driver/invalid-target-id.cl (-3) 
- (modified) clang/test/Driver/lto.cu (-3) 
- (modified) clang/test/Driver/m68k-features.cpp (-1) 
- (modified) clang/test/Driver/mbackchain.c (-1) 
- (modified) clang/test/Driver/mips-abi.c (-2) 
- (modified) clang/test/Driver/mips-abicalls-warning.c (-1) 
- (modified) clang/test/Driver/mips-cs.cpp (-2) 
- (modified) clang/test/Driver/mips-fsf.cpp (-2) 
- (modified) clang/test/Driver/mips-gpopt-warning.c (-1) 
- (modified) clang/test/Driver/mips-img-v2.cpp (-2) 
- (modified) clang/test/Driver/mips-img.cpp (-2) 
- (modified) clang/test/Driver/mips-indirect-branch.c (-1) 
- (modified) clang/test/Driver/mips-mti-linux.c (-1) 
- (modified) clang/test/Driver/msan.c (-2) 
- (modified) clang/test/Driver/nvptx-cuda-system-arch.c (-2) 
- (modified) clang/test/Driver/openmp-offload-headers.c (-3) 
- (modified) clang/test/Driver/openmp-offload-infer.c (-4) 
- (modified) clang/test/Driver/openmp-offload-jit.c (-4) 
- (modified) clang/test/Driver/openmp-offload.c (-4) 
- (modified) clang/test/Driver/openmp-system-arch.c (-3) 
- (modified) clang/test/Driver/ppc-dependent-options.cpp (-1) 
- (modified) clang/test/Driver/ppc-float-abi-warning.cpp (-1) 
- (modified) clang/test/Driver/ppc-unsupported.c (-1) 
- (modified) clang/test/Driver/riscv32-toolchain-extra.c (+1-1) 
- (modified) clang/test/Driver/riscv64-toolchain-extra.c (+1-1) 
- (modified) clang/test/Driver/rocm-detect.cl (-2) 
- (modified) clang/test/Driver/rocm-detect.hip (-2) 
- (modified) clang/test/Driver/rocm-device-libs.cl (-1) 
- (modified) clang/test/Driver/save-temps.c (-3) 
- (modified) clang/test/Driver/sysroot.c (-2) 
- (modified) clang/test/Driver/target-id-macros.cl (-3) 
- (modified) clang/test/Driver/target-id.cl (-3) 
- (modified) clang/test/Driver/thinlto.cu (-3) 
- (modified) clang/test/Driver/tsan.c (-2) 
- (modified) clang/test/Driver/ve-toolchain.c (-1) 
- (modified) clang/test/Driver/ve-toolchain.cpp (-1) 


``````````diff
diff --git a/clang/test/Driver/aarch64-outliner.c b/clang/test/Driver/aarch64-outliner.c
index 06e5de11ec49e..c5d28d121513f 100644
--- a/clang/test/Driver/aarch64-outliner.c
+++ b/clang/test/Driver/aarch64-outliner.c
@@ -1,4 +1,3 @@
-// REQUIRES: aarch64-registered-target
 // RUN: %clang --target=aarch64 -moutline -S %s -### 2>&1 | FileCheck %s -check-prefix=ON
 // RUN: %clang --target=aarch64_be -moutline -S %s -### 2>&1 | FileCheck %s -check-prefix=ON
 // ON: "-mllvm" "-enable-machine-outliner"
diff --git a/clang/test/Driver/amdgcn-gz-options.cl b/clang/test/Driver/amdgcn-gz-options.cl
index 8ffd58af509db..ece3ac17e8018 100644
--- a/clang/test/Driver/amdgcn-gz-options.cl
+++ b/clang/test/Driver/amdgcn-gz-options.cl
@@ -1,4 +1,4 @@
-// REQUIRES: zlib, amdgpu-registered-target
+// REQUIRES: zlib
 
 // RUN: %clang -### -target amdgcn-amd-amdhsa -gz=none -x assembler %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_NONE %s
 // RUN: %clang -### -target amdgcn-amd-amdhsa -gz=none -nogpulib %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_NONE %s
diff --git a/clang/test/Driver/amdgpu-hip-system-arch.c b/clang/test/Driver/amdgpu-hip-system-arch.c
index 6b2955c274135..a46077b38fac0 100644
--- a/clang/test/Driver/amdgpu-hip-system-arch.c
+++ b/clang/test/Driver/amdgpu-hip-system-arch.c
@@ -1,6 +1,4 @@
 // REQUIRES: system-linux
-// REQUIRES: x86-registered-target
-// REQUIRES: amdgpu-registered-target
 // REQUIRES: shell
 
 // RUN: mkdir -p %t
diff --git a/clang/test/Driver/amdgpu-invalid-target-id.s b/clang/test/Driver/amdgpu-invalid-target-id.s
index 5d4b188f9ef1d..7d1d8e4772338 100644
--- a/clang/test/Driver/amdgpu-invalid-target-id.s
+++ b/clang/test/Driver/amdgpu-invalid-target-id.s
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: amdgpu-registered-target
-
 // RUN: not %clang -target amdgcn-amd-amdhsa \
 // RUN:   -mcpu=gfx908xnack -nostdlib \
 // RUN:   %s 2>&1 | FileCheck -check-prefix=NOPLUS %s
diff --git a/clang/test/Driver/amdgpu-macros.cl b/clang/test/Driver/amdgpu-macros.cl
index 3dbe10dfcf1dc..a878a7decee95 100644
--- a/clang/test/Driver/amdgpu-macros.cl
+++ b/clang/test/Driver/amdgpu-macros.cl
@@ -1,4 +1,3 @@
-// REQUIRES: amdgpu-registered-target
 // Check that appropriate macros are defined for every supported AMDGPU
 // "-target" and "-mcpu" options.
 
diff --git a/clang/test/Driver/amdgpu-openmp-system-arch-fail.c b/clang/test/Driver/amdgpu-openmp-system-arch-fail.c
index f760683e47611..85c82e4598cb1 100644
--- a/clang/test/Driver/amdgpu-openmp-system-arch-fail.c
+++ b/clang/test/Driver/amdgpu-openmp-system-arch-fail.c
@@ -1,6 +1,4 @@
 // REQUIRES: system-linux
-// REQUIRES: x86-registered-target
-// REQUIRES: amdgpu-registered-target
 // REQUIRES: shell
 
 // RUN: mkdir -p %t
diff --git a/clang/test/Driver/amdgpu-openmp-toolchain.c b/clang/test/Driver/amdgpu-openmp-toolchain.c
index 849afb871ddbf..ef58c2c4e3f3a 100644
--- a/clang/test/Driver/amdgpu-openmp-toolchain.c
+++ b/clang/test/Driver/amdgpu-openmp-toolchain.c
@@ -1,5 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: amdgpu-registered-target
 // RUN:   %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \
 // RUN:          -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib -nogpulib %s 2>&1 \
 // RUN:   | FileCheck %s
diff --git a/clang/test/Driver/arm-float-abi-runtime-path.c b/clang/test/Driver/arm-float-abi-runtime-path.c
index d4a48601a04b4..029fe19690f9b 100644
--- a/clang/test/Driver/arm-float-abi-runtime-path.c
+++ b/clang/test/Driver/arm-float-abi-runtime-path.c
@@ -1,8 +1,6 @@
 /// Check that libraries built with the per target runtime directory layout
 /// are selected correctly when using variations of Arm triples.
 
-// REQUIRES: arm-registered-target
-
 // RUN: %clang %s --target=arm-unknown-linux-gnueabihf -print-runtime-dir \
 // RUN:        -resource-dir=%S/Inputs/arm_float_abi_runtime_path 2>&1 | FileCheck -check-prefix=ARMHF %s
 /// "armv7l" should be normalised to just "arm".
diff --git a/clang/test/Driver/arm-float-abi.c b/clang/test/Driver/arm-float-abi.c
index 806ef0fbd93e6..35bd71415774c 100644
--- a/clang/test/Driver/arm-float-abi.c
+++ b/clang/test/Driver/arm-float-abi.c
@@ -1,4 +1,3 @@
-// REQUIRES: arm-registered-target
 // RUN: not %clang %s -target armv7-apple-ios -mfloat-abi=hard 2>&1 | FileCheck -check-prefix=ARMV7-ERROR %s
 // RUN: %clang %s -target armv7-apple-ios -mfloat-abi=softfp -### 2>&1 | FileCheck -check-prefix=NOERROR %s
 // RUN: %clang %s -arch armv7 -target thumbv7-apple-darwin-eabi -mfloat-abi=hard -### 2>&1 | FileCheck -check-prefix=NOERROR %s
diff --git a/clang/test/Driver/arm-machine-outliner.c b/clang/test/Driver/arm-machine-outliner.c
index 6ac82838323a9..a1e705cb60a1b 100644
--- a/clang/test/Driver/arm-machine-outliner.c
+++ b/clang/test/Driver/arm-machine-outliner.c
@@ -1,4 +1,3 @@
-// REQUIRES: arm-registered-target
 // RUN: %clang -target armv7-linux-gnueabihf -moutline -c %s -### 2>&1 | FileCheck %s -check-prefix=ON
 // ON: "-mllvm" "-enable-machine-outliner"
 // RUN: %clang -target armv7-linux-gnueabihf -flto -moutline %s -### 2>&1 | FileCheck %s -check-prefix=ON-LTO
diff --git a/clang/test/Driver/cl-options.cu b/clang/test/Driver/cl-options.cu
index 8b0c2ba421b36..b241ec6672d85 100644
--- a/clang/test/Driver/cl-options.cu
+++ b/clang/test/Driver/cl-options.cu
@@ -3,9 +3,6 @@
 // Note: %s must be preceded by --, otherwise it may be interpreted as a
 // command-line option, e.g. on Mac where %s is commonly under /Users.
 
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // -stack-protector should not be passed to device-side CUDA compilation
 // RUN: not %clang_cl -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=GS-default %s
 // GS-default: "-cc1" "-triple" "nvptx{{(64)?}}-nvidia-cuda"
diff --git a/clang/test/Driver/clang-offload-bundler-zlib.c b/clang/test/Driver/clang-offload-bundler-zlib.c
index fff7a0f545686..7e5857296756c 100644
--- a/clang/test/Driver/clang-offload-bundler-zlib.c
+++ b/clang/test/Driver/clang-offload-bundler-zlib.c
@@ -1,5 +1,4 @@
 // REQUIRES: zlib && !zstd
-// REQUIRES: x86-registered-target
 // UNSUPPORTED: target={{.*}}-darwin{{.*}}, target={{.*}}-aix{{.*}}, target={{.*}}-zos{{.*}}
 
 //
diff --git a/clang/test/Driver/clang-offload-bundler-zstd.c b/clang/test/Driver/clang-offload-bundler-zstd.c
index d01d9659a68dd..667d9554daec7 100644
--- a/clang/test/Driver/clang-offload-bundler-zstd.c
+++ b/clang/test/Driver/clang-offload-bundler-zstd.c
@@ -1,5 +1,4 @@
 // REQUIRES: zstd
-// REQUIRES: x86-registered-target
 // UNSUPPORTED: target={{.*}}-darwin{{.*}}, target={{.*}}-aix{{.*}}, target={{.*}}-zos{{.*}}
 
 //
diff --git a/clang/test/Driver/compress-noias.c b/clang/test/Driver/compress-noias.c
index 24bfa18c8d704..472b6327eff4c 100644
--- a/clang/test/Driver/compress-noias.c
+++ b/clang/test/Driver/compress-noias.c
@@ -1,5 +1,4 @@
 // REQUIRES: zlib
-// REQUIRES: x86-registered-target
 
 // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -Wa,-compress-debug-sections -c %s 2>&1 | FileCheck -check-prefix CHECK-_COMPRESS_DEBUG_SECTIONS %s
 // CHECK-_COMPRESS_DEBUG_SECTIONS: "-compress-debug-sections"
diff --git a/clang/test/Driver/cuda-arch-translation.cu b/clang/test/Driver/cuda-arch-translation.cu
index f37964d87c66a..ff97f2dbda6c5 100644
--- a/clang/test/Driver/cuda-arch-translation.cu
+++ b/clang/test/Driver/cuda-arch-translation.cu
@@ -1,8 +1,5 @@
 // Tests that "sm_XX" gets correctly converted to "compute_YY" when we invoke
 // fatbinary.
-//
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
 
 // RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
 // RUN: | FileCheck -check-prefixes=CUDA,SM20 %s
diff --git a/clang/test/Driver/cuda-bad-arch.cu b/clang/test/Driver/cuda-bad-arch.cu
index 35a56a8bef0f0..8c8c5c3401329 100644
--- a/clang/test/Driver/cuda-bad-arch.cu
+++ b/clang/test/Driver/cuda-bad-arch.cu
@@ -1,7 +1,4 @@
 // Checks errors generated by passing a bad value for --cuda-gpu-arch.
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-// REQUIRES: amdgpu-registered-target
 
 // RUN: not %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=compute_20 -c --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
 // RUN: | FileCheck -check-prefix BAD %s
diff --git a/clang/test/Driver/cuda-bail-out.cu b/clang/test/Driver/cuda-bail-out.cu
index ec34711e51ae8..6f9a877e3c0f7 100644
--- a/clang/test/Driver/cuda-bail-out.cu
+++ b/clang/test/Driver/cuda-bail-out.cu
@@ -1,8 +1,5 @@
 // Test clang driver bails out after one error during CUDA compilation.
 
-// REQUIRES: powerpc-registered-target
-// REQUIRES: nvptx-registered-target
-
 #ifdef FORCE_ERROR
 #error compilation failed
 #endif
diff --git a/clang/test/Driver/cuda-bindings.cu b/clang/test/Driver/cuda-bindings.cu
index e130e08f20152..8ee1884936c06 100644
--- a/clang/test/Driver/cuda-bindings.cu
+++ b/clang/test/Driver/cuda-bindings.cu
@@ -9,9 +9,6 @@
 // way. Instead we check whether we've generated a permanent name on
 // device side, which appends '-device-cuda-<triple>' suffix.
 
-// REQUIRES: powerpc-registered-target
-// REQUIRES: nvptx-registered-target
-
 //
 // Test single gpu architecture with complete compilation.
 // No intermediary device files should have "-device-cuda..." in the name.
diff --git a/clang/test/Driver/cuda-constructor-alias.cu b/clang/test/Driver/cuda-constructor-alias.cu
index 6639420efa3e6..b7867e095f27f 100644
--- a/clang/test/Driver/cuda-constructor-alias.cu
+++ b/clang/test/Driver/cuda-constructor-alias.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // Check that we don't pass -mconstructor-aliases to CUDA device-side
 // compilation, but we do pass it to host-side compilation.
 
diff --git a/clang/test/Driver/cuda-cross-compiling.c b/clang/test/Driver/cuda-cross-compiling.c
index 203bc063a0106..1dc4520f485db 100644
--- a/clang/test/Driver/cuda-cross-compiling.c
+++ b/clang/test/Driver/cuda-cross-compiling.c
@@ -1,8 +1,6 @@
 // Tests the driver when targeting the NVPTX architecture directly without a
 // host toolchain to perform CUDA mappings.
 
-// REQUIRES: nvptx-registered-target
-
 //
 // Test the generated phases when targeting NVPTX.
 //
diff --git a/clang/test/Driver/cuda-detect-path.cu b/clang/test/Driver/cuda-detect-path.cu
index 95b9b288a8d7c..8d249bd4c96d5 100644
--- a/clang/test/Driver/cuda-detect-path.cu
+++ b/clang/test/Driver/cuda-detect-path.cu
@@ -1,5 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
 // This tests uses the PATH environment variable.
 // REQUIRES: !system-windows
 
diff --git a/clang/test/Driver/cuda-detect.cu b/clang/test/Driver/cuda-detect.cu
index 67af470018ff9..23b6ba2fcc09d 100644
--- a/clang/test/Driver/cuda-detect.cu
+++ b/clang/test/Driver/cuda-detect.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-//
 // Check that we properly detect CUDA installation.
 // RUN: %clang -v --target=i386-unknown-linux \
 // RUN:   --sysroot=%S/no-cuda-there --cuda-path-ignore-env 2>&1 | FileCheck %s -check-prefix NOCUDA
diff --git a/clang/test/Driver/cuda-external-tools.cu b/clang/test/Driver/cuda-external-tools.cu
index 9ada0cf8595dc..0633c7bceac05 100644
--- a/clang/test/Driver/cuda-external-tools.cu
+++ b/clang/test/Driver/cuda-external-tools.cu
@@ -1,8 +1,5 @@
 // Tests that ptxas and fatbinary are invoked correctly during CUDA
 // compilation.
-//
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
 
 // Regular compiles with -O{0,1,2,3,4,fast}.  -O4 and -Ofast map to ptxas O3.
 // RUN: %clang -### --target=x86_64-linux-gnu -O0 -c %s 2>&1 \
diff --git a/clang/test/Driver/cuda-macosx.cu b/clang/test/Driver/cuda-macosx.cu
index d01299f9f7d27..d26dd17ff950a 100644
--- a/clang/test/Driver/cuda-macosx.cu
+++ b/clang/test/Driver/cuda-macosx.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-//
 // RUN: %clang -v --target=i386-apple-macosx \
 // RUN:   --sysroot=%S/Inputs/CUDA-macosx --cuda-path-ignore-env 2>&1 | FileCheck %s
 
diff --git a/clang/test/Driver/cuda-march.cu b/clang/test/Driver/cuda-march.cu
index 25fd6f3a10f2a..2dbb9cdf6f589 100644
--- a/clang/test/Driver/cuda-march.cu
+++ b/clang/test/Driver/cuda-march.cu
@@ -1,9 +1,6 @@
 // Checks that cuda compilation does the right thing when passed -march.
 // (Specifically, we want to pass it to host compilation, but not to device
 // compilation or ptxas!)
-//
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
 
 // RUN: %clang -### --target=x86_64-linux-gnu -c \
 // RUN: -nogpulib -nogpuinc -march=haswell %s 2>&1 | FileCheck %s
diff --git a/clang/test/Driver/cuda-omp-unsupported-debug-options.cu b/clang/test/Driver/cuda-omp-unsupported-debug-options.cu
index 8e1bb2e496c74..cc6a538d7a7ba 100644
--- a/clang/test/Driver/cuda-omp-unsupported-debug-options.cu
+++ b/clang/test/Driver/cuda-omp-unsupported-debug-options.cu
@@ -1,5 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
 // REQUIRES: zlib
 
 // RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \
diff --git a/clang/test/Driver/cuda-openmp-driver.cu b/clang/test/Driver/cuda-openmp-driver.cu
index 8f2d8587e2dad..a1ca987eb9d22 100644
--- a/clang/test/Driver/cuda-openmp-driver.cu
+++ b/clang/test/Driver/cuda-openmp-driver.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // RUN: %clang -### -target x86_64-linux-gnu -nocudalib -ccc-print-bindings -fgpu-rdc \
 // RUN:        --offload-new-driver --offload-arch=sm_35 --offload-arch=sm_70 %s 2>&1 \
 // RUN: | FileCheck -check-prefix BINDINGS %s
diff --git a/clang/test/Driver/cuda-options.cu b/clang/test/Driver/cuda-options.cu
index 8999a6618fe1f..67facf77f6c68 100644
--- a/clang/test/Driver/cuda-options.cu
+++ b/clang/test/Driver/cuda-options.cu
@@ -1,6 +1,4 @@
 // Tests CUDA compilation pipeline construction in Driver.
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
 
 // Simple compilation case. Compile device-side to PTX assembly and make sure
 // we use it on the host side.
diff --git a/clang/test/Driver/cuda-output-asm.cu b/clang/test/Driver/cuda-output-asm.cu
index ed1aeadc243a5..6b944d1891724 100644
--- a/clang/test/Driver/cuda-output-asm.cu
+++ b/clang/test/Driver/cuda-output-asm.cu
@@ -1,8 +1,5 @@
 // Tests CUDA compilation with -S and -emit-llvm.
 
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // RUN: %clang -### -S --target=x86_64-linux-gnu --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
 // RUN:   | FileCheck -check-prefix HOST -check-prefix SM20 %s
 // RUN: %clang -### -S --target=x86_64-linux-gnu --cuda-host-only -o foo.s --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \
diff --git a/clang/test/Driver/cuda-phases.cu b/clang/test/Driver/cuda-phases.cu
index 85b1a550524d2..8b91a1d5a7fcf 100644
--- a/clang/test/Driver/cuda-phases.cu
+++ b/clang/test/Driver/cuda-phases.cu
@@ -4,9 +4,6 @@
 // - Host/device-only compilation;
 // - User-requested final phase - binary or assembly.
 
-// REQUIRES: powerpc-registered-target
-// REQUIRES: nvptx-registered-target
-//
 // Test single gpu architecture with complete compilation.
 //
 // Test CUDA NVPTX phases.
diff --git a/clang/test/Driver/cuda-ptxas-path.cu b/clang/test/Driver/cuda-ptxas-path.cu
index 87b19d9d4d616..f36dcc94558f1 100644
--- a/clang/test/Driver/cuda-ptxas-path.cu
+++ b/clang/test/Driver/cuda-ptxas-path.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // RUN: %clang -### --target=i386-unknown-linux \
 // RUN:   --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
 // RUN:   --ptxas-path=/some/path/to/ptxas %s 2>&1 \
diff --git a/clang/test/Driver/cuda-version-check.cu b/clang/test/Driver/cuda-version-check.cu
index dc313e928c7d2..9eceb928ffabd 100644
--- a/clang/test/Driver/cuda-version-check.cu
+++ b/clang/test/Driver/cuda-version-check.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \
 // RUN:    FileCheck %s --check-prefix=OK
 // RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda 2>&1 %s | \
diff --git a/clang/test/Driver/cuda-windows.cu b/clang/test/Driver/cuda-windows.cu
index 02d6a55808d1c..4459e809072d9 100644
--- a/clang/test/Driver/cuda-windows.cu
+++ b/clang/test/Driver/cuda-windows.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-//
 // RUN: %clang -v --target=i386-pc-windows-msvc \
 // RUN:   --sysroot=%S/Inputs/CUDA-windows 2>&1 %s -### | FileCheck %s
 // RUN: %clang -v --target=i386-pc-windows-mingw32 \
diff --git a/clang/test/Driver/driverkit-arm64.c b/clang/test/Driver/driverkit-arm64.c
index 125df688976e6..1f60c0aec7dd3 100644
--- a/clang/test/Driver/driverkit-arm64.c
+++ b/clang/test/Driver/driverkit-arm64.c
@@ -1,4 +1,3 @@
-// REQUIRES: aarch64-registered-target
 // RUN: %clang %s -target arm64-apple-driverkit -### 2>&1 | FileCheck %s
 
 // CHECK: "-target-cpu" "apple-a7"
diff --git a/clang/test/Driver/driverkit-arm64e.c b/clang/test/Driver/driverkit-arm64e.c
index d9ace1ea9e137..29f90bdc99ec0 100644
--- a/clang/test/Driver/driverkit-arm64e.c
+++ b/clang/test/Driver/driverkit-arm64e.c
@@ -1,4 +1,3 @@
-// REQUIRES: aarch64-registered-target
 // RUN: %clang %s -target arm64e-apple-driverkit -### 2>&1 | FileCheck %s
 
 // CHECK: "-target-cpu" "apple-a12"
diff --git a/clang/test/Driver/driverkit-cplusplus.cpp b/clang/test/Driver/driverkit-cplusplus.cpp
index 9f2e49f890316..717a95e6b9825 100644
--- a/clang/test/Driver/driverkit-cplusplus.cpp
+++ b/clang/test/Driver/driverkit-cplusplus.cpp
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target
 // RUN: %clang %s -target x86_64-apple-driverkit19.0 -fsyntax-only
 
 #if __cplusplus != 201703L
diff --git a/clang/test/Driver/driverkit-exceptions.cpp b/clang/test/Driver/driverkit-exceptions.cpp
index 76a39770338e6..2d06d023242bb 100644
--- a/clang/test/Driver/driverkit-exceptions.cpp
+++ b/clang/test/Driver/driverkit-exceptions.cpp
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target
 // RUN: %clang %s -target x86_64-apple-driverkit19.0 -### 2>&1 | FileCheck %s -check-prefix=DEFAULT
 // RUN: %clang %s -target x86_64-apple-driverkit19.0 -fexceptions -### 2>&1 | FileCheck %s -check-prefix=USERPROVIDED
 
diff --git a/clang/test/Driver/driverkit-path.c b/clang/test/Driver/driverkit-path.c
index 9699b9c01f4e8..3caae382d65bb 100644
--- a/clang/test/Driver/driverkit-path.c
+++ b/clang/test/Driver/driverkit-path.c
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target
 // UNSUPPORTED: system-windows
 //   Windows is unsupported because we use the Unix path separator `\`.
 
diff --git a/clang/test/Driver/driverkit-rtti.cpp b/clang/test/Driver/driverkit-rtti.cpp
index 3d94ea09256e7..6fadc06ea1d1d 100644
--- a/clang/test/Driver/driverkit-rtti.cpp
+++ b/clang/test/Driver/driverkit-rtti.cpp
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target
 // RUN: %clang %s -target x86_64-apple-driverkit19.0 -### 2>&1 | FileCheck %s
 
 int main() { return 0; }
diff --git a/clang/test/Driver/driverkit-target-cpu.c b/clang/test/Driver/driverkit-target-cpu.c
index f69e5edec0c9b..b1a6232c07351 100644
--- a/clang/test/Driver/driverkit-target-cpu.c
+++ b/clang/test/Driver/driverkit-target-cpu.c
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target
 // RUN: %clang %s -target x86_64-apple-driverkit19.0 -### 2>&1 | FileCheck %s
 
 int main() { return 0; }
diff --git a/clang/test/Driver/dwarf-target-version-clamp.cu b/clang/test/Driver/dwarf-target-version-clamp.cu
index d9dbbe62cfb2f..910e9cb82a1cc 100644
--- a/clang/test/Driver/dwarf-target-version-clamp.cu
+++ b/clang/test/Driver/dwarf-target-version-clamp.cu
@@ -1,6 +1,3 @@
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-
 // Verify that DWARF version is properly clamped for nvptx, but not for the host.
 // RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -nogpuinc -c %s -gdwarf-5 -gembed-source ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/94055


More information about the cfe-commits mailing list