From f8d94803f1d82fa9268053abd16f984bc535b3cd Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 13 Sep 2021 10:54:35 +0100 Subject: target/arm: Optimize MVE VDUP Optimize the MVE VDUP insns by using TCG vector ops when possible. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20210913095440.13462-8-peter.maydell@linaro.org --- target/arm/translate-mve.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'target/arm') diff --git a/target/arm/translate-mve.c b/target/arm/translate-mve.c index d30c7e5..13de552 100644 --- a/target/arm/translate-mve.c +++ b/target/arm/translate-mve.c @@ -500,11 +500,15 @@ static bool trans_VDUP(DisasContext *s, arg_VDUP *a) return true; } - qd = mve_qreg_ptr(a->qd); rt = load_reg(s, a->rt); - tcg_gen_dup_i32(a->size, rt, rt); - gen_helper_mve_vdup(cpu_env, qd, rt); - tcg_temp_free_ptr(qd); + if (mve_no_predication(s)) { + tcg_gen_gvec_dup_i32(a->size, mve_qreg_offset(a->qd), 16, 16, rt); + } else { + qd = mve_qreg_ptr(a->qd); + tcg_gen_dup_i32(a->size, rt, rt); + gen_helper_mve_vdup(cpu_env, qd, rt); + tcg_temp_free_ptr(qd); + } tcg_temp_free_i32(rt); mve_update_eci(s); return true; -- cgit v1.1