Files
clang-p2996/flang/test/Driver/target-gpu-features.f90
Dominik Adamski d86311f293 [Flang-new][OpenMP] Add bitcode files for AMD GPU OpenMP (#96742)
Flang-new needs to add `mlink-builtin-bitcode` objects to properly
support offload code generation for AMD GPUs (for example, math
functions).

Both Flang-new and Clang rely on `mlink-builtin-bitcode` flags. These
flags are added by the `AMDGPUOpenMPToolchain::addClangTargetOptions`
function. Now, both compilers reuse the same function.

Flang-new tests for AMDGPU were updated by adding the `-nogpulib` flag.
This flag allows running AMDGPU tests on machines without the ROCm stack.
2024-07-29 11:21:40 +02:00

11 lines
379 B
Fortran

! REQUIRES: amdgpu-registered-target
! Test that -mcpu are used and that the -target-cpu and -target-features
! are also added to the fc1 command.
! RUN: %flang --target=amdgcn-amd-amdhsa -mcpu=gfx902 -nogpulib -c %s -### 2>&1 \
! RUN: | FileCheck %s -check-prefix=CHECK-AMDGCN
! CHECK-AMDGCN: "-fc1" "-triple" "amdgcn-amd-amdhsa"
! CHECK-AMDGCN-SAME: "-target-cpu" "gfx902"