diff --git a/lib/SPIRV/libSPIRV/SPIRVInstruction.h b/lib/SPIRV/libSPIRV/SPIRVInstruction.h index 19ea34040d..63fff95aad 100644 --- a/lib/SPIRV/libSPIRV/SPIRVInstruction.h +++ b/lib/SPIRV/libSPIRV/SPIRVInstruction.h @@ -859,6 +859,8 @@ class SPIRVBranchConditional : public SPIRVInstruction { getCondition()->getType()->isTypeBool()); assert(getTrueLabel()->isForward() || getTrueLabel()->isLabel()); assert(getFalseLabel()->isForward() || getFalseLabel()->isLabel()); + if (Module->isAllowedToUseVersion(VersionNumber::SPIRV_1_6)) + assert(TrueLabelId != FalseLabelId); } SPIRVId ConditionId; SPIRVId TrueLabelId;