[Bug target/17108] Store with update not generated for a simple loop

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 17 09:46:00 GMT 2019


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

--- Comment #9 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Wed Apr 17 09:45:57 2019
New Revision: 270407

URL: https://gcc.gnu.org/viewcvs?rev=270407&root=gcc&view=rev
Log:
rs6000: Improve the load/store-with-update patterns (PR17108)

Many of these patterns only worked in 32-bit mode, and some only worked
in 64-bit mode.  This patch makes these use Pmode, fixing the PR.  On
the other hand, the stack updates have to use the same mode for the
stack pointer as for the value stored, so let's simplify that a bit.

Many of these patterns pass the wrong mode to
avoiding_indexed_address_p (it should be the mode of the datum
accessed, not the mode of the pointer).

Finally, I merge some patterns into one (using iterators).


        PR target/17108
        * config/rs6000/rs6000.c (rs6000_split_multireg_move): Adjust pattern
        name.
        (rs6000_emit_allocate_stack_1): Simplify condition.  Adjust pattern
        name.
        * config/rs6000/rs6000.md (bits): Add entries for SF and DF.
        (*movdi_update1): Use Pmode.
        (movdi_<mode>_update): Fix argument to avoiding_indexed_address_p.
        (movdi_<mode>_update_stack): Rename to ...
        (movdi_update_stack): ... this.  Fix comment.  Change condition. Don't
        use Pmode.
        (*movsi_update1): Use Pmode.
        (*movsi_update2): Use Pmode.
        (movsi_update): Rename to ...
        (movsi_<mode>_update): ... this.  Use Pmode.
        (movsi_update_stack): Fix condition.
        (*movhi_update1): Use Pmode.  Fix argument to
        avoiding_indexed_address_p.
        (*movhi_update2): Ditto.
        (*movhi_update3): Ditto.
        (*movhi_update4): Ditto.
        (*movqi_update1): Ditto.
        (*movqi_update2): Ditto.
        (*movqi_update3): Ditto.
        (*movsf_update1, *movdf_update1): Merge, rename to...
        (*mov<mode>_update1): This.  Use Pmode.  Fix argument to
        avoiding_indexed_address_p.  Add "size" attribute.
        (*movsf_update2, *movdf_update2): Merge, rename to...
        (*mov<mode>_update2): This.  Ditto.
        (*movsf_update3): Use Pmode.  Fix argument to
        avoiding_indexed_address_p.
        (*movsf_update4): Ditto.
        (allocate_stack): Simplify condition.  Adjust pattern names.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/config/rs6000/rs6000.md


More information about the Gcc-bugs mailing list