[llvm] [AArch64] Share materialized constant between add x, k and sub x,k (PR #225430)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 07:17:07 PDT 2026


prajapati-git wrote:

> This is just blindly preferring positive constants, and hoping they'll fold? That works in simple cases, I guess, but I'm not sure how well it generalizes. Maybe worth considering a MachineIR pass that runs after isel, which could optimize based on all the constants used in the function.

Hi @efriedma-quic, 
Thanks for the review! Sure I will take a look into Machine IR pass.

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


More information about the llvm-commits mailing list