[LV] Check VPValue operand instead of Cost::isUniformAfterVec (NFC).
authorFlorian Hahn <flo@fhahn.com>
Mon, 6 Dec 2021 18:32:35 +0000 (18:32 +0000)
committerFlorian Hahn <flo@fhahn.com>
Mon, 6 Dec 2021 18:32:35 +0000 (18:32 +0000)
commit07276e49e31e10b5218e2382cedd0f1fe2cfca7d
treef337105724f5df54f61a40c56ede97444c3a5ceb
parent1f257accd713a8e302d3fdd2cac615a303295c42
[LV] Check VPValue operand instead of Cost::isUniformAfterVec (NFC).

ILV::scalarizeInstruction still uses the original IR operands to check
if an input value is uniform after vectorization.

There is no need to go back to the cost model to figure that out, as the
information is already explicit in the VPlan. Just check directly
whether the VPValue is defined outside the plan or is a uniform
VPReplicateRecipe.

Reviewed By: Ayal

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