Properly handle PHIs with subregisters in UnreachableBlockElim
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 28 Apr 2017 21:56:33 +0000 (21:56 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 28 Apr 2017 21:56:33 +0000 (21:56 +0000)
commit2065a2f4e60bad5315f8289612eadba3842a4071
tree1c8043685b9784b4f593ff64eb5fd9b5966e65b8
parent0b3acbb1dd1a6ffa3d81313528efa1dd3591d62a
Properly handle PHIs with subregisters in UnreachableBlockElim

When a PHI operand has a subregister, create a COPY instead of simply
replacing the PHI output with the input it.

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

llvm-svn: 301699
llvm/lib/CodeGen/UnreachableBlockElim.cpp
llvm/test/CodeGen/Hexagon/unreachable-mbb-phi-subreg.mir [new file with mode: 0644]