[VPlan] Move reduction start value creation to widenPHIRecipe.
authorFlorian Hahn <flo@fhahn.com>
Fri, 8 Jan 2021 17:40:20 +0000 (17:40 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 8 Jan 2021 17:49:43 +0000 (17:49 +0000)
commitc493e9216bd1700577b209a0e2d290145653e40d
treea07a82b21c0954998c66afb56c9a51c08791653d
parent9386483b7142bbfe64b1a4d2f91b6712c1357c24
[VPlan] Move reduction start value creation to widenPHIRecipe.

This was suggested to prepare for D93975.

By moving the start value creation to widenPHInstruction, we set the
stage to manage the start value directly in VPWidenPHIRecipe, which be
used subsequently to set the 'resume' value for reductions during
epilogue vectorization.

It also moves RdxDesc to the recipe, so we do not have to rely on Legal
to look it up later.

Reviewed By: gilr

Differential Revision: https://reviews.llvm.org/D94175
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.h