This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -mcpu=power8 atomic expansion (PR target/69644)
- From: Alan Modra <amodra at gmail dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 4 Feb 2016 22:03:29 +1030
- Subject: Re: [PATCH] Fix -mcpu=power8 atomic expansion (PR target/69644)
- Authentication-results: sourceware.org; auth=none
- References: <20160203222801 dot GH3017 at tucnak dot redhat dot com> <CAGWvnymuh+AsjBptAjo_wkOznzQnOz6m4Y7vTYDCjGFYyOHHRg at mail dot gmail dot com>
On Wed, Feb 03, 2016 at 05:34:17PM -0500, David Edelsohn wrote:
> On Wed, Feb 3, 2016 at 5:28 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > Hi!
> >
> > rs6000_expand_atomic_compare_and_swap uses oldval directly in
> > a comparison instruction, but oldval might be a CONST_INT not suitable
> > for the instruction (such as in the testcase below in SImode comparison
> > 0x8000 constant). We need to force those into register if they don't
> > satisfy the predicate.
> >
> > Bootstrapped/regtested on powerpc64{,le}-linux, ok for trunk?
> >
> > 2016-02-03 Jakub Jelinek <jakub@redhat.com>
> >
> > PR target/69644
> > * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
> > Force oldval into register if it does not satisfy reg_or_short_operand
> > predicate. Fix up formatting.
> >
> > * gcc.dg/pr69644.c: New test.
>
> Okay.
This needs to go on gcc-5 and gcc-4.9 branches too, where it fixes
pr69146. pr69146 and pr69644 are dups. OK to apply to the branches?
--
Alan Modra
Australia Development Lab, IBM