[PATCH] D46191: [LV] Preserve inbounds on created GEPs

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 13:46:31 PDT 2018


dneilson added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:3138
         Value *MaskPart = isMaskRequired ? Mask[Part] : nullptr;
         Value *VectorGep = getOrCreateVectorValue(Ptr, Part);
         NewSI = Builder.CreateMaskedScatter(StoredVal, VectorGep, Alignment,
----------------
hsaito wrote:
> While you are at this, please look into whether isInbounds() is supported for vector gep. Whether anyone uses that is a different question, but losing information unnecessarily is sad. Same for Load side.
Unless I've overlooked something, getOrCreateVectorValue() doesn't create GEPs (contrary to the name of the var it's being saved into). Looks like it does some sort of cache lookups, and if those fail then it creates actual vectors (splat or series of insertelements).

The only other GEP creation I see is in vectorizeInterleaveGroup() -- which looks like it could have the same issue as this PR.


Repository:
  rL LLVM

https://reviews.llvm.org/D46191





More information about the llvm-commits mailing list