[llvm] 663aea2 - [LV] Clean up unused template args of min/max (NFC) (#141778)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 00:57:25 PDT 2025
Author: Ramkumar Ramachandra
Date: 2025-05-29T09:57:22+02:00
New Revision: 663aea2601a2d08cace3e6e956c5854d45f6ff5c
URL: https://github.com/llvm/llvm-project/commit/663aea2601a2d08cace3e6e956c5854d45f6ff5c
DIFF: https://github.com/llvm/llvm-project/commit/663aea2601a2d08cace3e6e956c5854d45f6ff5c.diff
LOG: [LV] Clean up unused template args of min/max (NFC) (#141778)
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index d49dd39a0d0c5..90e224ea8f37a 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