[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/70] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn
From: |
Richard Henderson |
Subject: |
[PATCH 10/70] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn |
Date: |
Sun, 26 Feb 2023 19:41:33 -1000 |
It is easy enough to use mov instead of or-with-zero
and relying on the optimizer to fold away the or.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate-a64.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 1726ec622d..16aa71451c 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -8459,7 +8459,7 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool
is_scalar, bool is_q,
tcg_rn = tcg_temp_new_i64();
tcg_rd = tcg_temp_new_i64();
tcg_rd_narrowed = tcg_temp_new_i32();
- tcg_final = tcg_const_i64(0);
+ tcg_final = tcg_temp_new_i64();
if (round) {
tcg_round = tcg_constant_i64(1ULL << (shift - 1));
@@ -8473,7 +8473,11 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool
is_scalar, bool is_q,
false, is_u_shift, size+1, shift);
narrowfn(tcg_rd_narrowed, cpu_env, tcg_rd);
tcg_gen_extu_i32_i64(tcg_rd, tcg_rd_narrowed);
- tcg_gen_deposit_i64(tcg_final, tcg_final, tcg_rd, esize * i, esize);
+ if (i == 0) {
+ tcg_gen_mov_i64(tcg_final, tcg_rd);
+ } else {
+ tcg_gen_deposit_i64(tcg_final, tcg_final, tcg_rd, esize * i,
esize);
+ }
}
if (!is_q) {
--
2.34.1
- [PATCH 00/70] tcg: Remove tcg_const_*, Richard Henderson, 2023/02/27
- [PATCH 01/70] target/arm: Use rmode >= 0 for need_rmode, Richard Henderson, 2023/02/27
- [PATCH 02/70] target/arm: Handle FPROUNDING_ODD in arm_rmode_to_sf, Richard Henderson, 2023/02/27
- [PATCH 03/70] target/arm: Improve arm_rmode_to_sf, Richard Henderson, 2023/02/27
- [PATCH 04/70] target/arm: Consistently use ARMFPRounding during translation, Richard Henderson, 2023/02/27
- [PATCH 05/70] target/arm: Create gen_set_rmode, gen_restore_rmode, Richard Henderson, 2023/02/27
- [PATCH 07/70] target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}, Richard Henderson, 2023/02/27
- [PATCH 06/70] target/arm: Improve trans_BFCI, Richard Henderson, 2023/02/27
- [PATCH 08/70] target/arm: Avoid tcg_const_* in translate-mve.c, Richard Henderson, 2023/02/27
- [PATCH 09/70] target/arm: Avoid tcg_const_ptr in disas_simd_zip_trn, Richard Henderson, 2023/02/27
- [PATCH 10/70] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn,
Richard Henderson <=
- [PATCH 11/70] target/arm: Avoid tcg_const_ptr in handle_rev, Richard Henderson, 2023/02/27
- [PATCH 12/70] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS, Richard Henderson, 2023/02/27
- [PATCH 13/70] target/avr: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 14/70] target/cris: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_imm, Richard Henderson, 2023/02/27
- [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG, Richard Henderson, 2023/02/27
- [PATCH 17/70] target/hexagon/idef-parser: Use gen_tmp for gen_pred_assign, Richard Henderson, 2023/02/27