[llvm] [AggressiveInstCombine] Support store merge with non-consecutive parts (PR #149807)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 20:16:13 PDT 2025


https://github.com/dtcxzyw approved this pull request.

LG.

However, I have a question for the remaining FIXME:
> FIXME: We could generate smaller stores if we can't produce a large one.

Imagine we have three consecutive stores:
store 0 | store 1 | store 2
            ^
             |
          aligned to 2 bytes
Fast unaligned memory access may not be as fast as aligned access because the former one may access multiple cache lines. In this case, `store i8 + store i16` is better than `store i16 + store i8`. So I don't think that a greedy strategy like this patch works well.


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


More information about the llvm-commits mailing list