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: regrename creates invalid insn


On 03/26/2012 07:37 PM, Eric Botcazou wrote:
>> Does 4.7 still have the failure at all? I've checked with the 4.6
>> branch, and regrename gets confused because there's a REG_DEAD note for
>> the register, and another REG_UNUSED for the same reg. As far as I
>> remember, it used to be the case that there should not be a REG_DEAD
>> note for a register that gets set in the insn, but maybe df changed the
>> rules? Or maybe it was a df bug in 4.6?
> 
> My understanding is that the REG_UNUSED note causes the chain opened for a dest 
> register operand to be immediately closed but, when you have multiple such 
> dest register operands, one would need to have the chain live "during the 
> instruction" or right after, so that you have a conflict with the other dest 
> register operands for the instruction.  This looks awkward though.

You're right on the behaviour of REG_UNUSED, but it only takes effect
after all destinations have been opened. So they still conflict with
each other, usually.

Here, I think the problem is that we have an in-out operand whose chain
is closed prematurely due to a bogus REG_DEAD note which shouldn't be
there for a register set in the instruction.


Bernd


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