[PATCH] D71833: [PowerPC] Fix some bugs of the rlwinm folding
qshanz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 23 18:31:04 PST 2019
steven.zhang marked an inline comment as done.
steven.zhang added a comment.
We need another patch to fix the dead instruction removal for record form I think.
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:904
if (MI.getOpcode() == PPC::RLWINM || MI.getOpcode() == PPC::RLWINM8) {
+ if (MRI->hasOneNonDBGUse(FoldingReg)) {
+ ToErase = SrcMI;
----------------
shchenz wrote:
> We can delete the SrcMI only if it is not a record form?
Yes, but it miss to correct the reg of the record form. I suggest another patch to correct it together with the kill flag.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71833/new/
https://reviews.llvm.org/D71833
More information about the llvm-commits
mailing list