Skip to content

Commit 433ae97

Browse files
authored
Removed OpLessOrGreater (#2527)
1 parent f7c340c commit 433ae97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/SPIRV/libSPIRV/SPIRVInstruction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,9 @@ class SPIRVCompare : public SPIRVInstTemplateBase {
986986
ResTy = Type;
987987
}
988988
assert(isCmpOpCode(OpCode) && "Invalid op code for cmp inst");
989+
if (OpCode == OpLessOrGreater)
990+
assert(this->getModule()->getSPIRVVersion() <= VersionNumber::SPIRV_1_5 &&
991+
"OpLessOrGreater is removed starting from SPIR-V 1.6");
989992
assert((ResTy->isTypeBool() || ResTy->isTypeInt()) &&
990993
"Invalid type for compare instruction");
991994
assert(Op1Ty == Op2Ty && "Inconsistent types");

0 commit comments

Comments
 (0)