[clang] [llvm] [clang][Driver] Add HIPAMD Driver support for AMDGCN flavoured SPIR-V (PR #95061)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 18 17:25:53 PDT 2024
================
@@ -907,7 +907,8 @@ void CodeGenModule::Release() {
if (Context.getTargetInfo().getTriple().isWasm())
EmitMainVoidAlias();
- if (getTriple().isAMDGPU()) {
+ if (getTriple().isAMDGPU() ||
+ (getTriple().isSPIRV() && getTriple().getVendor() == llvm::Triple::AMD)) {
----------------
AlexVlx wrote:
> I'm wondering if we should add `isAMD` to `llvm::Triple` or something.
We do have `isAMDGCN`, but that reflects the Arch. I guess it might be convenient sugar to have a predicate on vendors as well? I don't find the manual check excessively offensive FWIW.
https://github.com/llvm/llvm-project/pull/95061
More information about the cfe-commits
mailing list