[PATCH] D155929: [RISCV] Use the first element of source as the start value of reduction.
Yeting Kuo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 08:38:03 PDT 2023
fakepaper56 added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3438
+ MVT ExtractedVT = Scalar.getOperand(0).getSimpleValueType();
+ if (ExtractedVT.bitsLE(VT))
+ return DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, Passthru,
----------------
> What happens it it's not converted to a scalable vector?
It just that fixed vectors are hard to compares with scalable vector type here.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:7610-7611
+// Function to extract the first element of Vec. For fixed vector Vec, this
+// converts it to scalabe vector before extraction. It could let the following
+// optimizations not have to serve fixed vector.
+static SDValue getFirstElement(SDValue Vec, SelectionDAG &DAG,
----------------
luke wrote:
> What happens it it's not converted to a scalable vector?
Thank you for the feedback.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155929/new/
https://reviews.llvm.org/D155929
More information about the llvm-commits
mailing list