[Hexagon] Defs and clobbers can overlap

llvm-svn: 296365
This commit is contained in:
Krzysztof Parzyszek 2017-02-27 18:03:35 +00:00
parent 16b85a6601
commit e9be35596e
1 changed files with 4 additions and 5 deletions

View File

@ -362,12 +362,11 @@ void HexagonBlockRanges::computeInitialLiveRanges(InstrIndexMap &IndexMap,
Clobbers.insert(R);
}
}
#ifndef NDEBUG
// Defs and clobbers can overlap, e.g.
// %D0<def,dead> = COPY %vreg5, %R0<imp-def>, %R1<imp-def>
for (RegisterRef R : Defs)
assert(!Clobbers.count(R));
for (RegisterRef R : Clobbers)
assert(!Defs.count(R));
#endif
Clobbers.erase(R);
// Update maps for defs.
for (RegisterRef S : Defs) {
// Defs should already be expanded into subregs.