Skip to content

Commit

Permalink
True Label and False Label of an OpBranchConditional must not be the …
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaksimo authored and sys-ce-bb committed Jun 27, 2024
1 parent 7c8cb41 commit 061de13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm-spirv/lib/SPIRV/libSPIRV/SPIRVInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,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;
Expand Down

0 comments on commit 061de13

Please sign in to comment.