forked from OSchip/llvm-project
Apply clang-tidy fixes for performance-for-range-copy in SCF.cpp (NFC)
This commit is contained in:
parent
6c93e1d329
commit
2d06420879
|
@ -1769,7 +1769,7 @@ struct CombineNestedIfs : public OpRewritePattern<IfOp> {
|
||||||
// Note that the array access to elseYield will not go out of bounds
|
// Note that the array access to elseYield will not go out of bounds
|
||||||
// since it must have the same length as thenYield, since they both
|
// since it must have the same length as thenYield, since they both
|
||||||
// come from the same scf.if.
|
// come from the same scf.if.
|
||||||
for (auto tup : llvm::enumerate(thenYield)) {
|
for (const auto &tup : llvm::enumerate(thenYield)) {
|
||||||
if (tup.value().getDefiningOp() == nestedIf) {
|
if (tup.value().getDefiningOp() == nestedIf) {
|
||||||
auto nestedIdx = tup.value().cast<OpResult>().getResultNumber();
|
auto nestedIdx = tup.value().cast<OpResult>().getResultNumber();
|
||||||
if (nestedIf.elseYield().getOperand(nestedIdx) !=
|
if (nestedIf.elseYield().getOperand(nestedIdx) !=
|
||||||
|
|
Loading…
Reference in New Issue