[PATCH] D96972: [RISCV] Support insertion of misaligned subvectors

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 01:21:44 PST 2021


frasercrmck added a comment.

In D96972#2573979 <https://reviews.llvm.org/D96972#2573979>, @craig.topper wrote:

> Can a less than full vector insert be done with a single slideup if you calculate the offset and limit vl to mark the end of the range?

Probably. That occurred to me slightly too late yesterday and I was going to take a look at that this morning. It would also handle `i1` vectors in the same way as others as you're forced to limit VL to account for (some of) those.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:697
+        case RISCVVLMUL::LMUL_F2:
+          VSlideupOpc = RISCV::PseudoVSLIDEUP_VI_MF2;
+          break;
----------------
craig.topper wrote:
> Should this really be a tail undisturbed vmv.v.v?
Yeah, that's what I was searching for originally. I was hesitant to introduce a new pseudo for that purpose in this patch, though. It might be mostly irrelevant if I optimize this to use vslideup everywhere. Though the vmv.v.v would still provide a potential optimization for correctly-sized types at offset 0. Do you think that's worth it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96972



More information about the llvm-commits mailing list