gnu/gcc/bdb57f786277a07054bb6be3ba8054b003c3877d tree-optimization/123729 - fix reduction epilog flowing into abnormal edge
When we vectorize a reduction and the reduction value flows across
an abnormal edge we have to make sure to mark the final SSA properly.
The following serves as a recipie how to avoid blindly copying
SSA_NAME_OCCURS_IN_ABNORMAL_PHI but instead set it when needed during
use replacement.
PR tree-optimization/123729
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Set
SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the reduction flows
across an abnomal edge.
* g++.dg/torture/pr123729.C: New testcase.
(cherry picked from commit 06765f2e0fc4991e08adda7f72902edfb7e70fbb)
2 files changed