Hi,

On Mon, Apr 13, 2020 at 10:24:39PM -0400, Michael Meissner wrote:
> This patch fixes PR target/94557, on PowerPC.  It was a regression on the GCC 
> 9
> branch caused by my recent patch for PR target/93932.
> 
> The patch for 93932 was a back port from the master branch of a fix for the
> vec_extract built-in function.  This patch fixes the case where we are
> optimizing a vector extract from an vector in memory to be a scalar load
> instead of loading the vector to a register and then doing an extract.

What does "this patch" mean?  The backport?

> This patch adds in the masking of the vector index that is in the master
> branch.  I re-implemented the change for GCC 9, since the changes on the 
> master
> branch are more extensive, and include PC-relative support that is not in GCC
> 9.

Hrm.

> 2020-04-13  Michael Meissner  <meiss...@linux.ibm.com>
> 
>       PR target/94557
>       * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Mask
>       variable vector extract index so it does not go beyond the vector
>       when extracting a vector element from memory.  This change is a
>       simplification of the 2020-02-03 patch that went into the trunk.

You have no patches go into trunk at that date.

> --- /tmp/4XFFqK_rs6000.c      2020-04-13 15:28:33.514011024 -0500
> +++ gcc/config/rs6000/rs6000.c        2020-04-13 14:24:01.296932921 -0500
> @@ -7047,18 +7047,25 @@ rs6000_adjust_vec_address (rtx scalar_re
>      element_offset = GEN_INT (INTVAL (element) * scalar_size);
>    else
>      {
> +      /* Mask the element to make sure the element number is between 0 and 
> the
> +      maximum number of elements - 1 so that we don't generate an address
> +      outside the vector.  */

The patch introducing this to trunk was reverted.


I don't get the warm and fuzzies from this patch.  How can I expect that
it won't cause more problems than it solves, like this?  Reverts and new
implementations, and also mislabeled?

Please explain this better?


Segher

Reply via email to