[clang] 0727409 - [CIR][AMDGPU] Remove R600 builtin handling. NFC (#246816)

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 28 18:48:02 PST 2026


Author: Harrison Hao
Date: 2026-11-29T10:47:53+08:00
New Revision: 072740907539838f77e11ff01192ee2e2194e084

URL: https://github.com/llvm/llvm-project/commit/072740907539838f77e11ff01192ee2e2194e084
DIFF: https://github.com/llvm/llvm-project/commit/072740907539838f77e11ff01192ee2e2194e084.diff

LOG: [CIR][AMDGPU] Remove R600 builtin handling. NFC (#246816)

Remove the r600 triple case and the `__builtin_r600_recipsqrt_ieee*`
cases. CIR never implemented them, and they now fall through to the
`default` NYI path.

RFC: https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
    clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
index ca8a601946ab5..814089f244642 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
@@ -3460,7 +3460,6 @@ emitTargetArchBuiltinExpr(CIRGenFunction *cgf, unsigned builtinID,
   case llvm::Triple::ppcle:
   case llvm::Triple::ppc64:
   case llvm::Triple::ppc64le:
-  case llvm::Triple::r600:
     // These are actually NYI, but that will be reported by emitBuiltinExpr.
     // At this point, we don't even know that the builtin is target-specific.
     return std::nullopt;

diff  --git a/clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
index 5310c86768f3c..6b3a65c7a95d0 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
@@ -1291,13 +1291,6 @@ CIRGenFunction::emitAMDGPUBuiltinExpr(unsigned builtinId,
     return emitAMDGPUGridSize(*this, getLoc(expr->getExprLoc()), 1);
   case AMDGPU::BI__builtin_amdgcn_grid_size_z:
     return emitAMDGPUGridSize(*this, getLoc(expr->getExprLoc()), 2);
-  case AMDGPU::BI__builtin_r600_recipsqrt_ieee:
-  case AMDGPU::BI__builtin_r600_recipsqrt_ieeef: {
-    cgm.errorNYI(expr->getSourceRange(),
-                 std::string("unimplemented AMDGPU builtin call: ") +
-                     getContext().BuiltinInfo.getName(builtinId));
-    return mlir::Value{};
-  }
   case AMDGPU::BI__builtin_amdgcn_alignbit: {
     cgm.errorNYI(expr->getSourceRange(),
                  std::string("unimplemented AMDGPU builtin call: ") +


        


More information about the cfe-commits mailing list