[PATCH] D123581: [RISCV] Teach vsetvli insertion to handle PseudoReadVL.

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 21:04:30 PDT 2022


fakepaper56 added a comment.

In D123581#3532019 <https://reviews.llvm.org/D123581#3532019>, @reames wrote:

> I am generally not a fan of this patch.  The entire PsuedoReadVL mechanism feels like a hack, and the unchecked assumption that the SEW and policy bits on the ReadVL match the prior VLE is worrying.  Beyond that, this adds a decent amount of complexity.
>
> I find myself agreeing with @craig.topper's comment above.  It really feels like we need a pseudo instruction for VLEnFF itself here.  Such a psuedo would produce two outputs, the second being the GPR version of VL.  After this pass, we could lower the pseudo into two instructions (e.g. the actual VLEnFF and the CSR read).  This would make the state update on this patch very minimal.  This really feels to me like the "right" approach here.

I agree VTYPE of VLEnFF calculated in two different places is worrying. I am sorry that I didn't think deeply about the two approaches and just thought that modifying PseudoReadVL need less code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123581



More information about the llvm-commits mailing list