[LLVMdev] RegisterScavenging on targets without subregisters

Scott Michel scooter.phd at gmail.com
Thu Feb 25 22:23:17 PST 2010


No, I wasn't having a management lobotomy moment. If the target's registers
have no subregisters, SubUsed is false and the assert gets tripped.

Ok, back to the original question: What was the original intent in this code
(lines 186-193 in lib/CodeGen/RegisterScavenging.cpp)?


-scooter

On Thu, Feb 25, 2010 at 7:00 PM, Scott Michel <scooter.phd at gmail.com> wrote:

> Ugh. Management lobotomy kicked in. Need to RTFC better.
>
>
> On Thu, Feb 25, 2010 at 6:18 PM, Scott Michel <scooter.phd at gmail.com>wrote:
>
>> There's an assert at line 192, lib/CodeGen/RegisterScavenging.cpp that
>> appears to get tripped on targets that don't have subregisters defined:
>>
>>         bool SubUsed = false;
>>         for (const unsigned *SubRegs = TRI->getSubRegisters(Reg);
>>              unsigned SubReg = *SubRegs; ++SubRegs)
>>           if (isUsed(SubReg)) {
>>             SubUsed = true;
>>             break;
>>           }
>>         assert(SubUsed && "Using an undefined register!");
>>
>> CellSPU does not define any subregisters; consequently, SubUsed will
>> always be false and trip the assert. What's the intended behavior (before I
>> submit a bug report)?
>>
>>
>> -scooter
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100225/3ffc020c/attachment.html>


More information about the llvm-dev mailing list