From: Krzysztof Parzyszek Date: Mon, 27 Feb 2017 18:03:35 +0000 (+0000) Subject: [Hexagon] Defs and clobbers can overlap X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b5b29ed7d1fa4c0b2fca8688f43249bec3fdb82;p=llvm [Hexagon] Defs and clobbers can overlap git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296365 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Hexagon/HexagonBlockRanges.cpp b/lib/Target/Hexagon/HexagonBlockRanges.cpp index 04621f4f440..721cf041728 100644 --- a/lib/Target/Hexagon/HexagonBlockRanges.cpp +++ b/lib/Target/Hexagon/HexagonBlockRanges.cpp @@ -362,12 +362,11 @@ void HexagonBlockRanges::computeInitialLiveRanges(InstrIndexMap &IndexMap, Clobbers.insert(R); } } -#ifndef NDEBUG + // Defs and clobbers can overlap, e.g. + // %D0 = COPY %vreg5, %R0, %R1 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.