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: [PATCH][AArch64] Use CC_Z and CC_NZ with csinc and similar instructions


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~


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