Rewrite convulated code to avoid adding r0.
authorMichael Meissner <meissner@gcc.gnu.org>
Mon, 3 Feb 2020 23:22:18 +0000 (18:22 -0500)
committerMichael Meissner <meissner@gcc.gnu.org>
Mon, 3 Feb 2020 23:22:18 +0000 (18:22 -0500)
commitfb47dc28d2d38f56af65e9f244af8870bd568b0b
tree3e22fbe2ecb20967b7861997e22c3b67ac37fd52
parente7f3e075282bda5c5df03e01932cf8d8e9b55cfc
Rewrite convulated code to avoid adding r0.

2020-02-03  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.c (reg_to_non_prefixed): Add forward
reference.
(hard_reg_and_mode_to_addr_mask): Delete.
(rs6000_adjust_vec_address): If the original vector address
was REG+REG or REG+OFFSET and the element is not zero, do the add
of the elements in the original address before adding the offset
for the vector element.  Use address_to_insn_form to validate the
address using the register being loaded, rather than guessing
whether the address is a DS-FORM or DQ-FORM address.
gcc/ChangeLog
gcc/config/rs6000/rs6000.c