https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78037

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #9)
> Created attachment 39845 [details]
> Patch that introduces new builtins with UNSPEC_LZCNT and UNSPEC_TZCNT RTX
> patterns

Instead of UNSPEC, wouldn't it be better to model exactly what it does in RTL,
i.e. op ? C[TL]Z (op) : <const> ?  That way RTL optimizers could fold it.
Of course folding it in gimple_fold target hook would be useful too.

Reply via email to