[PATCH 1/2] target/hexagon: Remove unused TCG temporary from predicated loads

Philippe Mathieu-Daudé posted 2 patches 4 years, 4 months ago
[PATCH 1/2] target/hexagon: Remove unused TCG temporary from predicated loads
Posted by Philippe Mathieu-Daudé 4 years, 4 months ago
The gen_pred_cancel() function, introduced in commit a646e99cb90
(Hexagon macros) doesn't use the 'one' TCG temporary; remove it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/hexagon/macros.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h
index 094b8dabb5a..ae6663c09fe 100644
--- a/target/hexagon/macros.h
+++ b/target/hexagon/macros.h
@@ -190,7 +190,6 @@ static inline void gen_pred_cancel(TCGv pred, int slot_num)
     TCGv slot_mask = tcg_const_tl(1 << slot_num);
     TCGv tmp = tcg_temp_new();
     TCGv zero = tcg_const_tl(0);
-    TCGv one = tcg_const_tl(1);
     tcg_gen_or_tl(slot_mask, hex_slot_cancelled, slot_mask);
     tcg_gen_andi_tl(tmp, pred, 1);
     tcg_gen_movcond_tl(TCG_COND_EQ, hex_slot_cancelled, tmp, zero,
@@ -198,7 +197,6 @@ static inline void gen_pred_cancel(TCGv pred, int slot_num)
     tcg_temp_free(slot_mask);
     tcg_temp_free(tmp);
     tcg_temp_free(zero);
-    tcg_temp_free(one);
 }
 #define PRED_LOAD_CANCEL(PRED, EA) \
     gen_pred_cancel(PRED, insn->is_endloop ? 4 : insn->slot)
-- 
2.31.1

Re: [PATCH 1/2] target/hexagon: Remove unused TCG temporary from predicated loads
Posted by Richard Henderson 4 years, 4 months ago
On 10/2/21 8:47 PM, Philippe Mathieu-Daudé wrote:
> The gen_pred_cancel() function, introduced in commit a646e99cb90
> (Hexagon macros) doesn't use the 'one' TCG temporary; remove it.
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   target/hexagon/macros.h | 2 --
>   1 file changed, 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

RE: [PATCH 1/2] target/hexagon: Remove unused TCG temporary from predicated loads
Posted by Taylor Simpson 4 years, 4 months ago

> -----Original Message-----
> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On
> Behalf Of Philippe Mathieu-Daudé
> Sent: Saturday, October 2, 2021 7:48 PM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>; Richard Henderson
> <richard.henderson@linaro.org>; Philippe Mathieu-Daudé
> <f4bug@amsat.org>
> Subject: [PATCH 1/2] target/hexagon: Remove unused TCG temporary from
> predicated loads
> 
> The gen_pred_cancel() function, introduced in commit a646e99cb90
> (Hexagon macros) doesn't use the 'one' TCG temporary; remove it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/hexagon/macros.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index
> 094b8dabb5a..ae6663c09fe 100644
> --- a/target/hexagon/macros.h
> +++ b/target/hexagon/macros.h
> @@ -190,7 +190,6 @@ static inline void gen_pred_cancel(TCGv pred, int
> slot_num)
>      TCGv slot_mask = tcg_const_tl(1 << slot_num);
>      TCGv tmp = tcg_temp_new();
>      TCGv zero = tcg_const_tl(0);
> -    TCGv one = tcg_const_tl(1);
>      tcg_gen_or_tl(slot_mask, hex_slot_cancelled, slot_mask);
>      tcg_gen_andi_tl(tmp, pred, 1);
>      tcg_gen_movcond_tl(TCG_COND_EQ, hex_slot_cancelled, tmp, zero, @@
> -198,7 +197,6 @@ static inline void gen_pred_cancel(TCGv pred, int
> slot_num)
>      tcg_temp_free(slot_mask);
>      tcg_temp_free(tmp);
>      tcg_temp_free(zero);
> -    tcg_temp_free(one);
>  }

Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>