qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] tcg: Delay lowering unsupported deposit/extract2
@ 2025-09-28 16:31 Richard Henderson
  2025-09-28 16:31 ` [PATCH 1/5] tcg: Simplify extract2 usage in tcg_gen_shifti_i64 Richard Henderson
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Richard Henderson @ 2025-09-28 16:31 UTC (permalink / raw)
  To: qemu-devel

Reviving a 2 year old set of patches:

The opcodes that we generate early do not fold away nicely when operands
of deposit or extract2 turn out to be constants, especially zero.  

This isn't particularly rare either, as various target ISAs implement
constant shifts with extract2 and their zero register.   Or the compiler
expands x = y | mask with x = deposit(y, -1, pos, len);

Delay lowering of these unsupported operations until optimize, when
we have performed constant propagation.


r~


Richard Henderson (5):
  tcg: Simplify extract2 usage in tcg_gen_shifti_i64
  tcg/optimize: Lower unsupported deposit during optimize
  tcg/optimize: Lower unsupported extract2 during optimize
  tcg: Expand missing rotri with extract2
  tcg: Expand extract2_i64 with extract2_i32 on 32-bit host

 tcg/optimize.c | 257 +++++++++++++++++++++++++++++++++++-----
 tcg/tcg-op.c   | 311 +++++++++++++++++++------------------------------
 2 files changed, 352 insertions(+), 216 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-10-29 13:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-28 16:31 [PATCH 0/5] tcg: Delay lowering unsupported deposit/extract2 Richard Henderson
2025-09-28 16:31 ` [PATCH 1/5] tcg: Simplify extract2 usage in tcg_gen_shifti_i64 Richard Henderson
2025-10-29  9:05   ` Manos Pitsidianakis
2025-10-29 13:22   ` Philippe Mathieu-Daudé
2025-09-28 16:31 ` [PATCH 2/5] tcg/optimize: Lower unsupported deposit during optimize Richard Henderson
2025-09-28 16:31 ` [PATCH 3/5] tcg/optimize: Lower unsupported extract2 " Richard Henderson
2025-10-29  9:17   ` Manos Pitsidianakis
2025-09-28 16:31 ` [PATCH 4/5] tcg: Expand missing rotri with extract2 Richard Henderson
2025-10-29  9:30   ` Manos Pitsidianakis
2025-10-29  9:42     ` Richard Henderson
2025-09-28 16:31 ` [PATCH 5/5] tcg: Expand extract2_i64 with extract2_i32 on 32-bit host Richard Henderson
2025-10-29  8:25 ` [PATCH 0/5] tcg: Delay lowering unsupported deposit/extract2 Richard Henderson

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).