[llvm] [SPIR-V] Emit SPIR-V generator magic number and version (PR #87951)
Michal Paszkowski via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 08:01:08 PDT 2024
================
@@ -76,18 +76,23 @@ getSymbolicOperandRequirements(SPIRV::OperandCategory::OperandCategory Category,
SPIRV::RequirementHandler &Reqs) {
static AvoidCapabilitiesSet
AvoidCaps; // contains capabilities to avoid if there is another option
- unsigned ReqMinVer = getSymbolicOperandMinVersion(Category, i);
- unsigned ReqMaxVer = getSymbolicOperandMaxVersion(Category, i);
- unsigned TargetVer = ST.getSPIRVVersion();
- bool MinVerOK = !ReqMinVer || !TargetVer || TargetVer >= ReqMinVer;
- bool MaxVerOK = !ReqMaxVer || !TargetVer || TargetVer <= ReqMaxVer;
+
+ unsigned ReqMinVerDec = getSymbolicOperandMinVersion(Category, i);
+ VersionTuple ReqMinVer = VersionTuple(ReqMinVerDec / 10, ReqMinVerDec % 10);
+ unsigned ReqMaxVerDec = getSymbolicOperandMaxVersion(Category, i);
+ VersionTuple ReqMaxVer = VersionTuple(ReqMaxVerDec / 10, ReqMaxVerDec % 10);
+ VersionTuple SPIRVVersion = ST.getSPIRVVersion();
----------------
michalpaszkowski wrote:
Thanks for catching this!
https://github.com/llvm/llvm-project/pull/87951
More information about the llvm-commits
mailing list