[Pipeliner] Fix an asssert due to invalid Phi in the epilog
authorBrendon Cahoon <bcahoon@codeaurora.org>
Tue, 16 Aug 2016 14:29:24 +0000 (14:29 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Tue, 16 Aug 2016 14:29:24 +0000 (14:29 +0000)
commit65b6ebccad08ff32d0fa3ce7987da5e509c454a6
tree49c54b67c9cdf33a9deedbb9d30e225d2b975251
parent2ac5bf94bcaf5617a2f7efcefa2f16755faea8e2
[Pipeliner] Fix an asssert due to invalid Phi in the epilog

The pipeliner was generating an invalid Phi name for an operand
in the epilog block, which caused an assert in the live variable
analysis pass. The fix is to the code that generates new Phis
in the epilog block. In this case, there is an existing Phi that
needs to be reused rather than creating a new Phi instruction.

Differential Revision: https://reviews.llvm.org/D23513

llvm-svn: 278805
llvm/lib/CodeGen/MachinePipeliner.cpp
llvm/test/CodeGen/Hexagon/swp-epilog-reuse-1.ll [new file with mode: 0644]