[llvm] [X86] Replace custom AND/OR/XOR reduction pattern matching with ISD::VECREDUCE_AND/OR/XOR support (PR #199544)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 01:26:11 PDT 2026


================
@@ -48174,6 +48179,12 @@ static SDValue combineExtractVectorElt(SDNode *N, SelectionDAG &DAG,
   return SDValue();
 }
 
+static SDValue combineVECREDUCE_LOGIC(SDNode *N, SelectionDAG &DAG,
+                                      const X86Subtarget &Subtarget) {
+  // Attempt to replace an all_of/any_of horizontal reduction with a MOVMSK.
+  return combinePredicateReduction(N, DAG, Subtarget);
----------------
RKSimon wrote:

done

https://github.com/llvm/llvm-project/pull/199544


More information about the llvm-commits mailing list