This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][GCC][AARCH64] Canonicalize aarch64 widening simd plus insns
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: Matthew Malcomson <matthew dot malcomson at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, richard dot earnshaw at arm dot com, james dot greenhalgh at arm dot com, marcus dot shawcroft at arm dot com, nd at arm dot com
- Date: Thu, 12 Jul 2018 11:18:08 +0100
- Subject: Re: [PATCH][GCC][AARCH64] Canonicalize aarch64 widening simd plus insns
- References: <006edc68-c5a2-e77d-70d6-02ac77ef53e3@arm.com>
Looks good to me FWIW (not a maintainer), just a minor formatting thing:
Matthew Malcomson <matthew.malcomson@arm.com> writes:
> diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
> index aac5fa146ed8dde4507a0eb4ad6a07ce78d2f0cd..67b29cbe2cad91e031ee23be656ec61a403f2cf9 100644
> --- a/gcc/config/aarch64/aarch64-simd.md
> +++ b/gcc/config/aarch64/aarch64-simd.md
> @@ -3302,38 +3302,78 @@
> DONE;
> })
>
> -(define_insn "aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>"
> +(define_insn "aarch64_<ANY_EXTEND:su>subw<mode>"
> [(set (match_operand:<VWIDE> 0 "register_operand" "=w")
> - (ADDSUB:<VWIDE> (match_operand:<VWIDE> 1 "register_operand" "w")
> - (ANY_EXTEND:<VWIDE>
> - (match_operand:VD_BHSI 2 "register_operand" "w"))))]
> + (minus:<VWIDE>
> + (match_operand:<VWIDE> 1 "register_operand" "w")
> + (ANY_EXTEND:<VWIDE>
> + (match_operand:VD_BHSI 2 "register_operand" "w"))))]
The (minus should be under the "(match_operand":
(define_insn "aarch64_<ANY_EXTEND:su>subw<mode>"
[(set (match_operand:<VWIDE> 0 "register_operand" "=w")
(minus:<VWIDE> (match_operand:<VWIDE> 1 "register_operand" "w")
(ANY_EXTEND:<VWIDE>
(match_operand:VD_BHSI 2 "register_operand" "w"))))]
Same for the other patterns.
Thanks,
Richard