[PATCH] D148841: [LV] Use SCEV for uniformity analysis across VF

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 12:30:08 PDT 2023


fhahn updated this revision to Diff 517267.
fhahn marked 5 inline comments as done.
fhahn added a comment.

Adress comments thanks! Also rebased on top of the committed tests and extra tests with AND and LSHR added in 883eb88caed04b269da7ba69265fd7c4dc815231 <https://reviews.llvm.org/rG883eb88caed04b269da7ba69265fd7c4dc815231>.

This version of the patch also includes a change to the rewriter to track if we have seen a UDiv expression and we skip rewriting the second expression if there's no UDiv. This is to keep compile-time as low as possible.

With the latest version geomean compile-time increases by +0.01%: https://llvm-compile-time-tracker.com/compare.php?from=883eb88caed04b269da7ba69265fd7c4dc815231&to=943232d7acbeb48b1f2ed613903c77a161f80807&stat=instructions:u

Without the UDiv restriction that goes to +0.08% - +0.10%


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148841

Files:
  llvm/include/llvm/Analysis/LoopAccessAnalysis.h
  llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
  llvm/lib/Analysis/LoopAccessAnalysis.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/X86/uniform_mem_op.ll
  llvm/test/Transforms/LoopVectorize/pr47343-expander-lcssa-after-cfg-update.ll
  llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction1.ll
  llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction1_and.ll
  llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction1_lshr.ll
  llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148841.517267.patch
Type: text/x-patch
Size: 37656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230426/66597cd4/attachment.bin>


More information about the llvm-commits mailing list