OSDN Git Service

[Hexagon] Properly close live range in HexagonBlockRanges
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 22 Apr 2016 17:27:22 +0000 (17:27 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 22 Apr 2016 17:27:22 +0000 (17:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267173 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonBlockRanges.cpp

index 45c9856..1f6d362 100644 (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;
       }