diff mbox series

target/hexagon/idef-parser: Elide mov in gen_pred_assign

Message ID 20230306225724.2105263-1-richard.henderson@linaro.org
State Superseded
Headers show
Series target/hexagon/idef-parser: Elide mov in gen_pred_assign | expand

Commit Message

Richard Henderson March 6, 2023, 10:57 p.m. UTC
Merge mov with andi.

Suggested-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/hexagon/idef-parser/parser-helpers.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Taylor Simpson March 6, 2023, 11:25 p.m. UTC | #1
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Monday, March 6, 2023 3:57 PM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>
> Subject: [PATCH] target/hexagon/idef-parser: Elide mov in gen_pred_assign
> 
> Merge mov with andi.
> 
> Suggested-by: Taylor Simpson <tsimpson@quicinc.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/hexagon/idef-parser/parser-helpers.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/target/hexagon/idef-parser/parser-helpers.c
> b/target/hexagon/idef-parser/parser-helpers.c
> index e1a55412c8..7b494c2f9e 100644
> --- a/target/hexagon/idef-parser/parser-helpers.c
> +++ b/target/hexagon/idef-parser/parser-helpers.c
> @@ -1722,9 +1722,7 @@ void gen_pred_assign(Context *c, YYLTYPE *locp,
> HexValue *left_pred,
>          *left_pred = gen_tmp(c, locp, 32, UNSIGNED);
>      }
>      /* Extract first 8 bits, and store new predicate value */
> -    OUT(c, locp, "tcg_gen_mov_i32(", left_pred, ", ", &r, ");\n");
> -    OUT(c, locp, "tcg_gen_andi_i32(", left_pred, ", ", left_pred,
> -        ", 0xff);\n");
> +    OUT(c, locp, "tcg_gen_andi_i32(", left_pred, ", ", &r, ", 0xff);\n");
>      if (is_direct) {
>          OUT(c, locp, "gen_log_pred_write(ctx, ", pred_id, ", ", left_pred,
>              ");\n");
> --
> 2.34.1

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

Queued for Hexagon pull request

Thanks,
Taylor
Philippe Mathieu-Daudé March 6, 2023, 11:42 p.m. UTC | #2
On 6/3/23 23:57, Richard Henderson wrote:
> Merge mov with andi.
> 
> Suggested-by: Taylor Simpson <tsimpson@quicinc.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/hexagon/idef-parser/parser-helpers.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/idef-parser/parser-helpers.c
index e1a55412c8..7b494c2f9e 100644
--- a/target/hexagon/idef-parser/parser-helpers.c
+++ b/target/hexagon/idef-parser/parser-helpers.c
@@ -1722,9 +1722,7 @@  void gen_pred_assign(Context *c, YYLTYPE *locp, HexValue *left_pred,
         *left_pred = gen_tmp(c, locp, 32, UNSIGNED);
     }
     /* Extract first 8 bits, and store new predicate value */
-    OUT(c, locp, "tcg_gen_mov_i32(", left_pred, ", ", &r, ");\n");
-    OUT(c, locp, "tcg_gen_andi_i32(", left_pred, ", ", left_pred,
-        ", 0xff);\n");
+    OUT(c, locp, "tcg_gen_andi_i32(", left_pred, ", ", &r, ", 0xff);\n");
     if (is_direct) {
         OUT(c, locp, "gen_log_pred_write(ctx, ", pred_id, ", ", left_pred,
             ");\n");