[PATCH] D39536: [PowerPC] Eliminate redundant register copys after register allocation

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 00:21:36 PST 2017


inouehrs added inline comments.


================
Comment at: lib/Target/PowerPC/PPCRegCopyElim.cpp:101
+  }
+  if ((Opc == PPC::OR8 || Opc == PPC::OR || Opc == PPC::VOR) &&
+      MI.getOperand(1).getReg() == MI.getOperand(2).getReg()) {
----------------
jtony wrote:
> There are some other instructions which are equivalent to MR, do we want to handle them too in this patch? Some examples: `ADDI Rx,Ry, 0`  and `ORI Rx,Ry,0` 
I picked these instructions since they are emitted for PPC::COPY. Do you see ADDI Rx,Ry, 0 or ORI Rx,Ry,0 frequently? If so, I will add that opcode here.


https://reviews.llvm.org/D39536





More information about the llvm-commits mailing list