================
@@ -2366,34 +2379,47 @@ class CIR_BinaryOp<string mnemonic, Type type,
list<Trait> traits = []>
}];
}
-// Base class for binary ops that support integer overflow flags (nsw/nuw)
-// and saturated arithmetic.
-class CIR_BinaryOpWithOverflowFlags<string mnemonic, Type type,
- list<Trait> traits = []>
- : CIR_BinaryOp<mnemonic, type, !listconcat([Pure], traits)>
+// Base class for binary ops that support integer overflow flags (nsw/nuw).
+class CIR_BinaryOpWithOverflowFlags<string mnemonic, Type type>
+ : CIR_BinaryOp<mnemonic, type>
{
- let arguments = (ins
- type:$lhs, type:$rhs,
+ let append traits = [Pure, NSWFlagIntOnly, NUWFlagIntOnly];
----------------
xlauko wrote:
Still open question whether we want to keep binary ops for integers and floats
together?
I am not sure whether there is even a usecase where you don't care whether it
is floating/integer operation?
And most of the flags are disjinctive on these two sets of operations, e.g.
overflow flags for ints, fast-math and such for floats?
What do you think about proper direction?
https://github.com/llvm/llvm-project/pull/195476
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits