[Hexagon] Properly close live range in HexagonBlockRanges

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Krzysztof Parzyszek 2016-04-22 17:27:22 +00:00
parent 491fbf630f
commit d12b34532a

View File

@ -330,7 +330,7 @@ void HexagonBlockRanges::computeInitialLiveRanges(InstrIndexMap &IndexMap,
if (TargetRegisterInfo::isPhysicalRegister(R.Reg) && Reserved[R.Reg])
continue;
for (auto S : expandToSubRegs(R, MRI, TRI)) {
if (LastDef[S] != IndexType::None)
if (LastDef[S] != IndexType::None || LastUse[S] != IndexType::None)
closeRange(S);
LastDef[S] = Index;
}