[PATCH] D17475: MachineCopyPropagation: Catch copies of the form A<-B; A<-B

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 10:06:20 PST 2016

junbuml added inline comments.

Comment at: lib/CodeGen/MachineCopyPropagation.cpp:146
@@ +145,3 @@
+    MachineInstr *CopyMI = CI->second;
+    if (!MRI->isReserved(Def) && isNopCopy(CopyMI, Def, Src, TRI) &&
+        (!MRI->isReserved(Src) ||
In MRI->isReserved(Def), we should use the actual register defined in MI, instead of the Def passed as a parameter. In case of the second call for eraseRedundantCopy() below in line 209, MI's Src is passed as Def here. 



More information about the llvm-commits mailing list