diff options
Diffstat (limited to 'llvm/lib/TargetParser/TargetParser.cpp')
-rw-r--r-- | llvm/lib/TargetParser/TargetParser.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/llvm/lib/TargetParser/TargetParser.cpp b/llvm/lib/TargetParser/TargetParser.cpp index 60a784e..00df92e 100644 --- a/llvm/lib/TargetParser/TargetParser.cpp +++ b/llvm/lib/TargetParser/TargetParser.cpp @@ -315,7 +315,47 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T, StringRef Arch) { void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T, StringMap<bool> &Features) { // XXX - What does the member GPU mean if device name string passed here? - if (T.isAMDGCN()) { + if (T.isSPIRV() && T.getOS() == Triple::OSType::AMDHSA) { + // AMDGCN SPIRV must support the union of all AMDGCN features. + Features["atomic-ds-pk-add-16-insts"] = true; + Features["atomic-flat-pk-add-16-insts"] = true; + Features["atomic-buffer-global-pk-add-f16-insts"] = true; + Features["atomic-global-pk-add-bf16-inst"] = true; + Features["atomic-fadd-rtn-insts"] = true; + Features["ci-insts"] = true; + Features["dot1-insts"] = true; + Features["dot2-insts"] = true; + Features["dot3-insts"] = true; + Features["dot4-insts"] = true; + Features["dot5-insts"] = true; + Features["dot7-insts"] = true; + Features["dot8-insts"] = true; + Features["dot9-insts"] = true; + Features["dot10-insts"] = true; + Features["dot11-insts"] = true; + Features["dl-insts"] = true; + Features["16-bit-insts"] = true; + Features["dpp"] = true; + Features["gfx8-insts"] = true; + Features["gfx9-insts"] = true; + Features["gfx90a-insts"] = true; + Features["gfx940-insts"] = true; + Features["gfx10-insts"] = true; + Features["gfx10-3-insts"] = true; + Features["gfx11-insts"] = true; + Features["gfx12-insts"] = true; + Features["image-insts"] = true; + Features["fp8-conversion-insts"] = true; + Features["s-memrealtime"] = true; + Features["s-memtime-inst"] = true; + Features["gws"] = true; + Features["fp8-insts"] = true; + Features["fp8-conversion-insts"] = true; + Features["atomic-ds-pk-add-16-insts"] = true; + Features["mai-insts"] = true; + Features["wavefrontsize32"] = true; + Features["wavefrontsize64"] = true; + } else if (T.isAMDGCN()) { switch (parseArchAMDGCN(GPU)) { case GK_GFX1201: case GK_GFX1200: |