From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: pierrick.bouvier@linaro.org, philmd@linaro.org
Subject: [PATCH for-10.1] tcg/optimize: Don't fold INDEX_op_and_vec to extract
Date: Fri, 18 Jul 2025 10:38:32 -0700 [thread overview]
Message-ID: <20250718173832.47820-1-richard.henderson@linaro.org> (raw)
There is no such thing as vector extract.
Fixes: 932522a9ddc1 ("tcg/optimize: Fold and to extract during optimize")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3036
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/optimize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 62a128bc9b..3638ab9fea 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1454,7 +1454,7 @@ static bool fold_and(OptContext *ctx, TCGOp *op)
a_mask = t1->z_mask & ~t2->o_mask;
if (!fold_masks_zosa_int(ctx, op, z_mask, o_mask, s_mask, a_mask)) {
- if (ti_is_const(t2)) {
+ if (op->opc == INDEX_op_and && ti_is_const(t2)) {
/*
* Canonicalize on extract, if valid. This aids x86 with its
* 2 operand MOVZBL and 2 operand AND, selecting the TCGOpcode
--
2.43.0
next reply other threads:[~2025-07-18 17:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 17:38 Richard Henderson [this message]
2025-07-18 19:11 ` [PATCH for-10.1] tcg/optimize: Don't fold INDEX_op_and_vec to extract Peter Maydell
2025-07-18 21:26 ` Richard Henderson
2025-07-18 20:10 ` Pierrick Bouvier
2025-07-19 13:05 ` Peter Maydell
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=20250718173832.47820-1-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--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).