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

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 05:49:01 PST 2022


simoll added inline comments.


================
Comment at: llvm/lib/CodeGen/ExpandVectorPredication.cpp:539
+Value *
+CachingVPExpander::expandPredicationInUnfoldedLoadStore(IRBuilder<> &Builder,
+                                                        VPIntrinsic &VPI) {
----------------
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.


================
Comment at: llvm/lib/CodeGen/ExpandVectorPredication.cpp:785
+  case Intrinsic::vp_store:
+    if (isEVLOnlyMemoryIntrinsic(VPI)) {
+      return expandPredicationInUnfoldedLoadStore(Builder, VPI);
----------------
We should pick the expansion strategy based on the target's preferences. Either extend `VPLegalizationStrategy` to allow for strategy selection or add a new function to TTI that returns the expansion method (enum).


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