http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54418

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-08-30 13:11:30 
UTC ---
(In reply to comment #0)
>  
> It seems that cmpgeusi_t insn_and_split doesn't do its work.
> 
> (define_insn_and_split "cmpgeusi_t"
>   [(set (reg:SI T_REG)
>     (geu:SI (match_operand:SI 0 "arith_reg_operand" "r")
>         (match_operand:SI 1 "arith_reg_or_0_operand" "rN")))]
>   "TARGET_SH1"
>   "cmp/hs    %1,%0"
>   "&& satisfies_constraint_Z (operands[0])"
>   [(set (reg:SI T_REG) (const_int 1))]
> 
> Oleg, operands[0] in the splitter condition is a typo of
> operands[1], doesn't it?

Yes, it is.  Sorry about that.  Also, the 'N' alternative doesn't make sense in
this
case, as the split will happen before reload will start looking at the
constraints.
I think the pattern should be:

(define_insn_and_split "cmpgeusi_t"
  [(set (reg:SI T_REG)
    (geu:SI (match_operand:SI 0 "arith_reg_operand" "r")
        (match_operand:SI 1 "arith_reg_or_0_operand" "r")))]
  "TARGET_SH1"
  "cmp/hs    %1,%0"
  "&& satisfies_constraint_Z (operands[1])"
  [(set (reg:SI T_REG) (const_int 1))]
  ""
  [(set_attr "type" "mt_group")])

I always wondered under which condition this case would actually
happen.  Now I know it.  Thanks!

Reply via email to