[Mlir-commits] [mlir] [mlir][loops] Add getters for multi dim loop variables in `LoopLikeOpInterface` (PR #94516)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 6 11:15:07 PDT 2024


================
@@ -512,20 +512,23 @@ def ForallOp : SCF_Op<"forall", [
   let extraClassDeclaration = [{
     // Get lower bounds as OpFoldResult.
     SmallVector<OpFoldResult> getMixedLowerBound() {
-      Builder b(getOperation()->getContext());
-      return getMixedValues(getStaticLowerBound(), getDynamicLowerBound(), b);
+      auto maybeLowerBounds = getLowerBounds();
+      assert(maybeLowerBounds.has_value() && "expected values");
----------------
MaheshRavishankar wrote:

I am not sure `assert` is a good idea. This some time leads to spurious failures. What is reason where it wont have a value.

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


More information about the Mlir-commits mailing list