llvm-project
25ad0670 - [PHIElimination] Clear stale LiveVariables AliveBlocks for undef PHI sources (#197764)

Commit
114 days ago
[PHIElimination] Clear stale LiveVariables AliveBlocks for undef PHI sources (#197764) When PHI Elimination lowers a PHI with an undef source (e.g. from an `IMPLICIT_DEF),` it skips the LiveVariables kill/AliveBlocks update because the value is undefined. However, the source register's AliveBlocks may still mark intermediate blocks as live-through from its definition to the (now eliminated) PHI use. This causes MachineVerifier failures in EXPENSIVE_CHECKS builds. Fix by calling `recomputeForSingleDefVirtReg` on undef source registers when their last PHI use on a CFG edge is eliminated, which correctly clears the stale AliveBlocks entries. Fixes the EXPENSIVE_CHECKS failure introduced by #196895.
Parents
Loading