[PATCH] D145163: Add support for vectorization of interleaved memory accesses for scalable VF

Graham Hunter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 07:59:41 PDT 2023


huntergr marked 5 inline comments as done.
huntergr added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2713
       Group->addMetadata(NewLoad);
-      NewLoads.push_back(NewLoad);
+      NewLoads.push_back(Builder.CreateVectorDeinterleave(
+          NewLoad, InterleaveFactor, "strided.vec"));
----------------
reames wrote:
> Having this be only in the normal load path seems unlikely to be correct.  Surely we must also handle masked loads as well?
This does handle masked loads -- 'NewLoad = Builder.CreateAligned....' is a standalone statement on the else with no opening brace. I've added a blank line to perhaps make that a little more obvious.

Unless there's something else I've missed?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2741
+        State.set(VPDefs[I], StridedVec, Part);
       }
     }
----------------
reames wrote:
> It looks like you're changing the handling for gaps in the deinterleave.  This seems surprising and worth some discussion?
That was the result of a bit of overzealous cleanup on my part when removing some code from the original patch; I missed the 'continue'. Reverted.


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

https://reviews.llvm.org/D145163



More information about the llvm-commits mailing list