On Mon, 2020-01-27 at 17:02 +0000, Richard Sandiford wrote:
> gcc.dg/pr56350.c started ICEing for SVE in GCC 10 because we
> pattern-matched a division reduction:
> 
>       a /= 8;
> 
> into a signed shift with division semantics:
> 
>       ... = IFN_SDIV_POW2 (..., 3);
> 
> whereas the reduction code expected it still to be a gassign.
> 
> One fix would be to check for a reduction in the pattern matcher
> (but current patterns don't generally do that).  Another would be
> to fail gracefully for reductions involving calls.  Since we can't
> vectorise the reduction either way, and probably have a better shot
> with the shift form, this patch goes for the "fail gracefully" approach.
> 
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?
> 
> Richard
> 
> 
> 2020-01-27  Richard Sandiford  <richard.sandif...@arm.com>
> 
> gcc/
>       * tree-vect-loop.c (vectorizable_reduction): Fail gracefully
>       for reduction chains that (now) include a call.
OK
jeff
> 

Reply via email to