[PATCH] D80860: Exact integer emptiness checks for FlatAffineConstraints
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 01:02:43 PDT 2020
bondhugula added inline comments.
================
Comment at: mlir/include/mlir/Analysis/Presburger/Fraction.h:65
+inline int64_t ceil(Fraction f) {
+ return f.num / f.den + (f.num > 0 && f.num % f.den != 0);
+}
----------------
Are you assuming f.den is always positive? If both `num` and `den` are both negative, you'd want to add one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80860/new/
https://reviews.llvm.org/D80860
More information about the llvm-commits
mailing list