When breaking an anti-dependency, don't use a register which has seen

one of its aliases defined. This is conservative, but tricky subreg
corner cases are outside the primary aim of this pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61077 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-12-16 06:20:58 +00:00
parent 8749b61178
commit fde221fa0a

View File

@ -454,6 +454,7 @@ bool SchedulePostRATDList::BreakAntiDependencies() {
assert(((KillIndices[NewReg] == -1u) != (DefIndices[NewReg] == -1u)) &&
"Kill and Def maps aren't consistent for NewReg!");
if (KillIndices[NewReg] == -1u &&
Classes[NewReg] != reinterpret_cast<TargetRegisterClass *>(-1) &&
KillIndices[AntiDepReg] <= DefIndices[NewReg]) {
DOUT << "Breaking anti-dependence edge on "
<< TRI->getName(AntiDepReg)