diff options
author | Alexey Bataev <a.bataev@outlook.com> | 2025-04-15 07:18:47 -0700 |
---|---|---|
committer | Alexey Bataev <a.bataev@outlook.com> | 2025-04-15 07:24:17 -0700 |
commit | 57025b42c43b2f14f7e58692bc19cd53d1b8a45e (patch) | |
tree | 081075b3c5e30ecab1187d71c3c655eb524239eb /llvm/lib | |
parent | 552902455c7a3958930d4607ac8b85fd39d7c8a3 (diff) | |
download | llvm-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.cpp | 4 |
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; |