[PATCH] D104603: [LV] Fix crash when target instruction for sinking is dead.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 29 05:35:40 PDT 2021
fhahn added a comment.
Thanks Ayal!
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9045
+ "first-order recurrence PHI) before reaching beginning of the block");
+ assert(SinkTarget != P.first &&
+ "sink source equals target, no sinking required");
----------------
Ayal wrote:
> This second assert(SinkTarget != P.first) should be placed right after bumping SinkTarget to its prev node.
> (We know P.first ain't dead - these were taken care of above; so if SinkTarget get set to P.first, we will immediately exit the loop, before reaching this assert here. So can also place the assert right after the loop.)
> (The first assert is placed well, guarding against taking FirstInst->getPrevNode().)
Thanks, I moved the second assert in the committed version.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104603/new/
https://reviews.llvm.org/D104603
More information about the llvm-commits
mailing list