aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/LiveVariables.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index 809048e..4b428d6 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -258,8 +258,9 @@ void LiveVariables::HandlePhysRegUse(unsigned Reg, MachineInstr *MI) {
bool HasPrevDef = PhysRegInfo[SuperReg] != NULL;
if (!HasPrevDef)
- // FIXME: This only goes back one level of super-registers. It might miss
- // some.
+ // No need to go up more levels. A def of a register also sets its sub-
+ // registers. So if PhysRegInfo[SuperReg] is NULL, it means SuperReg's
+ // super-registers are not previously defined.
for (const unsigned *SSRegs = RegInfo->getSuperRegisters(SuperReg);
unsigned SSReg = *SSRegs; ++SSRegs)
if (PhysRegInfo[SSReg] != NULL) {