[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 09:59:53 PDT 2024


================
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
   StringRef Prefix =
       llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch());
   if (!Prefix.empty()) {
+    if (Prefix == "spv" &&
+        getTarget().getTriple().getOS() == llvm::Triple::OSType::AMDHSA)
+      Prefix = "amdgcn";
----------------
efriedma-quic wrote:

We can look at it as a followup, sure; the code in its current form seems okay for now.

https://github.com/llvm/llvm-project/pull/89796


More information about the llvm-commits mailing list