This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64 08/14] Define a variant of cmp for the CC_NZ case.


On Tue, Feb 18, 2014 at 1:09 PM, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> This pattern is not strictly necessary and a similar effect could
> be achieved through the use of a suitable compatibility relation
> for CC modes; in the meantime, this helps on some benchmarks.


Can you add a testcase or two for this patch?  Having an example will
help people in the future understand why these patterns are added.

Thanks,
Andrew Pinski

> ---
>  gcc/config/aarch64/aarch64.md | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index 13a75d3..60e42af 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -2159,6 +2159,19 @@
>    [(set_attr "type" "alus_reg,alus_imm,alus_imm")]
>  )
>
> +;; variant that generates a CC_NZ output mode
> +(define_insn "*cmp<mode>_nz"
> +  [(set (reg:CC_NZ CC_REGNUM)
> +       (compare:CC_NZ (match_operand:GPI 0 "register_operand" "r,r,r")
> +                      (match_operand:GPI 1 "aarch64_plus_operand" "r,I,J")))]
> +  ""
> +  "@
> +   cmp\\t%<w>0, %<w>1
> +   cmp\\t%<w>0, %<w>1
> +   cmn\\t%<w>0, #%n1"
> +  [(set_attr "type" "alus_reg,alus_imm,alus_imm")]
> +)
> +
>  (define_insn "*cmp<mode>"
>    [(set (reg:CCFP CC_REGNUM)
>          (compare:CCFP (match_operand:GPF 0 "register_operand" "w,w")
> --
> 1.9.0
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]