On 4/18/25 03:46, Nicholas Piggin wrote:
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 ^
Yeah, I filled in that blank just recently:
Fixes: fb744ece3a78 ("tcg: Copy TCGOP_TYPE in tcg_op_insert_{after,before}")
@@ -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?
No, it's used quite a bit more in tcg/optimize.c.
So after this patch, the type assignment in those functions looks
redundant. Maybe you could pass in the type as an argument.
During development I had that, but it turned out to be unwieldy. But perhaps that could
be fixed with a local wrapper within optimize.c, taking the type from OptContext.
I'll experiment and get back to you.
r~