[llvm] [PHIElimination] Reuse existing COPY in predecessor basic block (PR #131837)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 05:30:32 PDT 2025
jayfoad wrote:
> The insertion point of COPY isn't always optimal and could eventually lead to a worse block layout, see the regression test in the first commit.
>
> This change affects many architectures but the amount of total instructions in the test cases seems too be slightly lower.
The COPY you reuse is dead (right?) so why is reusing it any better than inserting a new one and allowing the dead one to be DCEd? (Or, why wasn't the dead COPY already DCEd before we got to this point?)
https://github.com/llvm/llvm-project/pull/131837
More information about the llvm-commits
mailing list