mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-23 12:40:38 +00:00
[RDF] Correctly enumerate reg units for reg masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300368 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f8f049069
commit
05d022e31e
@ -246,13 +246,15 @@ bool RegisterAggr::hasCoverOf(RegisterRef RR) const {
|
||||
|
||||
RegisterAggr &RegisterAggr::insert(RegisterRef RR) {
|
||||
if (PhysicalRegisterInfo::isRegMaskId(RR.Reg)) {
|
||||
// XXX SLOW
|
||||
BitVector PU(PRI.getTRI().getNumRegUnits()); // Preserved units.
|
||||
const uint32_t *MB = PRI.getRegMaskBits(RR.Reg);
|
||||
for (unsigned i = 1, e = PRI.getTRI().getNumRegs(); i != e; ++i) {
|
||||
if (MB[i/32] & (1u << (i%32)))
|
||||
if (!(MB[i/32] & (1u << (i%32))))
|
||||
continue;
|
||||
insert(RegisterRef(i, LaneBitmask::getAll()));
|
||||
for (MCRegUnitIterator U(i, &PRI.getTRI()); U.isValid(); ++U)
|
||||
PU.set(*U);
|
||||
}
|
||||
Units |= PU.flip();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user