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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|FIXED                       |---

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is not fixed, try
-m32 -O2 -mno-sse.
I believe the issue is that we expand_binop DImode
op0 == target
(mem/c:DI (plus:SI (reg/f:SI 82 virtual-stack-vars)
        (const_int -16 [0xfffffffffffffff0])) [0 MEM[(char *
{ref-all})&value]+0 S8 A128])
and op1
(const_int 9223372036854775807 [0x7fffffffffffffff])
which then expands this per subwords as two SImode expand_binops, but nothing
there is able to optimize & -1 (and similarly | or ^ 0, or & 0, or | -1).
And, combiner doesn't do anything, because it is a single insn that operates on
memory, so there is nothing to combine together.
So, IMHO expand_binop just should handle the easy cases.  I'll prepare a patch.

Reply via email to