[PATCH] D103510: [RISCV] Use vmv.v.[v|i] if we know COPY is under the same vl and vtype.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 5 09:38:12 PDT 2021


craig.topper added a comment.

In D103510#2800595 <https://reviews.llvm.org/D103510#2800595>, @HsiangKai wrote:

> In D103510#2798999 <https://reviews.llvm.org/D103510#2798999>, @frasercrmck wrote:
>
>> My browser's really chugging on this huge patch so my input has to be brief. Maybe we could hide the test changes for now?
>>
>> Regarding `vmv.v.i`, is there not already some support for rematerialization (e.g. of immediates)? Or is it non-trivial due to having to manage VSETVLIs?
>
> There seems no support for rematerialization for `vmv.v.i`. Do you mean to set `isReMaterializable = 1, isAsCheapAsAMove = 1` to vmv.v.i pseudo instructions?

It still won’t work due to the implicit VL and VTYPE operands from vsetvli insertion. If we move vsetvli insertion later after coalescing, rematerialization would work when avl is a 5 bit immediate. Otherwise AVL being a register also disables rematerialization.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103510



More information about the llvm-commits mailing list