[Mlir-commits] [mlir] [MLIR][Presburger] Implement arithmetic operations (/, +, -) and printing for Fractions (PR #65310)
Arjun P
llvmlistbot at llvm.org
Tue Sep 5 08:54:51 PDT 2023
================
@@ -95,8 +99,52 @@ inline bool operator>=(const Fraction &x, const Fraction &y) {
return compare(x, y) >= 0;
}
+inline Fraction reduce(const Fraction &f) {
+ if (f == Fraction(0))
+ return f;
----------------
Superty wrote:
Actually make it Fraction(0, 1) so it's clear to the reader
https://github.com/llvm/llvm-project/pull/65310
More information about the Mlir-commits
mailing list