On Wed Apr 16, 2025 at 5:25 AM AEST, 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: ...

Missing ^

> Signed-off-by: Richard Henderson <richard.hender...@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;

tcg_op_insert_before/after I think are only called in these 3 places?
So after this patch, the type assignment in those functions looks
redundant. Maybe you could pass in the type as an argument.

Thanks,
Nick

>                  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;


Reply via email to