[PATCH] D94249: [RISCV] Custom lower ISD::VSCALE.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 07:18:51 PST 2021
HsiangKai added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:653
+ SDValue VScale = DAG.getNode(ISD::SRL, DL, VT, VLENB,
+ DAG.getConstant(3, DL, VT));
+ return DAG.getNode(ISD::MUL, DL, VT, VScale, Op.getOperand(0));
----------------
I think we need add comments to explain why we need to shift right 3 bits.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1854
+ case RISCVISD::READ_VLENB:
+ // We assume VLENB is at least 8 bytes.
+ Known.Zero.setLowBits(3);
----------------
In V specification v1.0, VLEN=128 at least. We could assume VLENB is at least 16 bytes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94249/new/
https://reviews.llvm.org/D94249
More information about the llvm-commits
mailing list