Author: Matt Arsenault Date: 2026-06-05T15:31:30+02:00 New Revision: 85da6a915345ce0a8614f8ff4531ba4efb592564
URL: https://github.com/llvm/llvm-project/commit/85da6a915345ce0a8614f8ff4531ba4efb592564 DIFF: https://github.com/llvm/llvm-project/commit/85da6a915345ce0a8614f8ff4531ba4efb592564.diff LOG: OpenMP: Accept amdgpu name in arch directive (#201789) Accept amdgpu as an alias for amdgcn as part of the general trend of preferring the amdgpu name. This is so the name is consistent in the future when the triple arch name changes. Added: clang/test/OpenMP/amdgpu-arch-compat.c Modified: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def Removed: ################################################################################ diff --git a/clang/test/OpenMP/amdgpu-arch-compat.c b/clang/test/OpenMP/amdgpu-arch-compat.c new file mode 100644 index 0000000000000..363781e3c3c3f --- /dev/null +++ b/clang/test/OpenMP/amdgpu-arch-compat.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fopenmp -nogpulib -fopenmp-is-target-device -verify %s +// expected-no-diagnostics + +#pragma omp begin declare variant match(device = {arch(amdgcn)}) +void is_amdgcn(); +#pragma omp end declare variant + +#pragma omp begin declare variant match(device = {arch(amdgpu)}) +void is_amdgpu(); +#pragma omp end declare variant + diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def index 15fbfdaf549d6..ae19490de0f46 100644 --- a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def +++ b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def @@ -1283,6 +1283,7 @@ __OMP_TRAIT_PROPERTY(device, arch, ppc64le) __OMP_TRAIT_PROPERTY(device, arch, x86) __OMP_TRAIT_PROPERTY(device, arch, x86_64) __OMP_TRAIT_PROPERTY(device, arch, amdgcn) +__OMP_TRAIT_PROPERTY(device, arch, amdgpu) __OMP_TRAIT_PROPERTY(device, arch, nvptx) __OMP_TRAIT_PROPERTY(device, arch, nvptx64) __OMP_TRAIT_PROPERTY(device, arch, spirv64) _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
