aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index c9f7b34c0b..2a31e66851 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -286,12 +286,15 @@ void LiveIntervals::computeIntervals()
for (int i = instr->getNumOperands() - 1; i >= 0; --i) {
MachineOperand& mop = instr->getOperand(i);
- if (!mop.isVirtualRegister())
+ if (!mop.isRegister())
continue;
if (mop.opIsDefOnly() || mop.opIsDefAndUse()) {
unsigned reg = mop.getAllocatedRegNum();
- handleVirtualRegisterDef(mbb, mi, reg);
+ if (reg < MRegisterInfo::FirstVirtualRegister)
+ handlePhysicalRegisterDef(mbb, mi, reg);
+ else
+ handleVirtualRegisterDef(mbb, mi, reg);
}
}
}