Skip to content

Commit

Permalink
Simplify even further
Browse files Browse the repository at this point in the history
  • Loading branch information
josel-amd committed Nov 21, 2024
1 parent bb66650 commit f5a954f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mlir/lib/Conversion/SCFToEmitC/SCFToEmitC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,9 @@ static LogicalResult lowerYield(Operation *op, ValueRange resultVariables,
rewriter.setInsertionPoint(yield);

SmallVector<Value> yieldOperands;
for (auto originalOperand : yield.getOperands()) {
Value remappedValue = rewriter.getRemappedValue(originalOperand);
if (!remappedValue) {
return rewriter.notifyMatchFailure(op, "failed to lower yield operands");
}
yieldOperands.push_back(remappedValue);
auto result = rewriter.getRemappedValues(yield.getOperands(), yieldOperands);
if (failed(result)) {
return rewriter.notifyMatchFailure(op, "failed to lower yield operands");
}

assignValues(yieldOperands, resultVariables, rewriter, loc);
Expand Down

0 comments on commit f5a954f

Please sign in to comment.