[PATCH] D87939: [PeepholeOptimizer] Enhance the redundant COPY elimination.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 12:04:48 PDT 2020


hliao added a comment.

In D87939#2285876 <https://reviews.llvm.org/D87939#2285876>, @qcolombet wrote:

>> The comment seems outdated, if my understanding is right, and even the original code cannot perform that change since, once the 2nd COPY with same source is found in L1407, the check @ L1419 just skips that earlier as the 1st COPY has no subreg and the 2nd COPY has sub1.
>
> Good point!
>
> Now, I am wondering why is this change not just NFC then?

It does improve the original by considering the COPY from the same subreg.

BTW, the comment seems ambiguous. It may read that that subreg extract won't be eliminated but handled somewhere else. @arsenm any comment?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87939/new/

https://reviews.llvm.org/D87939



More information about the llvm-commits mailing list