Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mlir/lib/Dialect/SCF/IR/SCF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4236,14 +4236,15 @@ LogicalResult scf::IndexSwitchOp::verify() {
<< "see yield operation here";
}
for (auto [idx, result, operand] :
llvm::zip(llvm::seq<unsigned>(0, getNumResults()), getResultTypes(),
yield.getOperandTypes())) {
if (result == operand)
llvm::enumerate(getResultTypes(), yield.getOperands())) {
if (!operand)
return yield.emitOpError() << "operand " << idx << " is null\n";
if (result == operand.getType())
continue;
return (emitOpError("expected result #")
<< idx << " of each region to be " << result)
.attachNote(yield.getLoc())
<< name << " returns " << operand << " here";
<< name << " returns " << operand.getType() << " here";
}
return success();
};
Expand Down