[Mlir-commits] [mlir] [mlir][memref] Improve `memref.subview` type inference (PR #96421)

Matthias Springer llvmlistbot at llvm.org
Sun Jun 23 03:06:36 PDT 2024


================
@@ -200,6 +200,12 @@ struct SaturatedInteger {
     return SaturatedInteger{false, other.v + v};
   }
   SaturatedInteger operator*(SaturatedInteger other) {
+    // Multiplication with 0 is always 0.
+    if (!other.saturated && other.v == 0)
+      return SaturatedInteger{false, 0};
----------------
matthias-springer wrote:

Yes, that's right. Not sure why it's called "saturated".

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


More information about the Mlir-commits mailing list