[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 10:25:27 PDT 2024
================
@@ -233,6 +233,11 @@ Type *VPTypeAnalysis::inferScalarTypeForRecipe(const VPReplicateRecipe *R) {
llvm_unreachable("Unhandled opcode");
}
+Type *
+VPTypeAnalysis::inferScalarTypeForRecipe(const VPPartialReductionRecipe *R) {
+ return R->getUnderlyingInstr()->getType();
----------------
SamTebbs33 wrote:
I suppose it can with something like `R->getOperand(0)->getUnderlyingValue()->getType()` but I don't know if that's better. Is there a different way?
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list