]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/riscv: Fix vslidedown with rvv_ta_all_1s
authorAnton Blanchard <antonb@tenstorrent.com>
Mon, 14 Apr 2025 21:30:06 +0000 (21:30 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 20 May 2025 06:59:28 +0000 (09:59 +0300)
vslidedown always zeroes elements past vl, where it should use the
tail policy.

Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250414213006.3509058-1-antonb@tenstorrent.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Cc: qemu-stable@nongnu.org
(cherry picked from commit 2669b696e243b64f8ea1a6468dcee255de99f08d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/vector_helper.c

index 9394a7233cfcada245c079727763c65befb12a9a..0c2f4fe9d26954a7eff974a3cce59863b2d5de22 100644 (file)
@@ -5089,9 +5089,11 @@ void HELPER(NAME)(void *vd, void *v0, target_ulong s1, void *vs2,         \
     }                                                                     \
                                                                           \
     for (i = i_max; i < vl; ++i) {                                        \
-        if (vm || vext_elem_mask(v0, i)) {                                \
-            *((ETYPE *)vd + H(i)) = 0;                                    \
+        if (!vm && !vext_elem_mask(v0, i)) {                              \
+            vext_set_elems_1s(vd, vma, i * esz, (i + 1) * esz);           \
+            continue;                                                     \
         }                                                                 \
+        *((ETYPE *)vd + H(i)) = 0;                                        \
     }                                                                     \
                                                                           \
     env->vstart = 0;                                                      \