[Mlir-commits] [llvm] [mlir] [MLIR][OpenMP] Add Taskloop Collapse Support (PR #175924)

Jack Styles llvmlistbot at llvm.org
Thu Jan 29 01:57:34 PST 2026


================
@@ -2816,13 +2818,33 @@ convertOmpTaskloopOp(Operation &opInst, llvm::IRBuilderBase &builder,
           moduleTranslation.lookupValue(lowerBounds[i]), builder.getInt32(1));
       llvm::Value *loopTripCount = builder.CreateSub(
           moduleTranslation.lookupValue(upperBounds[i]), lowerBoundMinusOne);
+      // For loops that have a step value greater than 1, we need to adjust the
----------------
Stylie777 wrote:

Yes, I've updated the comment. This is actually applied all the time (even if the step is 1) but for steps of 1 it has not effect.

There was some adjustment needed to cater for cases where the lb is less than the ub, the calculation of the trip count needs to be the other way around.

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


More information about the Mlir-commits mailing list