Adjust how variable vector extraction is done.
authorMichael Meissner <meissner@gcc.gnu.org>
Mon, 3 Feb 2020 22:57:57 +0000 (17:57 -0500)
committerMichael Meissner <meissner@gcc.gnu.org>
Mon, 3 Feb 2020 22:57:57 +0000 (17:57 -0500)
commite7f3e075282bda5c5df03e01932cf8d8e9b55cfc
tree0073eea9642e6ef159c21a3d7d3edab8c3651cfa
parent87fbd5347b33883006dc77e779b9edc590fcd2f0
Adjust how variable vector extraction is done.

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

* config/rs6000/rs6000.c (get_vector_offset): New helper function
to calculate the offset in memory from the start of a vector of a
particular element.  Add code to keep the element number in
bounds if the element number is variable.
(rs6000_adjust_vec_address): Move calculation of offset of the
vector element to get_vector_offset.
(rs6000_split_vec_extract_var): Do not do the initial AND of
element here, move the code to get_vector_offset.
gcc/ChangeLog
gcc/config/rs6000/rs6000.c