[PATCH] D106164: [LV] Don't assume isScalarAfterVectorization if one of the uses needs widening.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 02:00:33 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5208
cast<PHINode>(Ptr)->getIncomingValueForBlock(Latch));
Worklist.insert(Update);
LLVM_DEBUG(dbgs() << "LV: Found new scalar instruction: " << *Ptr
----------------
I think the actual problem is here.
`Update` should be inserted into `ScalarPtrs`. That way it will be only inserted into the work list if it is not identified as possibly non scalar. The comment above would also need updating accordingly. In this specific case, we should not treat pointer induction updates as scalar due to non-scalar uses.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106164/new/
https://reviews.llvm.org/D106164
More information about the llvm-commits
mailing list