[PATCH] D116277: [RISCV] Use vmv.x.s to build one element splat vector.

Jianjian Guan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 28 00:56:55 PST 2021


jacquesguan added a comment.

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

> In D116277#3211132 <https://reviews.llvm.org/D116277#3211132>, @jacquesguan wrote:
>
>> In D116277#3210767 <https://reviews.llvm.org/D116277#3210767>, @craig.topper wrote:
>>
>>> Do you have a particular microarchitecture where this is a faster sequence?
>>>
>>> Why only integer and not FP?
>>
>> I think that vmv.s.x has less demand on VL and VTYPE, so using vmv.s.x instead vmv.v.x might reduce the amount of VSETVLI instructions that we will insert.
>>
>> I missed the floating point scalar move instruction, if you think it make sense, I will add it.
>
> Can this prevent .vx instructions from being recognized from an arithmetic operation plus a splat?

I think it won't, and all RISCV CodeGen test cases could pass with this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116277



More information about the llvm-commits mailing list