[PATCH] D154309: [LV] Do not add load to group if it moves across conflicting store.

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 17:40:39 PDT 2023


anna added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/X86/interleaved-accesses-hoist-load-across-store.ll:105-106
   %gep.iv.1.plus.2= getelementptr inbounds i32, ptr %arr, i64 %iv.1.plus.2
   %l2 = load i32, ptr %gep.iv.1.plus.2
   %l3 = load i32, ptr %gep.iv.2
   %add = add i32 %l3 , %l2
----------------
Ayal wrote:
> Swapping these two loads circumvents the current `CompletedLoadGroups`, and deserves a separate test case.
> 
> This is because only the load which creates an interleaved group (the one appearing last in program order) is compared with obstructing stores.
Ayal, I had added this test locally along with the more complete fix you suggested for checking all loads in the interleave load group. I didn't see any change in the output with the complete fix versus what we have currently in the patch (checking only the single load which would be `%l2` in this case that doesn't obstruct the store).
I'll place what I have for review.   

(motivation is another miscompile that looks related to interleaving and I was hoping this more complete fix handles it. Doesn't though. Will add a reproducer upstream).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154309/new/

https://reviews.llvm.org/D154309



More information about the llvm-commits mailing list