tcg: Propagate new TCGOp to add_as_label_use
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 10 Sep 2024 21:17:30 +0000 (14:17 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 22 Sep 2024 04:54:49 +0000 (06:54 +0200)
commit83ac625c2bb14cc2991adedc9ac4f3f9ab3b096d
treee9f74a9fa925dffb7a45d2f385de76fed75d2271
parent409b9e39bec1b43de982c4708832bac13d4a20ab
tcg: Propagate new TCGOp to add_as_label_use

The use of tcg_last_op does not interact well with
TCGContext.emit_before_op, resulting in the label
being linked to something other than the branch op.

In this case it is easier to simply collect the emitted
branch op and pass it directly to add_as_label_use.

Reported-by: Elisha Hollander <just4now666666@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/tcg-op.c