[PATCH] D87005: [ScalarizeMaskedMemIntrin] Scalarize constant mask load as shuffle(build_vector,pass_through)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 01:35:48 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp:175
+      if (cast<Constant>(Mask)->getAggregateElement(Idx)->isNullValue()) {
+        InsertElt = UndefValue::get(EltTy);
+        ShuffleMask[Idx] = Idx + VectorWidth;
----------------
craig.topper wrote:
> Is the explicitly inserting undefs required for optimal build vector creation? I figured just inserting all the elements into an initial undef vector would have been enough.
unfortunately not - the build vector builder code isn't very clever tbh


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87005



More information about the llvm-commits mailing list