https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
dragan.mladjenovic at syrmia dot com changed:
What|Removed |Added
CC||dragan.mladjenovic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
--- Comment #7 from CVS Commits ---
The master branch has been updated by Jakub Jelinek :
https://gcc.gnu.org/g:781634daea8cb788efb33994f4a19df76598542e
commit r11-3744-g781634daea8cb788efb33994f4a19df76598542e
Author: Jakub Jelinek
Date: Fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
--- Comment #6 from Gabriel Ravier ---
*** Bug 95532 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
--- Comment #5 from Jakub Jelinek ---
In the source yes, but by the time the optimizer sees it on some targets x == 0
? 32 : __builtin_clz (x) could have been already optimized into just
__builtin_clz (x) depending on what the target macros say.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
--- Comment #4 from Gabriel Ravier ---
Isn't `__builtin_clz(0)` undefined ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
--- Comment #2 from Marc Glisse ---
if(a==0)__builtin_unreachable();
lets gcc optimize the code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94801
--- Comment #1 from Marc Glisse ---
Gcc considers that clz might return 32 on some platforms, it does not currently
use target-specific information to restrict the range of clz output.