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: David Edelsohn <dje dot gcc at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 3 Feb 2016 17:34:17 -0500
- 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>
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.
Thanks, David