https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98299
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98299
--- Comment #3 from Gabriel Ravier ---
PS: The optimization seems to already occur for simpler cases such as powers of
2, e.g. :
int f1(int n)
{
while (n >= 64)
n -= 64;
return n;
}
is optimized into `return (n <= 63) ? n : (n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98299
--- Comment #2 from Gabriel Ravier ---
At the very least, it seems like a worthwhile pattern to recognize in -O3, even
if only to avoid vectorizing it, i.e. have similar effects to what happens if
you add `if (n >= 1000) __builtin_unreachable();`
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98299
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1