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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 08:49:02 PDT 2026


================

----------------
paulwalker-arm wrote:

Is this just:
```suggestion
    if (SImm == std::numeric_limits<int64_t>::min())
```
I think the current implementation becomes undefined behaviour as soon as you do -SImm when SImm is the minimum value?

Although I do wonder if trying to store magnitudes caused more trouble than necessary. You only care about the non-cc-flag setting instructions, so no special handling is required for MIN_INT?

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


More information about the llvm-commits mailing list