[PATCH] D139733: [RISCV] Share reduction lowering code for vp.reduce
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 11:39:41 PST 2022
craig.topper added a comment.
> 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 I think such a construct wouldn't be legal anyways. This is the main reason I posted this for review as I want someone to double check me on this point.
EXTRACT_VECTOR_ELT is allowed to have a scalar result type larger than the element type. BUILD_VECTOR, SPLAT_VECTOR, and INSERT_VECTOR_ELT can have a scalar argument larger than the element type of the vector. This is required by type legalization since the legal scalar types may be larger than the legal vector element types.
I think the VPREDUCE expansion may have been happening during LegalizeDAG when this was written. That would require any scalar types created to be legal. I think it is called during LegalizeVectorOps now and there is a scalar type legalization pass between LegalizeVectorOps and LegalizeDAG.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139733/new/
https://reviews.llvm.org/D139733
More information about the llvm-commits
mailing list