[llvm] [DAG] Fold extract_subvector(insert_subvector(x, y, c1), c2) --> extract_subvector(y,c2-c1) (PR #87925)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 02:43:11 PDT 2024
================
@@ -24459,6 +24459,23 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
if (!LegalOperations || TLI.isOperationLegal(ISD::SPLAT_VECTOR, NVT))
return DAG.getSplatVector(NVT, SDLoc(N), V.getOperand(0));
+ // extract_subvector(insert_subvector(x,y,c1),c2)
+ // --> extract_subvector(y,c2-c1)
----------------
phoebewang wrote:
Thanks! I misunderstood it.
https://github.com/llvm/llvm-project/pull/87925
More information about the llvm-commits
mailing list