On Thu, Oct 01, 2026 at 10:36:46AM +0200, Richard Biener wrote:
> I think it makes sense to gate on the return type just for the sake
> of early out - I suppose it was supposed to gate the opposite of
> real_cst_p (arg) && INTEGRAL_TYPE_P (type) (which also uses a type
> check). It also acts as somewhat of a safety against those
> pesky invalid testcases prototyping existing builtins with bogus types...
All these builtins are __builtin_* so I think incorrect declaration is
not possible, but sure, I'm fine with INTEGRAL_TYPE_P (type), just
it should be done in both spots for consistency, not just one
(of course, it is less important in the second case because it is just
CLZ/CTZ in there are that will always have int return type).
Jakub