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]

Re: GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test


Jeff Law writes:

 > Basically we had something like this before combine:
 > 
 > (set (reg1) (mem (blah))
 > (set (reg2) (mem (oof))
 > (set (reg3) (minus (reg1) (reg2))
 > 
 > Combine turned that into:
 > 
 > (set (reg3) (minus (mem (blah)) (reg2))
 > 
 > Which is allowed by the predicates for the subsi3 insn.
 > 
 > However, it loses because the first input does not match the output
 > operand.  This causes spills & reloads and bad code.

Why not use the extra condition to prevent the combination if the
first input does not match the output operand?

Michael.


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