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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There is nothing weird about what cprop1 does, __builtin_ffs (0) is known to be
0, with so many disabled optimizations we just don't optimize it away nor
simplify earlier.  So the
        mov     eax, 0  # tmp201,
        bsf     edx, eax        # _28, tmp201
        mov     ecx, -16        # tmp204,
        add     eax, ecx        # tmp203, tmp204
part is just fine, we replaced the edx in the addition with eax which is known
to hold the same value, and because DCE is disabled nothing removes the dead
bsf.

Reply via email to