Use get_related_vectype_for_scalar_type for reduction indices
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 10 Jan 2020 14:56:31 +0000 (14:56 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 10 Jan 2020 14:56:31 +0000 (14:56 +0000)
commitd29c7f605fc6b531eaf351bf5909e7c551fc6b9e
treea7aef92f03f334b036508365f41954f61b6f3d83
parentac190fcea1bebf87a2c8c3963548a0e5272c42ec
Use get_related_vectype_for_scalar_type for reduction indices

The related_vector_mode series missed this case in
vect_create_epilog_for_reduction, where we want to create the
unsigned integer equivalent of another vector.  Without it we
could mix SVE and Advanced SIMD vectors in the same operation.

This showed up on existing tests when testing with fixed-length
-msve-vector-bits=128.

2020-01-10  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-loop.c (vect_create_epilog_for_reduction): Use
get_related_vectype_for_scalar_type rather than build_vector_type
to create the index type for a conditional reduction.

From-SVN: r280112
gcc/ChangeLog
gcc/tree-vect-loop.c