[PATCH] D144092: [RISCV] Lower interleave and deinterleave intrinsics
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 16:15:01 PST 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6703
+
+ SDValue VLMAX = DAG.getNode(
+ ISD::VSCALE, DL, XLenVT,
----------------
luke wrote:
> reames wrote:
> > See newly added computeVLMax.
> It looks like `computeVLMAX` computes the maximum VLMAX statically, not the actual VLMAX on the current hardware.
> Although there's a bunch of other places where VLMAX is computed.
> Maybe we can rename `computeVLMAX` to `computeMaxVLMAX`, and then add a helper function `getVLMAX`
It's using ISD::VSCALE which will be expanded to something like `csrr a0, vlenb; srli a0, 3`. We define "vscale" as vlen/64. vlenb is already in bytes so we divide by with a shift.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144092/new/
https://reviews.llvm.org/D144092
More information about the llvm-commits
mailing list