qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PULL 7/9] tcg/optimize: optimize TSTNE using smask and zmask
Date: Mon, 10 Feb 2025 11:29:14 +0100	[thread overview]
Message-ID: <4b4dacd6-f61c-44d9-9764-d111413e42d0@linaro.org> (raw)
In-Reply-To: <20250210102255.2555097-8-pbonzini@redhat.com>

On 10/2/25 11:22, Paolo Bonzini wrote:
> Generalize the existing optimization of "TSTNE x,sign" and "TSTNE x,-1".
> This can be useful for example in the i386 frontend, which will generate
> tests of zero-extended registers against 0xffffffff.
> 
> Ironically, on x86 hosts this is a very slight pessimization in the very
> case it's meant to optimize because
> 
>   brcond_i64 cc_dst,$0xffffffff,tsteq,$L1
> 
> (test %ebx, %ebx) is 1 byte smaller than
> 
>   brcond_i64 cc_dst,$0x0,eq,$L1
> 
> (test %rbx, %rbx).  However, in general it is an improvement, especially
> if it avoids placing a large immediate in the constant pool.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   tcg/optimize.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

https://lore.kernel.org/qemu-devel/484b6063-e21f-48d6-9121-6c0c64396889@linaro.org/



  reply	other threads:[~2025-02-10 10:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 10:22 [PULL v2 0/9] Rust, TCG, x86 patches for 2025-02-07 Paolo Bonzini
2025-02-10 10:22 ` [PULL 1/9] rust: remove unnecessary Cargo.toml metadata Paolo Bonzini
2025-02-10 10:30   ` Philippe Mathieu-Daudé
2025-02-10 10:22 ` [PULL 2/9] rust: include rust_version in Cargo.toml Paolo Bonzini
2025-02-10 10:22 ` [PULL 3/9] rust: add docs Paolo Bonzini
2025-02-10 10:22 ` [PULL 4/9] rust: add clippy configuration file Paolo Bonzini
2025-02-10 10:22 ` [PULL 5/9] target/i386: Do not raise Invalid for 0 * Inf + QNaN Paolo Bonzini
2025-02-10 10:22 ` [PULL 6/9] tests/tcg/x86_64/fma: Test some x86 fused-multiply-add cases Paolo Bonzini
2025-02-10 10:22 ` [PULL 7/9] tcg/optimize: optimize TSTNE using smask and zmask Paolo Bonzini
2025-02-10 10:29   ` Philippe Mathieu-Daudé [this message]
2025-02-10 10:22 ` [PULL 8/9] rust: pl011: use default set of lints Paolo Bonzini
2025-02-10 10:22 ` [PULL 9/9] rust: restrict missing_const_for_fn to qemu_api crate Paolo Bonzini
2025-02-10 18:21 ` [PULL v2 0/9] Rust, TCG, x86 patches for 2025-02-07 Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b4dacd6-f61c-44d9-9764-d111413e42d0@linaro.org \
    --to=philmd@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).