On 01/27/15 14:21, Segher Boessenkool wrote:
On Tue, Jan 27, 2015 at 01:53:34PM -0700, Jeff Law wrote:
I do have a specific PR in mind, but I cannot currently find it.  It was
about x86, dec mem and then using the flags...  Must have sent 100 emails
in that thread...  And cannot find it now!
Are you referring to 61225?

That is the one, thanks.
It's not going to help 61225.  The key insns in 61225 are:

(insn 6 3 7 2 (set (reg:SI 91 [ *x_3(D) ])
(mem:SI (reg/v/f:SI 90 [ x ]) [1 *x_3(D)+0 S4 A32])) k.c:11 90 {*movsi_internal}
     (nil))
(insn 7 6 8 2 (parallel [
            (set (reg:SI 88 [ D.1494 ])
                (plus:SI (reg:SI 91 [ *x_3(D) ])
                    (const_int -1 [0xffffffffffffffff])))
            (clobber (reg:CC 17 flags))
        ]) k.c:11 220 {*addsi_1}
     (expr_list:REG_DEAD (reg:SI 91 [ *x_3(D) ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_EQUAL (plus:SI (mem:SI (reg/v/f:SI 90 [ x ]) [1 *x_3(D)+0 S4 A32])
                    (const_int -1 [0xffffffffffffffff]))
                (nil)))))
(insn 8 7 9 2 (set (mem:SI (reg/v/f:SI 90 [ x ]) [1 *x_3(D)+0 S4 A32])
        (reg:SI 88 [ D.1494 ])) k.c:11 90 {*movsi_internal}
     (nil))
(insn 9 8 10 2 (set (reg:CCZ 17 flags)
        (compare:CCZ (reg:SI 88 [ D.1494 ])
            (const_int 0 [0]))) k.c:11 3 {*cmpsi_ccno_1}
     (expr_list:REG_DEAD (reg:SI 88 [ D.1494 ])
        (nil)))


Note how REG:SI 88 has two uses. Never do we pass a set of insns into try_combine that are useful to optimize this particular case (we never include insn #9 in any of the attempted combinations).

Even a bridge pattern isn't going to help here.


jeff






Reply via email to