[PATCH] D48102: Improve handling of COPY instructions with identical value numbers
Tim Renouf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 16 10:47:27 PDT 2018
tpr added a comment.
I can fix that assert on my testcase with this addition to your fix:
--- a/lib/CodeGen/RegisterCoalescer.cpp
+++ b/lib/CodeGen/RegisterCoalescer.cpp
@@ -1653,6 +1653,10 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
deleteInstr(CopyMI);
return false; // Not coalescable.
}
+ if (CopyMI->getOpcode() == TargetOpcode::IMPLICIT_DEF) {
+ // Not coalesceable; eliminateUndefCopy turned it into implicit_def.
+ return false;
+ }
// Coalesced copies are normally removed immediately, but transformations
// like removeCopyByCommutingDef() can inadvertently create identity copies.
I will go and test that more thoroughly.
Repository:
rL LLVM
https://reviews.llvm.org/D48102
More information about the llvm-commits
mailing list