tcg/optimize: Do use affected bits
We inadvertently disabled affected bits optimizations on operations
that use fold_masks_zosa. These happen relatively often in x86 code
for extract/sextract; for example given the following:
mov %esi, %ebp
xor $0x1, %ebp
the optimizer is able to simplify the "extract_i64 rbp,tmp0,$0x0,$0x20"
produced by the second instruction to a move.
Cc: qemu-stable@nongnu.org
Fixes: 932522a9dd ("tcg/optimize: Fold and to extract during optimize")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251223163720.985578-1-pbonzini@redhat.com>
(cherry picked from commit 23b53ec3a8a279cb5acd5e022b464a4272fe9f8c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
b276b2ca22
commit
a53ba65fff
1 changed files with 1 additions and 1 deletions
|
|
@ -1103,7 +1103,7 @@ static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op,
|
||||||
static bool fold_masks_zosa(OptContext *ctx, TCGOp *op, uint64_t z_mask,
|
static bool fold_masks_zosa(OptContext *ctx, TCGOp *op, uint64_t z_mask,
|
||||||
uint64_t o_mask, int64_t s_mask, uint64_t a_mask)
|
uint64_t o_mask, int64_t s_mask, uint64_t a_mask)
|
||||||
{
|
{
|
||||||
fold_masks_zosa_int(ctx, op, z_mask, o_mask, s_mask, -1);
|
fold_masks_zosa_int(ctx, op, z_mask, o_mask, s_mask, a_mask);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue