[all-commits] [llvm/llvm-project] 4d847b: [LV] Do not add load to group if it moves across c...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Jul 7 03:07:03 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d847bf4d06589ff90648f3857ae73a12950d16c
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M llvm/lib/Analysis/VectorUtils.cpp
    M llvm/test/Transforms/LoopVectorize/X86/interleaved-accesses-hoist-load-across-store.ll

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

This patch prevents invalid load groups from being formed, where a load
needs to be moved across a conflicting store.

Once we hit a store that conflicts with a load with an existing
interleave group, we need to stop adding earlier loads to the group, as
this would force hoisting the previous stores in the group across the
conflicting load.

To detect such cases, add a new CompletedLoadGroups set, which is used
to keep track of load groups to which no earlier loads can be added.

Fixes https://github.com/llvm/llvm-project/issues/63602

Reviewed By: anna

Differential Revision: https://reviews.llvm.org/D154309

More information about the All-commits mailing list