This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000: Fix peephole
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 May 2015 10:18:46 -0400
- Subject: Re: [PATCH] rs6000: Fix peephole
- Authentication-results: sourceware.org; auth=none
- References: <3d9562470808d468756313eb70fa64ace2eaff0f dot 1431091787 dot git dot segher at kernel dot crashing dot org>
On Fri, May 8, 2015 at 9:38 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> This peephole transforms
>
> lis a,HI ; ori a,a,LO
> cmpw c,a,b ; beq c,...
>
> to
>
> xoris a,b,HI1
> cmpwi c,a,LO1 ; beq c,...
>
> when a and c are dead after this. But it forgets to check that a and b
> are not the same reg, generating non-sensical code. This patch fixes that.
>
> Tested etc.; is this okay for trunk?
>
> (This peephole caused some FAILs in the testsuite after an unrelated change;
> gone after this patch).
>
>
> Segher
>
>
> 2015-05-08 Segher Boessenkool <segher@kernel.crashing.org>
>
> * config/rs6000/rs6000.md: Require operand inequality in one
> of the peepholes.
Okay.
Is there an artificial testcase?
Thanks, David