When breaking an anti-dependency, don't use a register which has seen
authorDan Gohman <gohman@apple.com>
Tue, 16 Dec 2008 06:20:58 +0000 (06:20 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 16 Dec 2008 06:20:58 +0000 (06:20 +0000)
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

lib/CodeGen/PostRASchedulerList.cpp

index 0fc6c3370bb384927706d76730ecf8c89134d76e..865479d30061d8ef3884dd13ad09971b48f5e571 100644 (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)