[PATCH] D46191: [LV] Preserve inbounds on created GEPs
Hideki Saito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 10:17:04 PDT 2018
hsaito added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2421
// Calculate the pointer for the specific unroll-part.
- Value *PartPtr = Builder.CreateGEP(Ptr, Builder.getInt32(Part * VF));
+ auto *PartPtr = cast<GetElementPtrInst>(
+ Builder.CreateGEP(Ptr, Builder.getInt32(Part * VF)));
----------------
hsaito wrote:
> I thought I commented about this before, but maybe I forgot to press "Save" or "Submit".
> This GEP is dead if Reverse is true. Would you change the code so that dead instruction won't be built?
> Plan if-then-else structure should do.
>
>
I meant "plain if-then-else". Sorry for the spam.
Repository:
rL LLVM
https://reviews.llvm.org/D46191
More information about the llvm-commits
mailing list