Re: [PATCH] tcg/optimize: Fix constant folding of setcond

2024-12-08 Thread wannacu
> I was curious as to why this helped, when arg_new_temp was supposed to be > doing exactly > this. It turns out we were incorrectly reusing an old temp, not allocating a > new one. I appreciate your explanation of the issue. I had attempted to update the z_mask in init_ts_info when the temp

Re: [PATCH] tcg/optimize: Fix constant folding of setcond

2024-12-07 Thread Richard Henderson
On 12/6/24 03:58, wannacu wrote: The `z_mask` field of TCGTemp argument needs to be properly set for the upcoming `fold_setcond_zmask` call This patch resolves issues with running some x86_64 applications (e.g., FontForge, Krita) on riscv64 Signed-off-by: wannacu --- tcg/optimize.c

Re: [PATCH] tcg/optimize: Fix constant folding of setcond

2024-12-07 Thread wannacu
> The problem is stale data in tmp's arg_info, correct? Better would be adding > fold_and(op2) a few lines later, after finishing setup of op2's arguments. You're absolutely right, stale data in tmp's arg_info is the root issue here. > (1) The inline assembly is incorrect, and (2) the test does

Re: [PATCH] tcg/optimize: Fix constant folding of setcond

2024-12-06 Thread Richard Henderson
On 12/6/24 03:58, wannacu wrote: The `z_mask` field of TCGTemp argument needs to be properly set for the upcoming `fold_setcond_zmask` call This patch resolves issues with running some x86_64 applications (e.g., FontForge, Krita) on riscv64 Signed-off-by: wannacu --- tcg/optimize.c

[PATCH] tcg/optimize: Fix constant folding of setcond

2024-12-06 Thread wannacu
The `z_mask` field of TCGTemp argument needs to be properly set for the upcoming `fold_setcond_zmask` call This patch resolves issues with running some x86_64 applications (e.g., FontForge, Krita) on riscv64 Signed-off-by: wannacu --- tcg/optimize.c | 3 +++ tests/tcg/x86_64/