Re: [PATCH v2 1/9] aarch64: Accept 0 as first argument to compares

2020-03-31 Thread Richard Henderson via Gcc-patches
On 3/31/20 9:55 AM, Richard Sandiford wrote: >> (define_insn "cmp" >>[(set (reg:CC CC_REGNUM) >> -(compare:CC (match_operand:GPI 0 "register_operand" "rk,rk,rk") >> -(match_operand:GPI 1 "aarch64_plus_operand" "r,I,J")))] >> +(compare:CC (match_operand:GPI 0 "aarch64_re

Re: [PATCH v2 1/9] aarch64: Accept 0 as first argument to compares

2020-03-31 Thread Richard Sandiford
Richard Henderson writes: > While cmp (extended register) and cmp (immediate) uses , > cmp (shifted register) uses . So we can perform cmp xzr, x0. > > For ccmp, we only have as an input. > > * config/aarch64/aarch64.md (cmp): For operand 0, use > aarch64_reg_or_zero. Shuffle reg/re

[PATCH v2 1/9] aarch64: Accept 0 as first argument to compares

2020-03-20 Thread Richard Henderson via Gcc-patches
While cmp (extended register) and cmp (immediate) uses , cmp (shifted register) uses . So we can perform cmp xzr, x0. For ccmp, we only have as an input. * config/aarch64/aarch64.md (cmp): For operand 0, use aarch64_reg_or_zero. Shuffle reg/reg to last alternative and a