[RISCV][CostModel] VPIntrinsics have same cost as their non-vp counterparts (#67178)
On RISCV, only a few VPIntrinsics have their cost modeled by the VectorIntrinsicCostTable. Even so, none of those entries consider LMUL. All other VPIntrinsics do not have meaningful modeling. This patch models the cost of a VPIntrinsic as the cost of its non-VP counterpart. It is possible that the VP Intrinsic is cheaper than the non-VP version depending on VL. On RISCV, this may be due two reasons (if the instruction is part of a loop): 1. A smaller VL can be used on the last iteration of the loop. 2. The VP instruction may avoid a scalar remainder loop. I have left this as a TODO since I think this change puts us on the right path of modeling the cost of a VPInstruction, and it isn't entirely clear to me how much of a discount we should give to a known VL<VLMAX or what to do when VL is unknown at compile time.
Loading
Please sign in to comment