> (define_insn "subsi3"
> [(set (match_operand:SI 0 "register_operand" "=d,d,d,d,d")
> (minus:SI (match_operand:SI 1 "arith_operand" "dJ,dJ,dJ,I,i")
> (match_operand:SI 2 "arith_operand" "d,I,i,dJ,dJ")))]
...
> (define_insn "subdi3"
> [(set (match_operand:DI 0 "register_operand" "=d,d,d,d")
> (minus:DI (match_operand:DI 1 "register_operand" "d,d,d,d")
> (match_operand:DI 2 "arith_operand" "d,P,J,N")))]
You can ditch the immediate alternatives to operand 2; those should have
been canonicalized to addition. You can ditch the pure zero
alternatives as well, those should have been discarded entirely.
You might do well to write subdi3 as
(define_insn "subdi3"
[(set (match_operand:DI 0 "register_operand" "=d,d")
(minus:DI (match_operand:DI 1 "arith_operand" "d,n")
(match_operand:DI 2 "register_operand" "d,d")))]
""
"@
rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1
rsubi\t%L0,%L2,%L1\;rsubic\t%M0,%M2,%M1"
...)
And, really, subsi3 shouldn't be much different.