[Mlir-commits] [mlir] [mlir][arith] Overflow flags propagation in arith canonicalizations. (PR #91646)

Tobias Gysi llvmlistbot at llvm.org
Fri May 10 00:25:37 PDT 2024


================
@@ -24,10 +24,10 @@ def SubIntAttrs : NativeCodeCall<"subIntegerAttrs($_builder, $0, $1, $2)">;
 // Multiply two integer attributes and create a new one with the result.
 def MulIntAttrs : NativeCodeCall<"mulIntegerAttrs($_builder, $0, $1, $2)">;
 
-// TODO: Canonicalizations currently doesn't take into account integer overflow
-// flags and always reset them to default (wraparound) which is safe but can
-// inhibit later optimizations. Individual patterns must be reviewed for
-// better handling of overflow flags.
+// Merge overflow flags from 2 ops, selecting most conservative combination.
----------------
gysit wrote:

```suggestion
// Merge overflow flags from 2 ops, selecting the most conservative combination.
```
ultra nit: 

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


More information about the Mlir-commits mailing list