[PATCH] D106403: [RISCV] Avoid using x0,x0 vsetvli for vmv.x.s and vfmv.f.s unless we know the sew/lmul ratio is constant.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 21 01:20:56 PDT 2021


frasercrmck added a comment.

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

> Use 0 instead of 1.

The patch summary will need update to mention 0 instead of 1.

Interesting that we've been having `zero,zero` at the beginning of functions all this time and I'd never thought that this is very likely to break.

I'm wondering about the pros/cons of adding a VL to the C functions. I think I'm missing something: would it really change much? If the SEW/LMUL ratio remains the same we'll omit the `vsetvli`, else we'll add one as we're doing in this patch. Is it likely to improve much about the generated code or is it just the "right" thing to do because it's not arbitrarily decided to be `0`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106403



More information about the llvm-commits mailing list