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

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 11:49:25 PDT 2020


hliao added a comment.

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

> Hi @hliao,
>
> I must be missing something, but it feels to me that this patch is actually making the situation worse.
>
> Could you look at my example inlined below and explain how it would still work with this patch?
>
> Cheers,
> -Quentin

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`.


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