[llvm] [AggressiveInstCombine] Implement store merge optimization (PR #147540)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 08:20:33 PDT 2025
dtcxzyw wrote:
> > We may need to bail out on the half-world swap pattern. See https://github.com/dtcxzyw/llvm-opt-benchmark/pull/2560/files#r2192943859.
>
> This isn't a half-word swap, but a straightforward i32 copy, but we fail to perform the load merging transform for some reason, probably some kind of phase ordering problem. (If I run aggressive-instcombine over the result, it gets folded.)
>
> A swap pattern generally wouldn't get optimized by this transform, because the intermediate i32 should have been optimized away before reaching here. (Unless, of course, there is a phase ordering issue, e.g. we only see one half of the pattern and the other half becomes visible later.)
I am trying to create a reproducer.
https://github.com/llvm/llvm-project/pull/147540
More information about the llvm-commits
mailing list