[PATCH] D111552: [PHIElimination] Fix accounting for undef uses when updating LiveVariables
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 08:20:11 PDT 2021
foad created this revision.
Herald added subscribers: mstorsjo, pengfei, hiraditya.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
PHI elimination updates LiveVariables info as described here:
// We only need to update the LiveVariables kill of SrcReg if this was the
// last PHI use of SrcReg to be lowered on this CFG edge and it is not live
// out of the predecessor. We can also ignore undef sources.
Unfortunately if the last use also happened to be an undef use then it
would fail to update the LiveVariables at all. Fix this by not counting
undef uses in the VRegPHIUse map.
Thanks to Mikael Holmén for the test case!
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111552
Files:
llvm/lib/CodeGen/PHIElimination.cpp
llvm/test/CodeGen/X86/phielim-undef.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111552.378676.patch
Type: text/x-patch
Size: 5660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211011/2b4ab1be/attachment.bin>
More information about the llvm-commits
mailing list