This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR57980
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Marc Glisse <marc dot glisse at inria dot fr>
- Date: Tue, 13 Aug 2013 12:27:26 +0200
- Subject: Re: [PATCH] Fix PR57980
- References: <20130809143518 dot GH17022 at redhat dot com> <ea7cf32a-879d-4c31-ab5c-1e6f4995845e at email dot android dot com> <20130812085644 dot GK17022 at redhat dot com> <20130813102459 dot GE1814 at tucnak dot redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Aug 13, 2013 at 12:24:59PM +0200, Jakub Jelinek wrote:
> On Mon, Aug 12, 2013 at 10:56:44AM +0200, Marek Polacek wrote:
> > On Fri, Aug 09, 2013 at 08:40:00PM +0200, Richard Biener wrote:
> > > Marek Polacek <polacek@redhat.com> wrote:
> > > >In this PR the problem was that when dealing with the gimple assign in
> > > >the tailcall optimization, we, when the rhs operand is of a vector
> > > >type, need to create -1 also of a vector type, but build_int_cst
> > > >doesn't create vectors (ICEs). Instead, we should use
> > > >build_minus_one_cst
> > > >because that can create even the VECTOR_TYPE constant (and, it can
> > > >create even REAL_TYPE/COMPLEX_TYPE), as suggested by Marc.
> > > >
> > > >Regtested/bootstrapped on x86_64-linux, ok for trunk and 4.8?
> > >
> > > Ok. Double-check that this function exists on the branch please.
> >
> > It does not :(. So not backporting to 4.8...
>
> For 4.8/4.7, I'd say just change those
> else
> *m = build_int_cst (TREE_TYPE (...), -1);
> into
> else if (INTEGRAL_TYPE_P (TREE_TYPE (...)))
> *m = build_int_cst (TREE_TYPE (...), -1);
> else
> return false;
Also, for the testcase,
typedef int V __attribute__ ((vector_size (sizeof (int))));
looks weird, that is one element vector, can you use 2 * sizeof (int)
instead and add -w to dg-options (for the various -Wpsabi warnings)?
Jakub