[PATCH v3 152/162] tcg: Assign TCGOP_TYPE in liveness_pass_2

Richard Henderson posted 162 patches 1 month, 2 weeks ago
[PATCH v3 152/162] tcg: Assign TCGOP_TYPE in liveness_pass_2
Posted by Richard Henderson 1 month, 2 weeks ago
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 c66a262259..ff264d7c2e 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -4383,6 +4383,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;
@@ -4455,6 +4456,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;
@@ -4482,6 +4484,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;
-- 
2.43.0