[RISCV] Share reduction lowering code for vp.reduce
We can consolidate code and clarify edge case behavior at the same time. There are two functional differences here. First, I remove the ResVT handling, and always use the reduction element type. This appears to be dead code. There's no test coverage, and this code doesn't need to account for scalar type legalization anyways. Second, if the VL happens to be known non-zero, we can avoid passing through start. This is mostly needed to allow reuse of the existing code; I don't consider it interesting as an optimization on it's own. Differential Revision: https://reviews.llvm.org/D139733
Loading
Please sign in to comment