aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@outlook.com>2025-04-15 07:18:47 -0700
committerAlexey Bataev <a.bataev@outlook.com>2025-04-15 07:24:17 -0700
commit57025b42c43b2f14f7e58692bc19cd53d1b8a45e (patch)
tree081075b3c5e30ecab1187d71c3c655eb524239eb /llvm/lib
parent552902455c7a3958930d4607ac8b85fd39d7c8a3 (diff)
downloadllvm-57025b42c43b2f14f7e58692bc19cd53d1b8a45e.zip
llvm-57025b42c43b2f14f7e58692bc19cd53d1b8a45e.tar.gz
llvm-57025b42c43b2f14f7e58692bc19cd53d1b8a45e.tar.bz2
[SLP]Mark smin reduction as signed compare
Reduction signed min must be marked as signed compare, fixing the analysis for the cases, where the incoming arguments are unsigned. Fixes #133943
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 50c4039..f7c37d8 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -20170,6 +20170,10 @@ void BoUpSLP::computeMinimumValueSizes() {
IsTruncRoot = true;
}
bool IsSignedCmp = false;
+ if (UserIgnoreList && all_of(*UserIgnoreList, [](Value *V) {
+ return match(V, m_SMin(m_Value(), m_Value()));
+ }))
+ IsSignedCmp = true;
while (NodeIdx < VectorizableTree.size()) {
ArrayRef<Value *> TreeRoot = VectorizableTree[NodeIdx]->Scalars;
unsigned Limit = 2;