[Mlir-commits] [mlir] [MLIR][SCF] Add support for pipelining dynamic loops (PR #74350)
Quinn Dawkins
llvmlistbot at llvm.org
Sun Dec 10 10:04:52 PST 2023
================
@@ -358,9 +405,17 @@ LogicalResult LoopPipelinerInternal::createKernel(
SmallVector<Value> predicates(maxStage + 1, nullptr);
if (!peelEpilogue) {
// Create a predicate for each stage except the last stage.
+ Location loc = newForOp.getLoc();
+ Type t = ub.getType();
for (unsigned i = 0; i < maxStage; i++) {
- Value c = rewriter.create<arith::ConstantIndexOp>(
- newForOp.getLoc(), ub - (maxStage - i) * step);
+ // c = ub - (maxStage - i) * step
+ Value c = rewriter.create<arith::AddIOp>(
----------------
qedawkins wrote:
Why use `AddI` `ub + (-...)` instead of `SubI` `ub - (...)`?
https://github.com/llvm/llvm-project/pull/74350
More information about the Mlir-commits
mailing list