2016-01-11 20:13 GMT+03:00 Jakub Jelinek <ja...@redhat.com>: > Hi! > > Based on discussions on IRC, I'm submitting following fix for a regression > on aarch64 - partial reversion (the case where VCE works too, just I thought > using NOP_EXPR would be nicer) and change in the assert - op better be > some integral value if converting it to VECTOR_BOOLEAN_TYPE_P's element > type. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2016-01-11 Jakub Jelinek <ja...@redhat.com> > > PR tree-optimization/69207 > * tree-vect-slp.c (vect_get_constant_vectors): For > VECTOR_BOOLEAN_TYPE_P, assert op has integral type instead of > fold_convertible_p to vector_type's element type, and always > use VCE for non-VECTOR_BOOLEAN_TYPE_P. > > --- gcc/tree-vect-slp.c.jj 2016-01-08 21:45:57.000000000 +0100 > +++ gcc/tree-vect-slp.c 2016-01-11 12:07:19.633366712 +0100 > @@ -2999,12 +2999,9 @@ vect_get_constant_vectors (tree op, slp_ > gimple *init_stmt; > if (VECTOR_BOOLEAN_TYPE_P (vector_type)) > { > - gcc_assert (fold_convertible_p (TREE_TYPE (vector_type), > - op)); > + gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (op))); > init_stmt = gimple_build_assign (new_temp, NOP_EXPR, > op);
In vect_init_vector we had to introduce COND_EXPR to choose between 0 and -1 for boolean vectors. Shouldn't we do similar in SLP? Thanks, Ilya > } > - else if (fold_convertible_p (TREE_TYPE (vector_type), op)) > - init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op); > else > { > op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type), > > Jakub