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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Might be useful to drop the builtin on the floor during expansion if it doesn't
have lhs as an optimization (I think it is intentionally not const or pure
because it depends on any code that sets the flags; though it seems rather
poorly defined because we don't have any dependencies on the surrounding code,
but after all, user can't know what arithmetic instruction that modifies flags
we decide to use last before the builtin).
That said, LRA shouldn't optimize away instructions like:
(insn 6 5 0 2 (set (reg:DI 82)
        (mem:DI (post_inc:DI (reg/f:DI 7 sp)) [0  S8 A8])) "pr104971.c":3:14 62
{*popdi1}
     (expr_list:REG_UNUSED (reg:DI 82)
        (nil)))
just because they are unused, because they have side-effects.

Reply via email to