[PATCH] D111294: [LoopVectorize] Fix crash in VPReplicateRecipe::execute() for scalable vectors

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 03:05:49 PDT 2021


kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, david-arm, fhahn.
Herald added a subscriber: hiraditya.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

collectLoopScalars collects pointer induction updates in ScalarPtrs, assuming
that the instruction will be scalar after vectorization. This may crash later
in VPReplicateRecipe::execute() if there there is another user of the instruction
other than the Phi node which needs to be widened.

This changes collectLoopScalars so that if there are any other users of
Update other than a Phi node, it is added to PossibleNonScalarPtrs instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111294

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111294.377787.patch
Type: text/x-patch
Size: 6418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211007/86684728/attachment.bin>


More information about the llvm-commits mailing list