This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Thu, 21 Dec 2017 01:16:36 +0100
- Subject: Re: [PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)
- Authentication-results: sourceware.org; auth=none
- References: <20171220221850.GR2353@tucnak> <87r2rp0wip.fsf@linaro.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Dec 21, 2017 at 12:12:14AM +0000, Richard Sandiford wrote:
> Jakub Jelinek <jakub@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