diff mbox series

[v4,153/163] tcg: Assign TCGOP_TYPE in liveness_pass_2

Message ID 20250415192515.232910-154-richard.henderson@linaro.org (mailing list archive)
State New
Headers show
Series tcg: Convert to TCGOutOp structures | expand

Commit Message

Richard Henderson April 15, 2025, 7:25 p.m. UTC
Here we cannot rely on the default copied from
tcg_op_insert_{after,before}, because the relevant
op could be typeless, such as INDEX_op_call.

Fixes: ...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Pierrick Bouvier April 16, 2025, 8:46 p.m. UTC | #1
On 4/15/25 12:25, Richard Henderson wrote:
> Here we cannot rely on the default copied from
> tcg_op_insert_{after,before}, because the relevant
> op could be typeless, such as INDEX_op_call.
> 
> Fixes: ...
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/tcg.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index 05604d122a..3c80ad086c 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -4408,6 +4408,7 @@ liveness_pass_2(TCGContext *s)
>                                     : INDEX_op_ld_i64);
>                   TCGOp *lop = tcg_op_insert_before(s, op, lopc, 3);
>   
> +                TCGOP_TYPE(lop) = arg_ts->type;
>                   lop->args[0] = temp_arg(dir_ts);
>                   lop->args[1] = temp_arg(arg_ts->mem_base);
>                   lop->args[2] = arg_ts->mem_offset;
> @@ -4480,6 +4481,7 @@ liveness_pass_2(TCGContext *s)
>                           arg_ts->state = TS_MEM;
>                       }
>   
> +                    TCGOP_TYPE(sop) = arg_ts->type;
>                       sop->args[0] = temp_arg(out_ts);
>                       sop->args[1] = temp_arg(arg_ts->mem_base);
>                       sop->args[2] = arg_ts->mem_offset;
> @@ -4507,6 +4509,7 @@ liveness_pass_2(TCGContext *s)
>                                         : INDEX_op_st_i64);
>                       TCGOp *sop = tcg_op_insert_after(s, op, sopc, 3);
>   
> +                    TCGOP_TYPE(sop) = arg_ts->type;
>                       sop->args[0] = temp_arg(dir_ts);
>                       sop->args[1] = temp_arg(arg_ts->mem_base);
>                       sop->args[2] = arg_ts->mem_offset;

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff mbox series

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 05604d122a..3c80ad086c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -4408,6 +4408,7 @@  liveness_pass_2(TCGContext *s)
                                   : INDEX_op_ld_i64);
                 TCGOp *lop = tcg_op_insert_before(s, op, lopc, 3);
 
+                TCGOP_TYPE(lop) = arg_ts->type;
                 lop->args[0] = temp_arg(dir_ts);
                 lop->args[1] = temp_arg(arg_ts->mem_base);
                 lop->args[2] = arg_ts->mem_offset;
@@ -4480,6 +4481,7 @@  liveness_pass_2(TCGContext *s)
                         arg_ts->state = TS_MEM;
                     }
 
+                    TCGOP_TYPE(sop) = arg_ts->type;
                     sop->args[0] = temp_arg(out_ts);
                     sop->args[1] = temp_arg(arg_ts->mem_base);
                     sop->args[2] = arg_ts->mem_offset;
@@ -4507,6 +4509,7 @@  liveness_pass_2(TCGContext *s)
                                       : INDEX_op_st_i64);
                     TCGOp *sop = tcg_op_insert_after(s, op, sopc, 3);
 
+                    TCGOP_TYPE(sop) = arg_ts->type;
                     sop->args[0] = temp_arg(dir_ts);
                     sop->args[1] = temp_arg(arg_ts->mem_base);
                     sop->args[2] = arg_ts->mem_offset;