[llvm] [AArch64] Disable consecutive store merging when Neon is unavailable (PR #111519)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 05:59:35 PDT 2024
MacDue wrote:
> When I rewrite `consecutive_stores_quadruple_streaming_function` to use `llvm.vector.reduce.fadd` instead of the target specific intrinsic the problem goes away. It's worth investigating to see if we're missing a useful combine or something before flicking the `canMergeStoresTo` switch.
Could you share your IR? (I've probably done something silly, but I'm hitting "Expanding reductions for scalable vectors is undefined." when simply subbing the operation https://godbolt.org/z/zvMEnnKzP).
That said, the reason it may appear fixed is due to when `DAGCombiner::mergeConsecutiveStores()` applies. It only applies in a few specific cases, which are stores of constants, loads, or extracts. A normal scalar result is usually not an extract, however, for SVE operations such as `sve.faddv`, the result is modeled as a vector + an extract element of lane 0 (to model the lane zeroing). Because of this, it results in something that can be matched by (`tryStoreMergeOfExtracts()`), and the stores are merged.
https://github.com/llvm/llvm-project/pull/111519
More information about the llvm-commits
mailing list