This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 04/10] rs6000: Remove addic from the normal add pattern
- 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: Mon, 8 Dec 2014 09:44:44 -0500
- Subject: Re: [PATCH 04/10] rs6000: Remove addic from the normal add pattern
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1418024189 dot git dot segher at kernel dot crashing dot org> <b5d9e7d6e5ad4b24fb61cef9f08c8a5a7df04a2e dot 1418024189 dot git dot segher at kernel dot crashing dot org>
On Mon, Dec 8, 2014 at 9:18 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> This means we can no longer add GPR0+imm. Register allocation will have
> to use a different register.
>
>
> 2014-12-08 Segher Boessenkool <segher@kernel.crashing.org>
>
> gcc/
> PR target/64180
> * config/rs6000/rs6000.md (*add<mode>3_internal1): Remove addic
> alternative.
>
> ---
> gcc/config/rs6000/rs6000.md | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
> index 6f4bafb..1647f8b 100644
> --- a/gcc/config/rs6000/rs6000.md
> +++ b/gcc/config/rs6000/rs6000.md
> @@ -1491,17 +1491,14 @@ (define_expand "add<mode>3"
> }
> })
>
> -;; Discourage ai/addic because of carry but provide it in an alternative
> -;; allowing register zero as source.
> (define_insn "*add<mode>3_internal1"
> - [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r,?r,r")
> - (plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "%r,b,r,b")
> - (match_operand:GPR 2 "add_operand" "r,I,I,L")))]
> + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r,r")
> + (plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "%r,b,b")
> + (match_operand:GPR 2 "add_operand" "r,I,L")))]
> "!DECIMAL_FLOAT_MODE_P (GET_MODE (operands[0])) && !DECIMAL_FLOAT_MODE_P (GET_MODE (operands[1]))"
> "@
> add %0,%1,%2
> addi %0,%1,%2
> - addic %0,%1,%2
> addis %0,%1,%v2"
> [(set_attr "type" "add")])
>
> --
> 1.8.1.4
>
Why are you removing the alternative instead of clobbering XER[CA]?
Thanks, David