[Mlir-commits] [mlir] [mlir][scf]: Expose emitNormalizedLoopBounds/denormalizeInductionVariable util functions (NFC) (PR #94429)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jun 6 11:22:11 PDT 2024
================
@@ -501,26 +483,27 @@ static LoopParams emitNormalizedLoopBounds(RewriterBase &rewriter, Location loc,
if (isZeroBased && isStepOne)
return {lb, ub, step};
- Value diff = isZeroBased ? ub : rewriter.create<arith::SubIOp>(loc, ub, lb);
- Value newUpperBound =
- isStepOne ? diff : rewriter.create<arith::CeilDivSIOp>(loc, diff, step);
-
- Value newLowerBound = isZeroBased
- ? lb
- : rewriter.create<arith::ConstantOp>(
- loc, rewriter.getZeroAttr(lb.getType()));
- Value newStep = isStepOne
- ? step
- : rewriter.create<arith::ConstantOp>(
- loc, rewriter.getIntegerAttr(step.getType(), 1));
+ auto diff =
----------------
MaheshRavishankar wrote:
Why `auto`?
https://github.com/llvm/llvm-project/pull/94429
More information about the Mlir-commits
mailing list