[Mlir-commits] [mlir] [mlir][memref] Fix an invalid dim loop motion crash (PR #74204)

Sanjoy Das llvmlistbot at llvm.org
Sun Dec 3 09:43:28 PST 2023


================
@@ -893,8 +893,9 @@ Speculation::Speculatability DimOp::getSpeculatability() {
   if (!rankedSourceType)
     return Speculation::NotSpeculatable;
 
-  // The verifier rejects operations that violate this assertion.
-  assert(constantIndex < rankedSourceType.getRank());
+  if (rankedSourceType.getRank() < constantIndex)
----------------
sanjoy wrote:

I agree with the broader reasoning by @joker-eph.  However, if you're going in that direction then I think the IR verifier should also be changed to not check this invariant.

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


More information about the Mlir-commits mailing list