[LiveVariables] Don't set undef reg PHI used as live for FromMBB
authorKang Zhang <shkzhang@cn.ibm.com>
Wed, 3 Jun 2020 15:25:30 +0000 (15:25 +0000)
committerKang Zhang <shkzhang@cn.ibm.com>
Wed, 3 Jun 2020 15:25:30 +0000 (15:25 +0000)
commit2cc77b2b8a022c0f6c7c60bf3eda157f62007d88
tree24b5159585a1744fb07c30ff3f7e6626589a44a6
parentc57e41c000c40e2efd441bc819b472feb49c94bf
[LiveVariables] Don't set undef reg PHI used as live for FromMBB

Summary:
In the patch D73152, it adds a new function LiveVariables::addNewBlock.
This new function will add the reg which PHI used to the MBB which reg
is from.
But the new function may cause LiveVariable Verification failed when the
Src reg in PHI is undef.

Reviewed By: bjope

Differential Revision: https://reviews.llvm.org/D80077
llvm/lib/CodeGen/LiveVariables.cpp
llvm/test/CodeGen/AArch64/PHIElimination-crash.mir [new file with mode: 0644]