On Thu, Dec 21, 2017 at 12:12:14AM +0000, Richard Sandiford wrote: > Jakub Jelinek <ja...@redhat.com> writes: > > Hi! > > > > In rtl.texi we say: > > @findex const_vector > > @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}]) > > Represents a vector constant. The square brackets stand for the vector > > containing the constant elements. @var{x0}, @var{x1} and so on are > > the @code{const_int}, @code{const_wide_int}, @code{const_double} or > > @code{const_fixed} elements. > > and it is a very reasonable requirement. > > simplify_const_{unary,binary}_operation can violate that though, because > > the recursion can return also other expressions, like in this case > > a (mult (const_double) (const_double)) that can't be simplified because > > of -frounding-math. We need to punt on those. > > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > How about renaming valid_for_const_vec_duplicate_p to something more > generic and using it here too? The requirements should be the same.
As it generates CONST_VECTOR, renaming it to valid_for_const_vector_p and using it also in simplify-rtx.c looks reasonable to me. Jakub