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

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 09:16:45 PST 2016


junbuml added inline comments.

================
Comment at: lib/CodeGen/MachineCopyPropagation.cpp:125
@@ +124,3 @@
+  // the value (Example: The sparc zero register is writable but stays zero).
+  if (MRI->isReserved(Src) || MRI->isReserved(Def))
+    return false;
----------------
Would it make sense to give an exception when Src is zero register?  In AArch64, I can see redundant zero copies after RA like : 

  %X8<def> = COPY %XZR
  STRXui %X8<kill>, <fi#36>, 0
  %X8<def> = COPY %XZR
  STRXui %X8<kill>, <fi#34>, 0




Repository:
  rL LLVM

http://reviews.llvm.org/D17475





More information about the llvm-commits mailing list