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

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 11:16:15 PDT 2018


hfinkel added inline comments.


================
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);
----------------
nemanjai wrote:
> jsji wrote:
> > How about PPC::MCRF, PPC::CROR,PPC::EVOR?  QPX copies if we still support QPX?
> I didn't add the SPE and QPX ones because I can't test them. Of course, this should be a safe thing to do no matter what, but I am reluctant to add code I can't functionally test.
> @hfinkel Do you think I should go ahead and add the following:
> ```
> PPC::MCRF
> PPC::QVFMR
> PPC::QVFMRs
> PPC::QVFMRb
> PPC::CROR
> PPC::EVOR
> ```
Seems safe enough. It has the benefit of not being an "arbitrary" subset. Downside is that it's harder to test. I'm fine with adding them in this case.


Repository:
  rL LLVM

https://reviews.llvm.org/D52432





More information about the llvm-commits mailing list