[VPlan] Track both incoming values for first-order recurrence phis.
authorFlorian Hahn <flo@fhahn.com>
Sun, 27 Jun 2021 11:39:01 +0000 (12:39 +0100)
committerFlorian Hahn <flo@fhahn.com>
Sun, 27 Jun 2021 13:29:35 +0000 (14:29 +0100)
commitf1a64302725cc36e7796f327375b9e939e3a339e
treefeee7d8f3f477d5478bbe54becf34bd10aaf57ea
parent1729d6be07ff60369d98d0ece0724751b66d0f91
[VPlan] Track both incoming values for first-order recurrence phis.

This patch updates VPWidenPHI recipes for first-order recurrences to
also track the incoming value from the back-edge. Similar to D99294,
which did the same for reductions.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D104197
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll