[PATCH] D13123: PeepholeOptimizer: Remove redundant copies

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 13:24:44 PDT 2015


arsenm closed this revision.
arsenm added a comment.

r248611


================
Comment at: lib/CodeGen/PeepholeOptimizer.cpp:1389
@@ +1388,3 @@
+
+  if (CopySrcRegs.insert(SrcReg).second) {
+    // First copy of this reg seen.
----------------
qcolombet wrote:
> I don’t know if this is something you intend to support, but with this check, we only consider the first copy we see.
> I.e., we do not consider thing like:
> … = src
> … = src.sub1
> 
> Anyway, may be worth adding a FIXME saying we will consider this when we see motivating examples.
I'll look into that next. I saw some test improvements when I switched to inserting the mov that I don't see with this patch and this is probably why.


http://reviews.llvm.org/D13123





More information about the llvm-commits mailing list