diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2024-12-10 15:34:12 -0600 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-06-30 07:42:37 -0600 |
| commit | fcde7363d33744d14dc7e844752b53c4aa1d69ba (patch) | |
| tree | fbed7846d06720dfdc58af15e2943802c80110d7 /tcg/optimize.c | |
| parent | 9d80b3c89022279865220c23a1246a4e12786f27 (diff) | |
| download | focaccia-qemu-fcde7363d33744d14dc7e844752b53c4aa1d69ba.tar.gz focaccia-qemu-fcde7363d33744d14dc7e844752b53c4aa1d69ba.zip | |
tcg/optimize: Build and use o_bits in fold_extract
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/optimize.c')
| -rw-r--r-- | tcg/optimize.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index 043568a10d..f5fc0cfff9 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1963,7 +1963,7 @@ static bool fold_eqv(OptContext *ctx, TCGOp *op) static bool fold_extract(OptContext *ctx, TCGOp *op) { - uint64_t z_mask_old, z_mask; + uint64_t z_mask, o_mask, a_mask; TempOptInfo *t1 = arg_info(op->args[1]); int pos = op->args[2]; int len = op->args[3]; @@ -1973,13 +1973,11 @@ static bool fold_extract(OptContext *ctx, TCGOp *op) extract64(ti_const_val(t1), pos, len)); } - z_mask_old = t1->z_mask; - z_mask = extract64(z_mask_old, pos, len); - if (pos == 0 && fold_affected_mask(ctx, op, z_mask_old ^ z_mask)) { - return true; - } + z_mask = extract64(t1->z_mask, pos, len); + o_mask = extract64(t1->o_mask, pos, len); + a_mask = pos ? -1 : t1->z_mask ^ z_mask; - return fold_masks_z(ctx, op, z_mask); + return fold_masks_zosa(ctx, op, z_mask, o_mask, 0, a_mask); } static bool fold_extract2(OptContext *ctx, TCGOp *op) |