================
@@ -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:
If we want to allow this choice to be target-specific, we can just make the
"IntrinsicPrefix" a property of the TargetInfo, instead of trying to derive it
directly from the target triple. The default constructor would derive it from
the triple, but specific targets could override the field.
I'm more concerned this is going to prevent us from using builtins which shoud
be usable; do we need to getIntrinsicForClangBuiltin() for both "spv" and
"amdgcn"?
https://github.com/llvm/llvm-project/pull/89796
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits