[llvm] 14914fb - [DAG][NFC] Update comment on min/max reduction fold.

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 09:09:27 PDT 2023


Author: David Green
Date: 2023-06-13T17:09:22+01:00
New Revision: 14914fb1573f0393979492238735beecde65b3bb

URL: https://github.com/llvm/llvm-project/commit/14914fb1573f0393979492238735beecde65b3bb
DIFF: https://github.com/llvm/llvm-project/commit/14914fb1573f0393979492238735beecde65b3bb.diff

LOG: [DAG][NFC] Update comment on min/max reduction fold.

As pointed out in D141870, this one was incorrectly referencing and.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0a86c27b5ac82..b20cca050b67b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5634,7 +5634,7 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
     if (SDValue S = PerformUMinFpToSatCombine(N0, N1, N0, N1, ISD::SETULT, DAG))
       return S;
 
-  // Fold and(vecreduce(x), vecreduce(y)) -> vecreduce(and(x, y))
+  // Fold min/max(vecreduce(x), vecreduce(y)) -> vecreduce(min/max(x, y))
   auto ReductionOpcode = [](unsigned Opcode) {
     switch (Opcode) {
     case ISD::SMIN:


        


More information about the llvm-commits mailing list