The following fixes up the completely botched attempt to save off
the SCC for later setting of the scheduling result to all components.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
PR tree-optimization/127705
* tree-vect-slp.cc (vect_schedule_scc): Fixup SCC copy.
---
gcc/tree-vect-slp.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 0d0089411be..06439dcd9c5 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -12819,7 +12819,8 @@ vect_schedule_scc (vec_info *vinfo, slp_tree node,
slp_instance instance,
iterate and schedule those that are ready. */
unsigned todo = stack.length () - last_idx;
auto_vec<slp_tree, 4> saved_scc (todo);
- memcpy (saved_scc.address (), stack.address ()[last_idx + 1],
+ saved_scc.quick_grow (todo);
+ memcpy (saved_scc.address (), &stack.address ()[last_idx],
sizeof (slp_tree) * todo);
do
{
--
2.51.0