On 27/9/26 10:59, Richard Henderson wrote:
Signed-off-by: Richard Henderson <[email protected]> --- include/tcg/tcg-op-common.h | 2 -- include/tcg/tcg-op-def.h.inc | 1 + tcg/tcg-op.c | 20 ++++++-------------- 3 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 9a22791be0d..75d965d40ab 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -426,6 +426,12 @@ void tcg_gen_brcond(TCGType type, TCGCond cond, TCGTemp *src1, } }+void tcg_gen_brcondi(TCGType type, TCGCond cond, TCGTemp *src1,+ int64_t src2, TCGLabel *l) +{ + tcg_gen_brcond(type, cond, src1, tcg_constant_internal(type, src2), l); +} + void tcg_gen_discard(TCGType type, TCGTemp *src) { tcg_gen_op1(INDEX_op_discard, type, temp_arg(src)); @@ -685,15 +691,6 @@ void tcg_gen_xori(TCGType type, TCGTemp *dst, TCGTemp *src1, int64_t src2)/* 32 bit ops */ -void tcg_gen_brcondi_i32(TCGCond cond, TCGv_i32 arg1, int32_t arg2, TCGLabel *l)-{ - if (cond == TCG_COND_ALWAYS) { - tcg_gen_br(l); - } else if (cond != TCG_COND_NEVER) {
Should we mention "Remove premature optimization" in the commit description?
- tcg_gen_brcond_i32(cond, arg1, tcg_constant_i32(arg2), l); - } -}
