[PATCH] D140243: [LV] Remove ILV::sinkScalarOperands, superseded by VPlan version.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 12:10:35 PST 2022


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: tschuett, psnobl, rogfer01, bollu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added subscribers: pcwang-thead, vkmr.
Herald added a project: LLVM.

This patch removes the IR-based sinkScalarOperands which has been
superseded by the VPlan-based one.

There are a few cases that cannot be handled by the VPlan-based one, the
main one being sinking only some scalar computations (e.g. if the first
lane is used elsewhere).

The VPlan-based version also avoids sinking instructions that read
memory, to avoid sinking past aliasing stores. IIUC this fixes a
miscompile in the @minimal_bit_widths_with_aliasing_store test, where we
sink a load past an aliasing store.

Depends on D139977 <https://reviews.llvm.org/D139977>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140243

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/X86/pr51366-sunk-instruction-used-outside-of-loop.ll
  llvm/test/Transforms/LoopVectorize/float-induction.ll
  llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll
  llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
  llvm/test/Transforms/LoopVectorize/induction.ll
  llvm/test/Transforms/LoopVectorize/interleaved-accesses-pred-stores.ll
  llvm/test/Transforms/LoopVectorize/loop-form.ll
  llvm/test/Transforms/LoopVectorize/pointer-induction.ll
  llvm/test/Transforms/LoopVectorize/reduction-inloop-cond.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140243.483633.patch
Type: text/x-patch
Size: 66104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221216/b984cf50/attachment.bin>


More information about the llvm-commits mailing list