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

Mehdi Amini llvmlistbot at llvm.org
Sun Dec 3 13:42:41 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)
----------------
joker-eph wrote:

Can you clarify why the verifier shouldn't check this invariant Sanjoy? 
Reading this quickly, it seems like a purely local invariant?

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


More information about the Mlir-commits mailing list