[llvm] [MachineCopyPropagation] Recognise and delete no-op moves produced after forwarded uses (PR #129889)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 06:49:17 PDT 2025


mstorsjo wrote:

> I believe it should look something like this, with an implicit def of x29 (which makes it not a "CopyInstr").
> 
> ```
> renamable $w29 = ORRWrs $wzr, killed renamable $w29, 0, implicit-def $x29
> ```
> 
> It seems to be OK in simpler cases https://godbolt.org/z/3n5zKxfjn. Do you know if it has the implicit-def, or if it doesn't why it is missing in this case?

Sorry, I'm not too familiar with those middle/backend lowering passes, so it would probably take me a good while to pinpoint exactly which instruction is being modified here - I hope someone more familiar and fluent with the tools can dig it up from the repro example above.

https://github.com/llvm/llvm-project/pull/129889


More information about the llvm-commits mailing list