forked from OSchip/llvm-project
Fix a merge bug in preRAsched for handling physreg aliases.
I've been sitting on this long enough trying to find a test case. I think the fix should go in now, but I'll keep working on the test case. llvm-svn: 132701
This commit is contained in:
parent
ba8e18d9ae
commit
0af2e47310
|
@ -1008,14 +1008,16 @@ static void CheckForLiveRegDef(SUnit *SU, unsigned Reg,
|
|||
for (const unsigned *AliasI = TRI->getOverlaps(Reg); *AliasI; ++AliasI) {
|
||||
|
||||
// Check if Ref is live.
|
||||
if (!LiveRegDefs[Reg]) continue;
|
||||
if (!LiveRegDefs[*AliasI]) continue;
|
||||
|
||||
// Allow multiple uses of the same def.
|
||||
if (LiveRegDefs[Reg] == SU) continue;
|
||||
if (LiveRegDefs[*AliasI] == SU) continue;
|
||||
|
||||
// Add Reg to the set of interfering live regs.
|
||||
if (RegAdded.insert(Reg))
|
||||
LRegs.push_back(Reg);
|
||||
if (RegAdded.insert(*AliasI)) {
|
||||
assert(*AliasI == Reg && "alias clobber"); //!!!
|
||||
LRegs.push_back(*AliasI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue