Skip to content
Commit bad95b72 authored by Arjun P's avatar Arjun P
Browse files

[MLIR][Presburger] fourier-motzkin: check if all LCMs are 1 using a bool...

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

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.

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D131184
parent f6bd0a8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment