]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Improve the load/store-with-update patterns (PR17108)
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Apr 2019 09:45:57 +0000 (09:45 +0000)
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Apr 2019 09:45:57 +0000 (09:45 +0000)
commitb3eb6cc20be5bdcd0f5b8777baf92a44b4caf2a1
tree78fa9ea521ddb3c87af89fbb058e052ec1039a6c
parentb8d03885017763f914a48b19b6cb383239430b97
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270407 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md