[Bug middle-end/82853] Optimize x % 3 == 0 without modulo
rearnsha at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 4 12:36:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853
--- Comment #27 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #26)
> A test generator for x % c1 == c2 expansion for unsigned, int, unsigned long
> long, long long, unsigned int128 and int128 types (assuming ilp32 or lp64)
> plus tests for those types. Takes about 2 minutes to compile + run on a fast
> box and uses random (), so not really sure the tests should go into the
> testsuite. Thoughts on that? After all, the generator isn't extra smart and
> doesn't try to find problematic corner cases.
If you work on the 'guess' of a 10x slowdown when using simulators, that's
probably too long particularly if it's not delivering high value.
Ultimately, it will depend on how much of that 2 minutes is during
generate/compile and how much during run time.
More information about the Gcc-bugs
mailing list