[PATCH] D107657: [RISCV][VP] Add support for VP_REDUCE_* operations
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 6 11:15:27 PDT 2021
craig.topper added a comment.
Does TLI.expandVecReduce need any updates?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2055
+// Promote either the vector operand of a VECREDUCE_* or VP_REDUCE_* node, or
+// the start value of a VP_REDUCE node.
+SDValue DAGTypeLegalizer::PromoteIntOp_VEC_VP_REDUCE(SDNode *N, unsigned OpNo) {
----------------
Are we allowing the start value to have a different type than the result? Or should we make them them same and handle start promotion when we handle result promotion. I think that would also mean we need to insert an appropriate extend if promoting the vector forces the result type to be enlarged?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:628
+
+ setOperationAction(ISD::VP_REDUCE_FADD, VT, Custom);
+ setOperationAction(ISD::VP_REDUCE_SEQ_FADD, VT, Custom);
----------------
Aren't these covered by the FloatingPointVPOps loop?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107657/new/
https://reviews.llvm.org/D107657
More information about the llvm-commits
mailing list