This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Use CC_Z and CC_NZ with csinc and similar instructions
- From: Richard Henderson <rth at redhat dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 18 Aug 2014 11:52:45 -0700
- Subject: Re: [PATCH][AArch64] Use CC_Z and CC_NZ with csinc and similar instructions
- Authentication-results: sourceware.org; auth=none
- References: <53F1F068 dot 4070708 at arm dot com>
On 08/18/2014 05:24 AM, Kyrill Tkachov wrote:
> -(define_insn "*csinc2<mode>_insn"
> +(define_insn "*csinc2<mode>_<CC_ZERO:mode>_insn"
> [(set (match_operand:GPI 0 "register_operand" "=r")
> (plus:GPI (match_operator:GPI 2 "aarch64_comparison_operator"
> - [(match_operand:CC 3 "cc_register" "") (const_int 0)])
> + [(match_operand:CC_ZERO 3 "cc_register" "") (const_int 0)])
Rather than create 3 patterns that only vary in this mode, it would be better
to use (match_operand 3 "cc_register_zero"). Where the predicate is defined
with define_special_predicate so that you move the mode check inside the predicate.
r~