Patchwork rs6000: Fix nonsensical scc splitter pattern

login
register
mail settings
Submitter Segher Boessenkool
Date Sept. 20, 2012, 11:47 p.m.
Message ID <63dff7c35d541f9c256bdf65bf6ef66dd9d812f3.1348173348.git.segher@kernel.crashing.org>
Download mbox | patch
Permalink /patch/185525/
State New
Headers show

Comments

Segher Boessenkool - Sept. 20, 2012, 11:47 p.m.
This splitter is, erm, interesting.  This patch fixes it.

Bootstrapped and regression checked on powerpc64-linux.
Okay to apply?


Segher


2012-09-20  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/
	* config/rs6000/rs6000.md (define_split for plus_eqsi):
	Fix output pattern.
---
 gcc/config/rs6000/rs6000.md |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Edelsohn - Sept. 21, 2012, 12:28 a.m.
On Thu, Sep 20, 2012 at 7:47 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> This splitter is, erm, interesting.  This patch fixes it.
>
> Bootstrapped and regression checked on powerpc64-linux.
> Okay to apply?
>
>
> Segher
>
>
> 2012-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
>
> gcc/
>         * config/rs6000/rs6000.md (define_split for plus_eqsi):
>         Fix output pattern.

Okay.

Thanks, David

Patch

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 9eb0a37..9f96270 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -11829,7 +11829,7 @@  (define_split
    (clobber (match_operand:SI 5 "register_operand" ""))]
   "! gpc_reg_operand (operands[2], SImode)"
   [(set (match_dup 5) (match_dup 2))
-   (set (match_dup 2) (plus:SI (match_op_dup 1 [(match_dup 2) (match_dup 3)])
+   (set (match_dup 0) (plus:SI (match_op_dup 1 [(match_dup 5) (match_dup 3)])
 			       (match_dup 4)))])
 
 (define_insn "*plus_eqsi"