[Mlir-commits] [mlir] [mlir][SCF] scf.for: Consistent API around `initArgs` (PR #66512)

Markus Böck llvmlistbot at llvm.org
Fri Sep 15 13:23:04 PDT 2023


================
@@ -361,8 +361,7 @@ LogicalResult ForLowering::matchAndRewrite(ForOp forOp,
   // of the loop operation.
   SmallVector<Value, 8> destOperands;
   destOperands.push_back(lowerBound);
-  auto iterOperands = forOp.getIterOperands();
-  destOperands.append(iterOperands.begin(), iterOperands.end());
+  destOperands.append(forOp.getInitArgs().begin(), forOp.getInitArgs().end());
----------------
zero9178 wrote:

```suggestion
  llvm::append_range(destOperands, forOp.getInitArgs());
```
nit

https://github.com/llvm/llvm-project/pull/66512


More information about the Mlir-commits mailing list