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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 17:15:26 PDT 2020


craig.topper 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;
----------------
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.


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