[llvm] [AArch64][DAG] Split stores of merged i32 pairs so they can form STP (PR #227179)

Jerry Dang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 17:07:25 PDT 2026


kuroyukiasuna wrote:

> What happens if there is an adjacent i64 load that could become a ldp?

@davemgreen Good catch! Yeah this is a regression, when adjacent, the split may give:
```
ldp w8, w9, [x1]
ldr x10, [x1, #8]
stp w8, w9, [x0]
str x10, [x0, #8]
```
instead of
```
ldp x8, x9, [x1]
stp x8, x9, [x0]
```
I attempted a fix by adding adjacent-load guard in splitMergedValStore for both CGP and DAG, let me know if that makes sense.

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


More information about the llvm-commits mailing list