llvm-project/clang/test/CodeGenHipStdPar/rdc-does-not-enable-hipstdpar.cpp
Alex Voicu 1bcec036e1
[HIP][HIPSTDPAR][NFC] Re-order & adapt hipstdpar specific passes (#134753)
The `hipstdpar` specific passes were not ordered ideally, especially for
`fgpu-rdc` compilations, which meant that we'd eagerly run accelerator
code selection and remove symbols that might end up used. This change
corrects that aspect by ensuring that accelerator code selection is only
done after linking (this will have to be revisited in the future once
the closed-world assumption no longer holds). Furthermore, we take the
opportunity to move allocation interposition so that it properly gets
printed when print-pipeline-passes is requested. NFC.
2025-04-15 00:47:09 +03:00

18 lines
959 B
C++

// Check that if we are compiling with fgpu-rdc amdgpu-enable-hipstdpar is not
// passed to CC1, to avoid eager, per TU, removal of potentially accessible
// functions.
// RUN: %clang -### --hipstdpar --offload-arch=gfx906 -nogpulib -nogpuinc %s \
// RUN: --hipstdpar-path=%S/../Driver/Inputs/hipstdpar \
// RUN: --hipstdpar-thrust-path=%S/../Driver/Inputs/hipstdpar/thrust \
// RUN: --hipstdpar-prim-path=%S/../Driver/Inputs/hipstdpar/rocprim 2>&1 \
// RUN: | FileCheck %s -check-prefix=NORDC
// NORDC: {{.*}}"-mllvm" "-amdgpu-enable-hipstdpar"
// RUN: %clang -### --hipstdpar --offload-arch=gfx906 -nogpulib -nogpuinc %s \
// RUN: -fgpu-rdc --hipstdpar-path=%S/../Driver/Inputs/hipstdpar \
// RUN: --hipstdpar-thrust-path=%S/../Driver/Inputs/hipstdpar/thrust \
// RUN: --hipstdpar-prim-path=%S/../Driver/Inputs/hipstdpar/rocprim 2>&1 \
// RUN: | FileCheck %s -check-prefix=RDC
// RDC-NOT: {{.*}}"-mllvm" "-amdgpu-enable-hipstdpar"