Ping.
r~
On 9/28/25 18:31, Richard Henderson wrote:
> 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(-)
>