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

Maksim Levental llvmlistbot at llvm.org
Sun Jun 23 02:51:26 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};
----------------
makslevental wrote:

TIL `SaturatedInteger`; am I right in reading the definition that "saturation" connotes dynamic rather than concrete? If so, a little odd.

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


More information about the Mlir-commits mailing list