DAGCombiner was recently taught how to combine STEP_VECTOR nodes,
meaning the step value is no longer guaranteed to be one by the time it
reaches the backend for lowering.
This patch supports such cases on RISC-V by lowering to other step
values to a multiply following the vid.v instruction. It includes a
small optimization for common cases where the multiply can be expressed
as a shift left.
I used DAG.getSplatVector here (I guess makes little difference) but I didn't consider the power-of-two case.
I'm curious that we cannot combine a case like this
into