[PATCH] D91398: [LoopVectorizer] Lower uniform loads as a single load (instead of relying on CSE)
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 18:40:33 PST 2020
reames created this revision.
reames added reviewers: anna, fhahn, greened.
Herald added subscribers: dantrushin, bollu, hiraditya, mcrosier.
Herald added a project: LLVM.
reames requested review of this revision.
A uniform load is one which loads from a uniform address across all lanes. As currently implemented, we cost model such loads as if we did a single scalar load + a broadcast, but the actual lowering replicates the load once per lane.
This change tweaks the lowering to use the REPLICATE strategy by marking such loads (and the computation leading to their memory operand) as uniform after vectorization. This is a useful change in itself, but it's real purpose is to pave the way for a following change which will generalize our uniformity logic.
(I intend to land a couple of basic functional tests for uniform loads and then rebase the patch. The current status of testing for these code paths is... well, poor.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91398
Files:
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/multiple-strides-vectorization.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91398.305009.patch
Type: text/x-patch
Size: 9446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201113/7d6cc6d2/attachment.bin>
More information about the llvm-commits
mailing list