summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2025-10-08 11:40:46 +0100
committerFlorian Hahn <flo@fhahn.com>2025-10-08 11:40:46 +0100
commit4d45718b478940cd11ac80dd64db8408bb21dbca (patch)
tree3f10c6e4c578d9d22f597a5aa262ac19c8c5c823 /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
parent2d8769151f507f342257a5921fb268166e35d72d (diff)
[IVDescriptors] Add isFPMinMaxNumRecurrenceKind helper (NFC).
Add helper to check for FMinNum and FMaxNum recurrence kinds, as suggested in https://github.com/llvm/llvm-project/pull/161735.
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 0b7963b98e7a..3f16b03055a9 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4264,8 +4264,8 @@ bool LoopVectorizationPlanner::isCandidateForEpilogueVectorization(
if (any_of(OrigLoop->getHeader()->phis(), [&](PHINode &Phi) {
if (!Legal->isReductionVariable(&Phi))
return Legal->isFixedOrderRecurrence(&Phi);
- RecurKind RK = Legal->getRecurrenceDescriptor(&Phi).getRecurrenceKind();
- return RK == RecurKind::FMinNum || RK == RecurKind::FMaxNum;
+ return RecurrenceDescriptor::isFPMinMaxNumRecurrenceKind(
+ Legal->getRecurrenceDescriptor(&Phi).getRecurrenceKind());
}))
return false;