[Bug target/78037] Incorrect code generated at optimization level -O2 for tzcnt and binary and
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 20 10:34:00 GMT 2016
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.
More information about the Gcc-bugs
mailing list