Scott Michel
2010-Feb-26 02:18 UTC
[LLVMdev] RegisterScavenging on targets without subregisters
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/aef5c1be/attachment.html>
Scott Michel
2010-Feb-26 03:00 UTC
[LLVMdev] RegisterScavenging on targets without subregisters
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/d19084af/attachment.html>
Scott Michel
2010-Feb-26 06:23 UTC
[LLVMdev] RegisterScavenging on targets without subregisters
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>
Maybe Matching Threads
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters