[RISCV] Use vslide1down lowering for two element non-constant build_vectors
When the values are in GPRs, the vslide1down lowering is always better. We need to greatly improve the splat-and-mask cost model to handle constants in a meaningful way, so for now, limit this to non-constant vectors. This does send the "partially constant" case down the vslide1down path. This could cause some regressions, though I don't see any in practice. The cost modeling for the general case is annoyingly tricky. We have a great amount of inconsistency around immediate operands, and as a result, the exact constant and exact lowering choice matters a lot. I'm hoping that we get a "good enough" result without modeling this exactly, but we may need to do something analogous to getIntMatCost (i.e. a search w/costing). Differential Revision: https://reviews.llvm.org/D149667
Loading
Please register or sign in to comment