summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp b/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
index 15ffa1c4c66..edbd61d5eb4 100644
--- a/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
@@ -1078,6 +1078,8 @@ bool HexagonExpandCondsets::coalesceRegisters(RegisterRef R1, RegisterRef R2) {
LiveInterval &L2 = LIS->getInterval(R2.Reg);
if (L2.empty())
return false;
+ if (L1.hasSubRanges() || L2.hasSubRanges())
+ return false;
bool Overlap = L1.overlaps(L2);
DEBUG(dbgs() << "compatible registers: ("
@@ -1113,6 +1115,7 @@ bool HexagonExpandCondsets::coalesceRegisters(RegisterRef R1, RegisterRef R2) {
}
while (L2.begin() != L2.end())
L2.removeSegment(*L2.begin());
+ LIS->removeInterval(R2.Reg);
updateKillFlags(R1.Reg);
DEBUG(dbgs() << "coalesced: " << L1 << "\n");
OpenPOWER on IntegriCloud