[Mlir-commits] [mlir] [mlir][arith] Add overflow flags support to arith ops (PR #77211)

Tobias Gysi llvmlistbot at llvm.org
Sun Jan 7 23:23:29 PST 2024


================
@@ -137,6 +137,22 @@ class Arith_CompareOpOfAnyRank<string mnemonic, list<Trait> traits = []> :
   let results = (outs BoolLikeOfAnyRank:$result);
 }
 
+class Arith_IntArithmeticOpWithOverflowFlag<string mnemonic, list<Trait> traits = []> :
----------------
gysit wrote:

```suggestion
class Arith_IntBinaryOpWithOverflowFlags<string mnemonic, list<Trait> traits = []> :
```
nit: I would prefer binary op over arithmetic op here since all arith ops are somewhat arithmetic ops? 

I guess deriving directly from Arith_TotalIntBinaryOp would make things more complex rather than cleaner (with regards to the argument definition etc)? 

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


More information about the Mlir-commits mailing list