[VPlan] Adjust assert in splitBlock to allow splitting at end.
authorFlorian Hahn <flo@fhahn.com>
Thu, 13 May 2021 11:57:39 +0000 (12:57 +0100)
committerFlorian Hahn <flo@fhahn.com>
Thu, 13 May 2021 12:36:35 +0000 (13:36 +0100)
commitbdada7546e6b4a189a22c7ba9ce2d1b507b9c22e
tree045e639a72dfdfd7bd996ad16c16e5ed19239c85
parentba0ec1be2916eae1798ad4c56480f471a65f7ce9
[VPlan] Adjust assert in splitBlock to allow splitting at end.

SplitAt should only be dereferenced in the assert if it does not point
to the end of the block. This fixes a crash in the added test case.
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll