[Bug rtl-optimization/87763] [9 Regression] aarch64 target testcases fail after r265398

law at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 3 20:46:00 GMT 2019


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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com

--- Comment #36 from Jeffrey A. Law <law at redhat dot com> ---
My combiner-fu is old and getting dated.  But I wonder if we're writing off
zero_extract too quickly.

For the first test in insv1 (and I suspect others are similar) we get into
make_field_assignment with something *almost* usable.  In particular:

(set (reg/i:DI 0 x0)
    (ior:DI (and:DI (reg:DI 95)
            (const_int -256 [0xffffffffffffff00]))
        (const_int 3 [0x3])))


The only reason this isn't going to be recognized as a field assignment is
because  we don't have a RMW.  But we can trivially turn that into a RMW by
emitting a copy from reg95 to reg0 and changing the source to reg0.

That runs afoul of the general direction we're taking WRT hard registers, so
another choice might be to use an existing pseudo that we know is going to die
-- reg92 in this case which isn't seen in the extraction pattern.  So we'd copy
reg95 into reg92 before the extraction and change the source & destination in
the extraction to reg92.  Then copy reg92 into reg0 after the extraction.

I wonder if we could pass in a scratch register from try_combine down to
make_field_assignment to facilitate something like this...


More information about the Gcc-bugs mailing list