[llvm] [PHIElimination] Reuse existing COPY in predecessor basic block (PR #131837)
Mikael Holmén via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 02:48:44 PDT 2025
mikaelholmen wrote:
> Thanks for looking into this, issued a fix in: #146320.
Thanks, that fix seems to solve that problem.
It looks like there are other problems as well though. I don't have a reproducer I can share now but if we have virtual registers of two different register classes "32BitRC" with 32 bit registers and "16BitRC" with 16 bit registers it looks like it turns
```
%8:32BitRC = COPY %7:32BitRC
[...]
%2:16BitRC = PHI %8.low16:32BitRC, %bb.0, %1:16BitRC, %bb.1
```
into
```
%9:16BitRC = COPY %7:32BitRC
[...]
%2:16BitRC = COPY killed %9:16BitRC
```
i.e. it ignores the sub register in the PHI?
https://github.com/llvm/llvm-project/pull/131837
More information about the llvm-commits
mailing list