Re: [PATCH] Fix latent SLP bugs and a memleak

2019-01-22 Thread Richard Biener
On Mon, 21 Jan 2019, Richard Sandiford wrote: > Richard Biener writes: > > @@ -5742,8 +5740,14 @@ vectorize_fold_left_reduction (stmt_vec_info > > stmt_info, > >auto_vec vec_oprnds0; > >if (slp_node) > > { > > - vect_get_vec_defs (op0, NULL_TREE, stmt_info, &vec_oprnds0, NULL,

Re: [PATCH] Fix latent SLP bugs and a memleak

2019-01-21 Thread Richard Sandiford
Richard Biener writes: > @@ -5742,8 +5740,14 @@ vectorize_fold_left_reduction (stmt_vec_info stmt_info, >auto_vec vec_oprnds0; >if (slp_node) > { > - vect_get_vec_defs (op0, NULL_TREE, stmt_info, &vec_oprnds0, NULL, > - slp_node); > + auto_vec > vec_defs

[PATCH] Fix latent SLP bugs and a memleak

2019-01-21 Thread Richard Biener
When investigating some issues I ran into two SLP op gathering issues. *You may not ask for SLP vector def ops in the wrong order* Both vectorizable_comparison and vectorize_fold_left_reduction fall into this trap. I've also fixed a memleak uncovered by valgrind that I ran on the above fix and