aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PostRASchedulerList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/PostRASchedulerList.cpp')
-rw-r--r--lib/CodeGen/PostRASchedulerList.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp
index bd9783281c..73caea96b2 100644
--- a/lib/CodeGen/PostRASchedulerList.cpp
+++ b/lib/CodeGen/PostRASchedulerList.cpp
@@ -195,6 +195,10 @@ bool SchedulePostRATDList::BreakAntiDependencies() {
SDep *Edge = CriticalPath[SU->NodeNum];
SUnit *NextSU = Edge->Dep;
unsigned AntiDepReg = Edge->Reg;
+ // Only consider anti-dependence edges.
+ if (!Edge->isAntiDep)
+ continue;
+ assert(AntiDepReg != 0 && "Anti-dependence on reg0?");
// Don't break anti-dependencies on non-allocatable registers.
if (!AllocatableSet.test(AntiDepReg))
continue;