This implements an optimization described in Hacker's Delight 10-17:
when C is constant, the result of X % C == 0 can be computed
more cheaply without actually calculating the remainder.
The motivation is discussed here: https://bugs.llvm.org/show_bug.cgi?id=35479.
One huge caveat: this signed case is only valid for positive divisors.
While we can freely negate negative divisors, we can't negate INT_MIN,
so for now if INT_MIN is encountered, we bailout.
As a follow-up, it should be possible to handle that more gracefully
via extra and+setcc+select.
This passes llvm's test-suite, and from cursory(!) cross-examination
the folds (the assembly) match those of GCC, and manual checking via alive
did not reveal any issues (other than the INT_MIN case)
Pull this out and add a unit test? Ideally this could be optimized a lot more.