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

Steven Michaud via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 08:23:35 PST 2025


steven-michaud wrote:

> It might help if there was a `clang`/`clang++` flag I could use to activate _only_ this particular optimization. Is there one? Any other suggestions?

As best I can tell, the following command should do the trick. But it doesn't -- it creates a binary with several `mov w[n],2[n]` instructions. Please advise.

```
xcrun --sdk macosx clang++ -mllvm -aarch64-enable-copy-propagation=true test.cpp
```


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


More information about the llvm-commits mailing list