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.
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));
}
}
else
remove_redundant_permutations ();
+ free_graph (m_slpg);
+ build_graph ();
decide_masked_load_lanes ();
free_graph (m_slpg);
}