[llvm] [RISCV] Use vsetivli instead of `x0,x0` form to retain SEW/LMUL when AVL is imm (PR #169307)

Krste Asanovic via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 09:19:54 PST 2025


kasanovic wrote:

If AVL is compile-time constant and VLMAX constraints are known to be met at compile-time, then using immediate form is fine.  But if AVL is a run-time value (as when x0,x0 is usually being used) then should not use immediate form of AVL.   The motivation for this change also doesn't make sense to me.  High-performance architectures (e.g., supporting proposed Ovlt) will be expanding microops depending on vl later in pipeline regardless of vset form used.

https://github.com/llvm/llvm-project/pull/169307


More information about the llvm-commits mailing list