[llvm] 51e917d - [SLP] Silence -Wswitch warning after ec146cb7c0b4a162ee73463e6c7bb306b99e013b

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 10:53:49 PDT 2023


Author: Benjamin Kramer
Date: 2023-06-20T19:51:08+02:00
New Revision: 51e917d4afabede08388dc622d4d9b8d3650cd11

URL: https://github.com/llvm/llvm-project/commit/51e917d4afabede08388dc622d4d9b8d3650cd11
DIFF: https://github.com/llvm/llvm-project/commit/51e917d4afabede08388dc622d4d9b8d3650cd11.diff

LOG: [SLP] Silence -Wswitch warning after ec146cb7c0b4a162ee73463e6c7bb306b99e013b

{min,max}imum(X, X) is X so we can take the same path as min/max.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index c06e22c51083e..3416e953e099b 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -13871,6 +13871,8 @@ class HorizontalReduction {
     case RecurKind::UMin:
     case RecurKind::FMax:
     case RecurKind::FMin:
+    case RecurKind::FMaximum:
+    case RecurKind::FMinimum:
       // res = vv
       return VectorizedValue;
     case RecurKind::Mul:
@@ -13918,6 +13920,8 @@ class HorizontalReduction {
     case RecurKind::UMin:
     case RecurKind::FMax:
     case RecurKind::FMin:
+    case RecurKind::FMaximum:
+    case RecurKind::FMinimum:
       // No need for multiple min/max(s) of the same value.
       LLVM_DEBUG(dbgs() << "SLP: Max/min of same " << VectorizedValue
                         << ". (HorRdx)\n");


        


More information about the llvm-commits mailing list