On 02/14/2012 07:12 PM, Henderson, Stuart wrote:
>> spill_failure does return for asms since we don't want to ICE on bad
>> user code. That's all that's going on here.
> 
> ahh, thanks.
> 
>> It sounds like ifcvt needs to be fixed. Your example:
>>> block 44:
>>> set cc = x;
>>> set cc = y; (*)
>>> if cc jump;
>>
>> looks like an invalid transformation, but I suspect rather than setting
>> the CC register, the (*) insn is setting a pseudo (more accurate RTL
>> would be useful). There are some cases in ifcvt.c which check
>> targetm.small_register_classes_for_mode already, this is probably what
>> should be done to prevent this transformation.
> 
> You suspect correctly, cc=x sets CC whereas cc=y is a pseudo which can only 
> match CC.
> 
> Presumably I must check all instructions in the else_bb for modifications to 
> small_register_classes_for_mode_p?  e.g. see below.
> 
> Does this seem reasonable?

Not really. I think in dead_or_predicable you need to check in the
  /* Try the NCE path if the CE path did not result in any changes.  */
block (I assume this is where we end up in this testcase) that none of
the live hard regs at the point where we are going to insert the insns
are in small register classes. small_register_classes_for_mode_p is
unfortunately not a good interface to answer that question.

It looks like noce_get_condition probably didn't find the instruction
setting CC? Maybe you can paper over the problem for the moment by
making sure it does.


Bernd

Reply via email to