[PATCH] D119324: [MLIR][Presburger] Disambiguate call to floor
Arjun P via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 10:05:16 PST 2022
arjunp accepted this revision.
arjunp added inline comments.
This revision is now accepted and ready to land.
================
Comment at: mlir/lib/Analysis/Presburger/Utils.cpp:48
std::transform(dividend.begin(), dividend.end(), dividend.begin(),
- [gcd](int64_t &n) { return floor(n / gcd); });
+ [gcd](int64_t &n) { return floor((double)(n / gcd)); });
divisor /= gcd;
----------------
This code should have used `floorDiv` to floor divide `n` by `gcd`. That also resolves the ambiguity issue, I think. If you would like to go ahead with the patch as-is for fixing the build, I'm also happy to fix the logic later in another patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119324/new/
https://reviews.llvm.org/D119324
More information about the llvm-commits
mailing list