[llvm] [DAGCombiner] Add support for scalarising extracts of a vector setcc (PR #116031)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 10:28:38 PST 2024


================
@@ -23008,9 +23037,14 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
     }
   }
 
-  if (SDValue BO = scalarizeExtractedBinop(N, DAG, DL, LegalOperations))
+  if (SDValue BO = scalarizeExtractedBinOp(N, DAG, DL))
     return BO;
 
+  // extract (setcc x, splat(y)), i -> setcc (extract x, i)), y
+  if (ScalarVT == VecVT.getVectorElementType())
----------------
paulwalker-arm wrote:

This looks like the sort of restriction that belongs inside `scalarizeExtractedSetCC`?

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


More information about the llvm-commits mailing list