https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118755

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> propagating insn 11 into insn 12, replacing:
> (set (reg:QI 107 [ _3 ])
>     (subreg:QI (reg:SI 108) 0))
> failed to match this instruction:
> (set (reg:QI 107 [ _3 ])
>     (subreg:QI (eq:SI (reg:CC 66 cc)
>             (const_int 0 [0])) 0))
> 
> 
> Actually we could extend the cset patterns to do all integer modes.

Actually we do have that already:
```
(define_insn "aarch64_cstore<mode>"
  [(set (match_operand:ALLI 0 "register_operand" "=r")
        (match_operator:ALLI 1 "aarch64_comparison_operator_mode"
         [(match_operand 2 "cc_register" "") (const_int 0)]))]
  ""
  "cset\\t%<w>0, %m1"
  [(set_attr "type" "csel")]


(define_mode_iterator ALLI [QI HI SI DI])
```


Maybe we should have it always done as QI mode while expanding and add a
pattern with zero_extend.

Reply via email to