[flang-commits] [clang] [flang] [lld] [lldb] [llvm] AMDGPU: Introduce amdgpu triple arch (PR #206480)
Scott Linder via flang-commits
flang-commits at lists.llvm.org
Tue Jul 7 08:51:40 PDT 2026
================
@@ -6695,9 +6709,22 @@ bool AMDGPUAsmParser::ParseDirectiveISAVersion() {
std::optional<AMDGPU::TargetID> MaybeParsed =
AMDGPU::TargetID::parseTargetIDString(TargetIDDirective);
if (!MaybeParsed)
- return Error(getParser().getTok().getLoc(), "malformed target id");
+ return Error(getParser().getTok().getLoc(),
+ "malformed target id '" + TargetIDDirective + "'");
const AMDGPU::TargetID &ParsedTargetID = *MaybeParsed;
+ const Triple &TT = getSTI().getTargetTriple();
+
+ // The processor named in the target id must be covered by the triple's
+ // subarch.
+ if (!AMDGPU::isCPUValidForSubArch(TT.getSubArch(),
+ ParsedTargetID.getGPUKind())) {
+ return Error(getParser().getTok().getLoc(),
----------------
slinder1 wrote:
Nit: Maybe not worth factoring it out, but this seems to be the exact error from ParseDirectiveAMDGCNTarget, just formatted slightly differently
https://github.com/llvm/llvm-project/pull/206480
More information about the flang-commits
mailing list