[PATCH] D96959: [RISCV] Support extraction of misaligned subvectors

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 10:41:46 PST 2021


craig.topper accepted this revision.
craig.topper added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:799
+RISCVVLMUL RISCVTargetLowering::getLMUL(MVT VT) {
+  switch (VT.getSizeInBits().getKnownMinValue() / 8) {
+  default:
----------------
frasercrmck wrote:
> craig.topper wrote:
> > I kind of wonder if we should remove this division and multiply all the case values by 8. Right now we don't really verify that the KnownMinValue is divisible by 8 without remainder
> Probably a good idea, yes. That's why I hacked in `getRegClassIDForVecVT` in a previous patch which treats `i1` separately. This was just moved from RISCVISelDAGToDAG, so I'm thinking it'd be better to fix that up afterwards? Then it can receive testing in isolation.
We can do it afterwards.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96959/new/

https://reviews.llvm.org/D96959



More information about the llvm-commits mailing list