This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] fourier-motzkin: check if all LCMs are 1 using a bool instead of by multiplying them
ClosedPublic

Authored by arjunp on Aug 4 2022, 10:47 AM.

Details

Summary

This can easily overflow and it is possible for these unsigned overflows to result in incorrect results.
For example, the two LCMs could be 641 and 6700417, which multiply to 2^32 + 1, which overflows to 1.
Unsigned overflows already occur in the existing tests.

Also, when switching to arbitrary-precision arithmetic, this results in a many
large integer multiplications resulting in a significant slowdown.

Diff Detail

Event Timeline

arjunp created this revision.Aug 4 2022, 10:47 AM
arjunp requested review of this revision.Aug 4 2022, 10:47 AM
arjunp edited the summary of this revision. (Show Details)Aug 4 2022, 10:48 AM
arjunp edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Aug 4 2022, 10:57 AM
This revision was landed with ongoing or failed builds.Aug 4 2022, 11:14 AM
This revision was automatically updated to reflect the committed changes.