This is the mail archive of the gcc@gcc.gnu.org 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: PR 6394


 In message <200204302323.g3UNNLHv000893@hiauly1.hia.nrc.ca>, "John David 
Anglin
" writes:
 > This is the insn
 > 
 > (define_insn ""
 >   [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand"
 > 				"=r,r,r,r,r,r,Q,*q,!f,f,*TR")
 > 	(match_operand:DI 1 "move_operand"
 > 				"A,r,J,N,K,RQ,rM,rM,!fM,*RT,f"))]
 >   "(register_operand (operands[0], DImode)
 >     || reg_or_0_operand (operands[1], DImode))
 >    && ! TARGET_SOFT_FLOAT && TARGET_64BIT"
 > 
 > I believe that the possible alternatives are the first and second last.
 > I don't understand the costs though I can sort of understand thar R1_REGS
 > might be low since %r1 is an input.
You have to look at multiple insns to get the cost for any particular register.

ie, you have to look at every insn that sets or references reg 714.

There are two sets.  They match the pattern above, but can only be satisfied
by the first alternative.  The one reference is a simple reg->reg copy 
and can match the r->r alternative or !fM->f alternative.

The key point is that there are two insns which can only match the A->r
alternative which should have given us a very strong preference for a
general register.  Yet we still have zero cost for FP_REGS.

jeff



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