[PATCH] D109584: Implementing expansion pass for VP load and store.

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 11:08:29 PST 2022


bmahjour added inline comments.


================
Comment at: llvm/lib/CodeGen/ExpandVectorPredication.cpp:539
+Value *
+CachingVPExpander::expandPredicationInUnfoldedLoadStore(IRBuilder<> &Builder,
+                                                        VPIntrinsic &VPI) {
----------------
bmahjour wrote:
> simoll wrote:
> > bmahjour wrote:
> > > simoll wrote:
> > > > frasercrmck wrote:
> > > > > I wonder if the addition of this method should be in a follow-up patch?  That is, first get the "basic" support in using `masked.*` intrinsics in and consider this an enhancement/optimization for certain targets like PowerPC?
> > > > I agree. Better to add the default expansion strategy first, then extend TTI to allow for strategy selection and the cascading scheme in a followup.
> > > This scheme is meant for any target where masked load/stores are not supported in hardware and all the active lanes are packed on the left (ie EVL only). I have a hard time imagining a target that wouldn't benefit from this scheme. I think that's why Hussain added this as part of the default expansion.
> > If there are two expansion schemes, targets should be able to choose between them through TTI. AVX.* supports masked load/store well - PPC may benefit more from the piecewise expansion scheme.
> The only other expansion scheme is a fail-safe that applies to legalization of masked load/stores in general (not just the EVL cases), so it's less optimal regardless of the architecture. I neither see the need nor strongly object to adding a TTI query for this, but if we add one I think the default should be the cascading scheme.
(and again we are talking about targets where masked/load stores are not supported in hardware, so I guess AVX doesn't apply).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109584



More information about the llvm-commits mailing list