diff mbox series

[08/46] tcg/optimize: Use fold_masks_zs in fold_bswap

Message ID 20241210152401.1823648-9-richard.henderson@linaro.org (mailing list archive)
State New
Headers show
Series tcg: Remove in-flight mask data from OptContext | expand

Commit Message

Richard Henderson Dec. 10, 2024, 3:23 p.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/optimize.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Pierrick Bouvier Dec. 17, 2024, 8:16 p.m. UTC | #1
On 12/10/24 07:23, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/optimize.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/tcg/optimize.c b/tcg/optimize.c
> index 285407ce05..3363ebd48c 100644
> --- a/tcg/optimize.c
> +++ b/tcg/optimize.c
> @@ -1082,7 +1082,6 @@ static bool fold_masks_zsa(OptContext *ctx, TCGOp *op, uint64_t z_mask,
>       return true;
>   }
>   
> -__attribute__((unused))
>   static bool fold_masks_zs(OptContext *ctx, TCGOp *op,
>                             uint64_t z_mask, uint64_t s_mask)
>   {
> @@ -1528,10 +1527,8 @@ static bool fold_bswap(OptContext *ctx, TCGOp *op)
>           s_mask = 0;
>           break;
>       }
> -    ctx->z_mask = z_mask;
> -    ctx->s_mask = s_mask;
>   
> -    return fold_masks(ctx, op);
> +    return fold_masks_zs(ctx, op, z_mask, s_mask);
>   }
>   
>   static bool fold_call(OptContext *ctx, TCGOp *op)

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff mbox series

Patch

diff --git a/tcg/optimize.c b/tcg/optimize.c
index 285407ce05..3363ebd48c 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1082,7 +1082,6 @@  static bool fold_masks_zsa(OptContext *ctx, TCGOp *op, uint64_t z_mask,
     return true;
 }
 
-__attribute__((unused))
 static bool fold_masks_zs(OptContext *ctx, TCGOp *op,
                           uint64_t z_mask, uint64_t s_mask)
 {
@@ -1528,10 +1527,8 @@  static bool fold_bswap(OptContext *ctx, TCGOp *op)
         s_mask = 0;
         break;
     }
-    ctx->z_mask = z_mask;
-    ctx->s_mask = s_mask;
 
-    return fold_masks(ctx, op);
+    return fold_masks_zs(ctx, op, z_mask, s_mask);
 }
 
 static bool fold_call(OptContext *ctx, TCGOp *op)