[PATCH] D52432: [PowerPC] Remove self-copies in pre-emit peephole

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 07:42:59 PDT 2018


jsji added a comment.

It would be great if we can avoid generating self-copies in AADB and others (no sure whether it is easy or possible there). But yes, it is always great to put this sentinel guard here. Thanks!



================
Comment at: lib/Target/PowerPC/PPCPreEmitPeephole.cpp:72
+              Opc == PPC::VOR || Opc == PPC::XXLOR || Opc == PPC::XXLORf ||
+              Opc == PPC::XSCPSGNDP) {
+            const MCInstrDesc &MCID = TII->get(Opc);
----------------
How about PPC::MCRF, PPC::CROR,PPC::EVOR?  QPX copies if we still support QPX?


================
Comment at: lib/Target/PowerPC/PPCPreEmitPeephole.cpp:80
+              LLVM_DEBUG(MI.dump());
+              InstrsToErase.push_back(&MI);
+            }
----------------
Maybe we should continue (skip the following check) once we identified that this is to be erased?


Repository:
  rL LLVM

https://reviews.llvm.org/D52432





More information about the llvm-commits mailing list