diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-10-16 19:03:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-08 19:05:09 +0000 |
commit | 6246ae0b85d8159978c01ae916a9ad6cde9378b5 (patch) | |
tree | 4e95c640a44c343a08cf21d58972d36bd342e4ce /contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | a4a491e2238b12ccd64d3faf9e6401487f6f1f1b (diff) | |
parent | dafdd7863e9eeed3a714329b8758451cbcfc33bf (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 91bc7dbad1d0..5fd4e45d80fb 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -8149,9 +8149,15 @@ VPRecipeBase *VPRecipeBuilder::tryToOptimizeInductionPHI( *PSE.getSE(), *OrigLoop, Range); // Check if this is pointer induction. If so, build the recipe for it. - if (auto *II = Legal->getPointerInductionDescriptor(Phi)) - return new VPWidenPointerInductionRecipe(Phi, Operands[0], *II, - *PSE.getSE()); + if (auto *II = Legal->getPointerInductionDescriptor(Phi)) { + return new VPWidenPointerInductionRecipe( + Phi, Operands[0], *II, *PSE.getSE(), + LoopVectorizationPlanner::getDecisionAndClampRange( + [&](ElementCount VF) { + return CM.isScalarAfterVectorization(Phi, VF); + }, + Range)); + } return nullptr; } |