[PATCH] D96263: [RISCV] Support scalable-vector masked gather operations
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 07:38:14 PST 2021
frasercrmck added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1755
+// indexing is extended to the XLEN value type and scaled accordingly.
+SDValue RISCVTargetLowering::lowerMGATHER(SDValue Op, SelectionDAG &DAG) const {
+ MaskedGatherSDNode *N = cast<MaskedGatherSDNode>(Op.getNode());
----------------
I'll add tests in case LLVM tries to create "ext loads" out of these. We'd have to undo that if that were the case.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td:92
+ // Load
+ def : Pat<(vti.Vector (riscv_mgather (vti.Vector GetVRegNoV0<vti.RegClass>.R:$merge),
+ RVVBaseAddr:$rs1,
----------------
We can improve codegen for when the mask is known "true".
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td:420
+ if !gt(octuple_elmul, 0) then {
+ if !le(octuple_elmul, 64) then {
+ defvar elmul_str = octuple_to_str<octuple_elmul>.ret;
----------------
This is (helpfully) copy/pasted from VPseudos.td. Is there a way to create a "list" (e.g. of val/idx tuples) there which we reuse here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96263/new/
https://reviews.llvm.org/D96263
More information about the llvm-commits
mailing list