As discussed in D100107, this patch first convert index_vector to
step_vector, and convert step_vector back to index_vector after LegalizeDAG.
You should be able to use Op2 directly and thus remove the need for the SPLAT_VECTOR and MUL.
Is this a phased the rollout? As in I'm assuming that this will ultimately be expressed in terms of STEP_VECTOR as well.
This is already a requirement for the node and asserted with getNode() so doesn't need to be duplicated here.
Sounds reasonable to me, update later.
For non-constant op, we need lower index_vector into mul(splat(op2) step_vector()) + splat(base), mul may be lower to shl, even combine as mla with add which may confused the codegen. I'm not sure whether it is worth to deal this.
Assuming you agree I think you can just delete a bit of code and then the patch is good to go.
With your previous DAGCombine patches in mind I figured I'd take this patch for a test drive and I believe there's no longer need for this specialisation because the generic block (i.e. the else case) lowers to the expected output (or at least running this patches version of sve-intrinsics-index.ll reports a pass).
FYI: I imagine we're only a few isel patterns away from not need this, but there's no need to hold up this patch for it.