http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29776

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Or yet another option is just to always use [0, prec] VR for CLZ (and lower it
for defined range, as the patch does right now), i.e. for CLZ
change maxi = prec - 1; to maxi = prec; and drop if (maxi == prec) maxi = prec
- 1;, looking for all targets where the value for 0 is defined for CLZ it is
mode size, and it ought to behave well even with the widening/narrowing
expansions.

And for CTZ just leave 0 as undefined, because there really are just too many
possibilities what you can get, and it isn't relevant to longlong.h either,
because there is no COUNT_TRAILING_ZEROS_0 macro.

Reply via email to