[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:19:59 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");
----------------
srcarroll wrote:

there should be no reason, which is why i made it an assert. just a bug catcher in case other things change

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


More information about the Mlir-commits mailing list