Skip to content

Commit

Permalink
replace unsigned subtraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahanxie353 committed Nov 14, 2024
1 parent fe89041 commit 0da30e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Transforms/IndexSwitchToIf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct SwitchToIfConversion : public OpConversionPattern<scf::IndexSwitchOp> {
emptyThenBlock.erase();
caseRegion.cloneInto(&ifOp.getThenRegion(), mapping);

if (i == switchCases.size() - 1) {
if (i + 1 == switchCases.size()) {
rewriter.setInsertionPointToEnd(&ifOp.getElseRegion().front());
Block &elseBlock = ifOp.getElseRegion().front();
elseBlock.erase();
Expand Down

0 comments on commit 0da30e4

Please sign in to comment.