From 616351b897c834500e685f4ab6ece4d82b506d29 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 28 Oct 2020 14:16:05 +0100 Subject: [PATCH] Fix iteration over loads in SLP optimize I've made a typo when refactoring the iteration over all loads in the SLP graph. Fixed. 2020-10-28 Richard Biener * tree-vect-slp.c (vect_optimize_slp): Fix iteration over all loads. --- gcc/tree-vect-slp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 50a2d37eb25..5eafc037955 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -3043,7 +3043,7 @@ vect_optimize_slp (vec_info *vinfo) /* Now elide load permutations that are not necessary. */ for (i = 0; i < leafs.length (); ++i) { - node = vertices[i]; + node = vertices[leafs[i]]; if (!SLP_TREE_LOAD_PERMUTATION (node).exists ()) continue; -- 2.30.2