Skip to content

Commit 38949c3

Browse files
vmaksimosys-ce-bb
authored andcommitted
Removed OpLessOrGreater (#2527)
Original commit: KhronosGroup/SPIRV-LLVM-Translator@433ae975c2d10fb
1 parent 69e9978 commit 38949c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm-spirv/lib/SPIRV/libSPIRV/SPIRVInstruction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,9 @@ class SPIRVCompare : public SPIRVInstTemplateBase {
977977
ResTy = Type;
978978
}
979979
assert(isCmpOpCode(OpCode) && "Invalid op code for cmp inst");
980+
if (OpCode == OpLessOrGreater)
981+
assert(this->getModule()->getSPIRVVersion() <= VersionNumber::SPIRV_1_5 &&
982+
"OpLessOrGreater is removed starting from SPIR-V 1.6");
980983
assert((ResTy->isTypeBool() || ResTy->isTypeInt()) &&
981984
"Invalid type for compare instruction");
982985
assert(Op1Ty == Op2Ty && "Inconsistent types");

0 commit comments

Comments
 (0)