Skip to content

Commit

Permalink
[SPIR-V] Replace assert with report_fatal (llvm#118617)
Browse files Browse the repository at this point in the history
Irreducible must always be rejected, not only in debug builds.

Signed-off-by: Nathan Gauër <[email protected]>
  • Loading branch information
Keenuts authored Dec 4, 2024
1 parent a88653a commit 920ea4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/Target/SPIRV/SPIRVUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,9 @@ size_t PartialOrderingVisitor::visit(BasicBlock *BB, size_t Unused) {

if (!CanBeVisited(BB)) {
ToVisit.push(BB);
assert(QueueIndex < ToVisit.size() &&
"No valid candidate in the queue. Is the graph reducible?");
if (QueueIndex >= ToVisit.size())
llvm::report_fatal_error(
"No valid candidate in the queue. Is the graph reducible?");
QueueIndex++;
continue;
}
Expand Down

0 comments on commit 920ea4a

Please sign in to comment.