diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-07-13 10:17:37 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-07-13 10:17:37 +0100 |
commit | 81ad6bfc078ca36a42446e2f2295102ffaac9ee1 (patch) | |
tree | ae8e8304dd2065c4e90e6fe822762f6303e50bad /gcc/tree-vect-loop-manip.c | |
parent | b68eb70bd6df8c4b846bddb4f0aeae9054b932bc (diff) | |
download | gcc-81ad6bfc078ca36a42446e2f2295102ffaac9ee1.zip gcc-81ad6bfc078ca36a42446e2f2295102ffaac9ee1.tar.gz gcc-81ad6bfc078ca36a42446e2f2295102ffaac9ee1.tar.bz2 |
vect: Remove new_phis from vect_create_epilog_for_reduction
vect_create_epilog_for_reduction had a variable called new_phis.
It collected the statements that produce the exit block definitions
of the vector reduction accumulators. Although those statements
are indeed phis initially, they are often replaced with normal
statements later, leading to puzzling code like:
FOR_EACH_VEC_ELT (new_phis, i, new_phi)
{
int bit_offset;
if (gimple_code (new_phi) == GIMPLE_PHI)
vec_temp = PHI_RESULT (new_phi);
else
vec_temp = gimple_assign_lhs (new_phi);
Also, although the array collects statements, in practice all users want
the lhs instead.
This patch therefore replaces new_phis with a vector of gimple values
called “reduc_inputs”.
Also, reduction chains and ncopies>1 were handled with identical code
(and there was a comment saying so). The patch unites them into
a single “if”.
gcc/
* tree-vect-loop.c (vect_create_epilog_for_reduction): Replace
the new_phis vector with a reduc_inputs vector. Combine handling
of reduction chains and ncopies > 1.
Diffstat (limited to 'gcc/tree-vect-loop-manip.c')
0 files changed, 0 insertions, 0 deletions