diff --git a/lib/SPIRV/libSPIRV/SPIRVInstruction.h b/lib/SPIRV/libSPIRV/SPIRVInstruction.h index 8b97891a30..7e5e3664dc 100644 --- a/lib/SPIRV/libSPIRV/SPIRVInstruction.h +++ b/lib/SPIRV/libSPIRV/SPIRVInstruction.h @@ -856,6 +856,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;