[compiler-rt] [compiler-rt] Fix amdgcn -> amdgpu conversion for compiler-rt (PR #209765)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 06:57:06 PDT 2026


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/209765

Summary:
We are apparently transitioning to using `amdgpu` everywhere, so these
need to be updated.


>From 5d09f6360f5534bc98a1cd1daa6d5ed57469855b Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Wed, 15 Jul 2026 08:34:48 -0500
Subject: [PATCH] [compiler-rt] Fix amdgcn -> amdgpu conversion for compiler-rt

Summary:
We are apparently transitioning to using `amdgpu` everywhere, so these
need to be updated.
---
 compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake | 2 +-
 compiler-rt/cmake/Modules/CompilerRTUtils.cmake      | 2 +-
 compiler-rt/cmake/base-config-ix.cmake               | 2 +-
 compiler-rt/cmake/builtin-config-ix.cmake            | 2 +-
 compiler-rt/lib/builtins/CMakeLists.txt              | 1 +
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index 9c03892dffe5a..9c9874d94a1f2 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -1,5 +1,5 @@
 set(ALPHA alpha)
-set(AMDGPU amdgcn)
+set(AMDGPU amdgcn amdgpu)
 set(ARM64 aarch64)
 set(ARM32 arm armhf)
 set(HEXAGON hexagon)
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index e4e3cfb9a2d99..c2bf2e54b9fd4 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -170,7 +170,7 @@ macro(detect_target_arch)
   check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64)
   check_symbol_exists(__ve__ "" __VE)
   if(__AMDGPU)
-    add_default_target_arch(amdgcn)
+    add_default_target_arch(amdgpu)
   elseif(__ARM)
     add_default_target_arch(arm)
   elseif(__AVR)
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index 1b66dec9a6c03..d111a8002687b 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -250,7 +250,7 @@ macro(test_targets)
         endif()
       endif()
     elseif(COMPILER_RT_TARGET_AMDGPU)
-      test_target_arch(amdgcn "" "--target=amdgcn-amd-amdhsa" "-nogpulib"
+      test_target_arch(amdgpu "" "--target=amdgpu-amd-amdhsa" "-nogpulib"
                        "-flto" "-Xclang -mcode-object-version=none")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "hexagon")
       test_target_arch(hexagon "" "")
diff --git a/compiler-rt/cmake/builtin-config-ix.cmake b/compiler-rt/cmake/builtin-config-ix.cmake
index 528268da729fb..4d560e48acacf 100644
--- a/compiler-rt/cmake/builtin-config-ix.cmake
+++ b/compiler-rt/cmake/builtin-config-ix.cmake
@@ -77,7 +77,7 @@ else()
   set(OS_NAME "${CMAKE_SYSTEM_NAME}")
 endif()
 
-set(AMDGPU amdgcn)
+set(AMDGPU amdgcn amdgpu)
 set(ARM64 aarch64 arm64ec aarch64_lfi)
 set(ARM32 arm armhf armv4t armv5te armv6 armv6m armv7m armv7em armv7 armv7s armv7k armv8m.base armv8m.main armv8.1m.main)
 set(AVR avr)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index e128fea6a3415..ea21c36d3d31f 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -832,6 +832,7 @@ if (APPLE)
 endif()
 
 set(amdgcn_SOURCES ${GENERIC_SOURCES})
+set(amdgpu_SOURCES ${GENERIC_SOURCES})
 
 set(armv4t_SOURCES ${arm_min_SOURCES})
 set(armv5te_SOURCES ${arm_min_SOURCES})



More information about the llvm-commits mailing list