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

Tony Jiang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 13:01:44 PST 2017


jtony 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()) {
----------------
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` 


================
Comment at: test/CodeGen/PowerPC/remove-cyclic-mr.ll:47
+
+; Function Attrs: argmemonly nounwind
+declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
----------------
Minor nit: I know this is auto generated test cases, but this line can be simplified away. Similarly line 1 and line 54.


https://reviews.llvm.org/D39536





More information about the llvm-commits mailing list