[PATCH] D147798: [LV] Improve VF-aware uniformity checks by handling LShr.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 7 11:02:17 PDT 2023


vporpo created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
vporpo requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

Until now the VF-aware uniformity check would only check for division `i/NUM`.
This patch extends it to support shift-rights, like: `i >> N`.
So the access to `A[i>>2]` in the following loop will no longer be considered
a gather for a VF of 4.

  for (i = 0; i != N; ++i)
    ... = ... A[i>>2]


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147798

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  llvm/test/Transforms/LoopVectorize/X86/uniform_across_vf.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147798.511736.patch
Type: text/x-patch
Size: 7820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230407/c5633c7c/attachment.bin>


More information about the llvm-commits mailing list