diff options
author | Richard Biener <rguenther@suse.de> | 2024-10-29 11:26:13 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-10-29 12:17:38 +0100 |
commit | 9999cc79e9866ba33dea0256078f4557d92d80d9 (patch) | |
tree | 2b7cc468d33a369d622e435440437ada72ce48f5 | |
parent | 0e99b22aa666f107c4035d32bfb5ab11534a9d2f (diff) | |
download | gcc-9999cc79e9866ba33dea0256078f4557d92d80d9.zip gcc-9999cc79e9866ba33dea0256078f4557d92d80d9.tar.gz gcc-9999cc79e9866ba33dea0256078f4557d92d80d9.tar.bz2 |
tree-optimization/117343 - decide_masked_load_lanes and stale graph
It turns out decide_masked_load_lanes accesses a stale SLP graph
so the following re-builds it instead.
PR tree-optimization/117343
* tree-vect-slp.cc (vect_optimize_slp_pass::build_vertices):
Support re-building the SLP graph.
(vect_optimize_slp_pass::run): Re-build the SLP graph before
decide_masked_load_lanes.
-rw-r--r-- | gcc/tree-vect-slp.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 2e98a94..a7f064b 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -5632,6 +5632,8 @@ vect_optimize_slp_pass::build_vertices () hash_set<slp_tree> visited; unsigned i; slp_instance instance; + m_vertices.truncate (0); + m_leafs.truncate (0); FOR_EACH_VEC_ELT (m_vinfo->slp_instances, i, instance) build_vertices (visited, SLP_INSTANCE_TREE (instance)); } @@ -7244,6 +7246,8 @@ vect_optimize_slp_pass::run () } else remove_redundant_permutations (); + free_graph (m_slpg); + build_graph (); decide_masked_load_lanes (); free_graph (m_slpg); } |