[PATCH] D87538: [VectorCombine] Don't vectorize scalar load under asan/hwasan/memtag/tsan

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 11:52:01 PDT 2020


eugenis added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:152
       Mask[i] = i;
     VecLd = Builder.CreateShuffleVector(VecLd, UndefValue::get(MinVecTy), Mask);
   }
----------------
MaskRay wrote:
> vitalybuka wrote:
> > If we have the mask maybe we can use it for proper check on Asan side?
> Yeah, if the information can be conveyed to the asan side then it can probably be retained. (But the optimization may not be worth the additional efforts...)
Right, I wonder if we could come up with some sort of metadata to promise that only the first N bytes (or first N vector elements) of the loaded value will be used. ASan can use it to relax the check, and MSan can validate it.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87538



More information about the llvm-commits mailing list