================
@@ -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";
----------------
AlexVlx wrote:

I don't quite see any other point to tweak the logic. We have some `amdgcn` 
builtins that get handled here, as opposed to via `EmitTargetBuiltinExpr`, and 
this is the narrowest scope for adjusting `Prefix`; the information that this 
is coming from AMDGCN flavoured SPIRV is lost past this point. Did you have 
something in mind regarding where to handle this as an alternative?

https://github.com/llvm/llvm-project/pull/89796
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to