[PATCH] D146958: [SCEV] Do not plant SCEV checks unnecessarily

Paul Osmialowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 05:55:42 PDT 2023


pawosm01 created this revision.
pawosm01 added reviewers: david-arm, ABataev.
Herald added subscribers: javed.absar, hiraditya.
Herald added a project: All.
pawosm01 requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

The vectorisation analysis collects strides for loop invariant
pointers, which is wrong because they are not strided. We don't
need to generate SCEV checks (which are costly performancewise)
for such pointers, we just need to do the appropriate aliasing
checks.

This patch fixes the problem by simply ignoring loop invariant
pointers when collecting the strides.

Originally written by David Sherwood.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146958

Files:
  llvm/lib/Analysis/LoopAccessAnalysis.cpp
  llvm/lib/Analysis/VectorUtils.cpp
  llvm/test/Transforms/LoopVectorize/vector-no-scevcheck.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146958.508610.patch
Type: text/x-patch
Size: 4737 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230327/79c1763d/attachment.bin>


More information about the llvm-commits mailing list