On 12/10/24 07:23, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> tcg/optimize.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tcg/optimize.c b/tcg/optimize.c
> index 6644d24da6..3f2f351bae 100644
> --- a/tcg/optimize.c
> +++ b/tcg/optimize.c
> @@ -978,7 +978,7 @@ static void finish_ebb(OptContext *ctx)
> finish_bb(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;
> @@ -996,6 +996,7 @@ static void finish_folding(OptContext *ctx, TCGOp *op)
> ts_info(ts)->s_mask = ctx->s_mask;
> }
> }
> + return true;
> }
>
> /*
> @@ -1214,7 +1215,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. */
> @@ -1224,7 +1225,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)
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>