[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 28 10:16:06 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";
----------------
jhuber6 wrote:
So I was just wondering if it would make more sense to put this in `Triple::getArchTypePrefix(ArchType Kind)` because I wasn't sure if this logic is the expected return value there.
https://github.com/llvm/llvm-project/pull/89796
More information about the cfe-commits
mailing list