[llvm] [MachineCopyPropagation] Recognise and delete no-op moves produced after forwarded uses (PR #129889)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 25 07:23:23 PDT 2025
davemgreen wrote:
Ah - I was hoping you might have looked already, the reproducer is fairly large and you might have known the function to look at.
There is a smaller version from llvm-extract, of what I think is the right function in https://godbolt.org/z/xvdTzM5nP. It looks like block land.lhs.true252 is where w29 gets removed.
```
$w29 = ORRWrs $wzr, killed renamable $w29, 0, implicit $fp, implicit-def $fp
```
The problem appears to be that the registers are not in the order we thought they should be. We assume that <wreg> - W0 + X0 will be the equivalent X reg, but that goes out-of-order for w29/FP. I will try to put together a patch, the fix should be relatively simple but I need to create a test.
https://github.com/llvm/llvm-project/pull/129889
More information about the llvm-commits
mailing list