[llvm] [LV] Clean up unused template args of min/max (NFC) (PR #141778)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 07:37:42 PDT 2025
https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/141778
None
>From e95dd3b6b37c998fdad33a23b05051a324918e7c Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <r at artagnon.com>
Date: Wed, 28 May 2025 16:19:56 +0200
Subject: [PATCH] [LV] Clean up unused template args of min/max (NFC)
---
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 05b5764ffcafc..36e87efc7d06e 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4643,12 +4643,12 @@ LoopVectorizationCostModel::getSmallestAndWidestTypes() {
const RecurrenceDescriptor &RdxDesc = PhiDescriptorPair.second;
// When finding the min width used by the recurrence we need to account
// for casts on the input operands of the recurrence.
- MinWidth = std::min<unsigned>(
- MinWidth, std::min<unsigned>(
- RdxDesc.getMinWidthCastToRecurrenceTypeInBits(),
- RdxDesc.getRecurrenceType()->getScalarSizeInBits()));
- MaxWidth = std::max<unsigned>(
- MaxWidth, RdxDesc.getRecurrenceType()->getScalarSizeInBits());
+ MinWidth = std::min(
+ MinWidth,
+ std::min(RdxDesc.getMinWidthCastToRecurrenceTypeInBits(),
+ RdxDesc.getRecurrenceType()->getScalarSizeInBits()));
+ MaxWidth = std::max(MaxWidth,
+ RdxDesc.getRecurrenceType()->getScalarSizeInBits());
}
} else {
for (Type *T : ElementTypesInLoop) {
More information about the llvm-commits
mailing list