diff options
author | Florian Hahn <flo@fhahn.com> | 2022-02-06 16:37:20 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-02-06 16:37:20 +0000 |
commit | 541ca12dcd7c4aaefdeab810f7a82dfd60c682c2 (patch) | |
tree | 14d93227d238700971f6bba910696ab6c9b2a3b3 /llvm/lib | |
parent | 7275de7fb2f087871611d037d1b529b226dd0521 (diff) | |
download | llvm-541ca12dcd7c4aaefdeab810f7a82dfd60c682c2.zip llvm-541ca12dcd7c4aaefdeab810f7a82dfd60c682c2.tar.gz llvm-541ca12dcd7c4aaefdeab810f7a82dfd60c682c2.tar.bz2 |
[LV] Use VPReplicateRecipe::isUniform instead isUniformAfterVec (NFCI).
In scalarizeInstruction(), isUniformAfterVectorization is used to detect
cases where it is sufficient to always access the first lane. This
should map directly checking whether the operand is a uniform replicate
recipe.
Differential Revision: https://reviews.llvm.org/D116654
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 21c16f0..bfe08d4 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2945,7 +2945,8 @@ void InnerLoopVectorizer::scalarizeInstruction(Instruction *Instr, for (auto &I : enumerate(RepRecipe->operands())) { auto InputInstance = Instance; VPValue *Operand = I.value(); - if (State.Plan->isUniformAfterVectorization(Operand)) + VPReplicateRecipe *OperandR = dyn_cast<VPReplicateRecipe>(Operand); + if (OperandR && OperandR->isUniform()) InputInstance.Lane = VPLane::getFirstLane(); Cloned->setOperand(I.index(), State.get(Operand, InputInstance)); } |