[llvm] [SelectionDAG] Fold extracts spanning concat operands (PR #200936)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 03:22:02 PDT 2026
================
@@ -27537,6 +27537,64 @@ static SDValue foldExtractSubvectorFromShuffleVector(EVT NarrowVT, SDValue Src,
return DAG.getVectorShuffle(NarrowVT, DL, NewOps[0], NewOps[1], NewMask);
}
+static SDValue foldExtractSubvectorFromConcatVectors(EVT VT, SDValue V,
+ uint64_t ExtIdx,
+ const SDLoc &DL,
+ SelectionDAG &DAG,
+ bool LegalOperations) {
+ if (V.getOpcode() != ISD::CONCAT_VECTORS)
+ return SDValue();
+
----------------
arsenm wrote:
Should this depend on hasOneUse || isExtractSubvectorCheap?
https://github.com/llvm/llvm-project/pull/200936
More information about the llvm-commits
mailing list