[flang-commits] [flang] [mlir] [Flang][OpenMP] Support iterator modifier in map and motion clauses (PR #197757)
via flang-commits
flang-commits at lists.llvm.org
Tue Sep 22 22:25:27 PDT 2026
================
@@ -2811,11 +2811,10 @@ class IteratorInfo {
upperBounds[d] = ub;
steps[d] = st;
- // trips = ((ub - lb) / step) + 1 (inclusive ub, assume positive step)
- llvm::Value *diff = builder.CreateSub(ub, lb);
- llvm::Value *div = builder.CreateSDiv(diff, st);
- trips[d] = builder.CreateAdd(
- div, llvm::ConstantInt::get(builder.getInt64Ty(), 1));
+ llvm::Value *tripCount = ompBuilder.calculateCanonicalLoopTripCount(
----------------
MattPD wrote:
Confirmed, both reported count failures are fixed.
https://github.com/llvm/llvm-project/pull/197757
More information about the flang-commits
mailing list