This is the mail archive of the 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: Review, required changes

Richard Henderson wrote:

 > (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")))]

And, really, subsi3 shouldn't be much different.

Simplified both subsi3 and subdi3. Also fixed bug in ashl*.
svn diff svn:// -r 156908:156909

Michael Eager
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

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