[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/51] tcg/optimize: Use finish_folding in fold_add, fold_add_
From: |
Richard Henderson |
Subject: |
[PATCH v2 06/51] tcg/optimize: Use finish_folding in fold_add, fold_add_vec, fold_addsub2 |
Date: |
Thu, 19 Dec 2024 20:10:18 -0800 |
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 17b72fe759..41fd69365b 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -977,7 +977,7 @@ static void finish_ebb(OptContext *ctx)
remove_mem_copy_all(ctx);
}
-static void finish_folding(OptContext *ctx, TCGOp *op)
+static bool finish_folding(OptContext *ctx, TCGOp *op)
{
const TCGOpDef *def = &tcg_op_defs[op->opc];
int i, nb_oargs;
@@ -995,6 +995,7 @@ static void finish_folding(OptContext *ctx, TCGOp *op)
ts_info(ts)->s_mask = ctx->s_mask;
}
}
+ return true;
}
/*
@@ -1221,7 +1222,7 @@ static bool fold_add(OptContext *ctx, TCGOp *op)
fold_xi_to_x(ctx, op, 0)) {
return true;
}
- return false;
+ return finish_folding(ctx, op);
}
/* We cannot as yet do_constant_folding with vectors. */
@@ -1231,7 +1232,7 @@ static bool fold_add_vec(OptContext *ctx, TCGOp *op)
fold_xi_to_x(ctx, op, 0)) {
return true;
}
- return false;
+ return finish_folding(ctx, op);
}
static bool fold_addsub2(OptContext *ctx, TCGOp *op, bool add)
@@ -1298,7 +1299,7 @@ static bool fold_addsub2(OptContext *ctx, TCGOp *op, bool
add)
op->args[4] = arg_new_constant(ctx, bl);
op->args[5] = arg_new_constant(ctx, bh);
}
- return false;
+ return finish_folding(ctx, op);
}
static bool fold_add2(OptContext *ctx, TCGOp *op)
--
2.43.0
- [PATCH v2 00/51] tcg: Remove in-flight mask data from OptContext, Richard Henderson, 2024/12/19
- [PATCH v2 04/51] tcg/optimize: Split out fold_masks_zs, Richard Henderson, 2024/12/19
- [PATCH v2 03/51] tcg/optimize: Copy mask writeback to fold_masks, Richard Henderson, 2024/12/19
- [PATCH v2 02/51] tcg/optimize: Split out fold_affected_mask, Richard Henderson, 2024/12/19
- [PATCH v2 01/51] tcg/optimize: Split out finish_bb, finish_ebb, Richard Henderson, 2024/12/19
- [PATCH v2 05/51] tcg/optimize: Augment s_mask from z_mask in fold_masks_zs, Richard Henderson, 2024/12/19
- [PATCH v2 06/51] tcg/optimize: Use finish_folding in fold_add, fold_add_vec, fold_addsub2,
Richard Henderson <=
- [PATCH v2 07/51] tcg/optimize: Use fold_masks_zs in fold_and, Richard Henderson, 2024/12/19
- [PATCH v2 11/51] tcg/optimize: Use fold_masks_z in fold_ctpop, Richard Henderson, 2024/12/19
- [PATCH v2 08/51] tcg/optimize: Use fold_masks_zs in fold_andc, Richard Henderson, 2024/12/19
- [PATCH v2 12/51] tcg/optimize: Use fold_and and fold_masks_z in fold_deposit, Richard Henderson, 2024/12/19
- [PATCH v2 09/51] tcg/optimize: Use fold_masks_zs in fold_bswap, Richard Henderson, 2024/12/19
- [PATCH v2 14/51] tcg/optimize: Use finish_folding in fold_divide, Richard Henderson, 2024/12/19
- [PATCH v2 17/51] tcg/optimize: Use fold_masks_z in fold_extract, Richard Henderson, 2024/12/19
- [PATCH v2 20/51] tcg/optimize: Use fold_masks_z in fold_extu, Richard Henderson, 2024/12/19
- [PATCH v2 13/51] tcg/optimize: Compute sign mask in fold_deposit, Richard Henderson, 2024/12/19