[PATCH v11 0/7] riscv: set vstart_eq_zero on vector insns

Daniel Henrique Barboza posted 7 patches 8 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240311135855.225578-1-dbarboza@ventanamicro.com
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
There is a newer version of this series
target/riscv/insn_trans/trans_rvbf16.c.inc |  18 +-
target/riscv/insn_trans/trans_rvv.c.inc    | 198 +++++----------------
target/riscv/insn_trans/trans_rvvk.c.inc   |  30 +---
target/riscv/translate.c                   |   6 +
target/riscv/vcrypto_helper.c              |  32 ++++
target/riscv/vector_helper.c               |  97 +++++++++-
target/riscv/vector_internals.c            |   4 +
target/riscv/vector_internals.h            |   9 +
8 files changed, 202 insertions(+), 192 deletions(-)
[PATCH v11 0/7] riscv: set vstart_eq_zero on vector insns
Posted by Daniel Henrique Barboza 8 months, 2 weeks ago
Hi,

In this new version, after the comments from LIU Zhiwei in v9 [1], I
decided to ditch all the patches that were trying to integrate the tail
update process in a single function. Handling the right value for NF for
every single function is out of the scope for this bug fix. The patches
might be useful in the future if we decide that such integration adds
value, but for now it's too much.

For this bug fix I decided to bring a sledgehammer and inserted an early
exist in every vector helper if vstart >= vl. This will make the whole
helper a no-op if vstart is out of bounds, and make it trivial for us to
proceed with removing brconds and so on.

I also took the opportunity to fix the flag name in patch 9 from v10,
now patch 6.

Series based on master. 

Patches missing review: patch 3

Changes from v10:
- patches 2, 3, 4, 5 from v10: dropped
- patch 3 (new):
  - do an early exit in vector helpers if vstart >= vl
- patch 6 (former patch 9):
  - fix 'vstart_qe_zero' commit msg references to 'vstart_eq_zero' 
- v10 link: https://lore.kernel.org/qemu-riscv/20240310115315.187283-1-dbarboza@ventanamicro.com/

Daniel Henrique Barboza (6):
  target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()
  trans_rvv.c.inc: set vstart = 0 in int scalar move insns
  target/riscv/vector_helpers: do early exit when vstart >= vl
  target/riscv: remove 'over' brconds from vector trans
  trans_rvv.c.inc: remove redundant mark_vs_dirty() calls
  target/riscv/vector_helper.c: optimize loops in ldst helpers

Ivan Klokov (1):
  target/riscv: enable 'vstart_eq_zero' in the end of insns

 target/riscv/insn_trans/trans_rvbf16.c.inc |  18 +-
 target/riscv/insn_trans/trans_rvv.c.inc    | 198 +++++----------------
 target/riscv/insn_trans/trans_rvvk.c.inc   |  30 +---
 target/riscv/translate.c                   |   6 +
 target/riscv/vcrypto_helper.c              |  32 ++++
 target/riscv/vector_helper.c               |  97 +++++++++-
 target/riscv/vector_internals.c            |   4 +
 target/riscv/vector_internals.h            |   9 +
 8 files changed, 202 insertions(+), 192 deletions(-)

-- 
2.43.2