LATX: optimize AVX and scalar instruction sequences - #438
Conversation
Track VEX.128 destinations whose architectural YMM high halves are known to be zero, and materialize those clears only when a 256-bit operation can observe them or before leaving the TB. This removes repeated LASX clear instructions while preserving signal, JIT, TU, and AOT-visible state. Add a standalone JIT, cold-AOT, and hot-AOT semantic test for the deferred state. Signed-off-by: Lu Zeng <luzeng87@gmail.com>
xiezyang
left a comment
There was a problem hiding this comment.
VINSERTPS 快路径未处理 dest == src1 == src2 的别名情况。
例如 vinsertps xmm4, xmm4, xmm4, 0x9c 会在读取 src1 前覆盖 dest,导致原始 lane 0 丢失。
建议该快路径排除 dest_is_src1,或先保存 src1 后再写目标寄存器。
xiezyang
left a comment
There was a problem hiding this comment.
本 PR 包含的 b245da0 存在 3 处 YMM 结果未写回问题:
- VMASKMOVPS/PD
- VPBLENDVB
- VPBLENDW(立即数不是 0 或 0xff 时)
这些路径均将结果计算到 temp,但只在 XMM 形式下写回 dest。因此 YMM 目标寄存器低 128 位保留旧值,高 128 位被错误清零。
建议无条件将 temp 写回 dest,并且仅在 XMM 目标时调用 set_high128_xreg_to_zero(dest)。
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
|
This stack inherits the reproducible mixed XMM/YMM failure from #437 and also has the VINSERTPS destination/source alias issue identified in review. The independent changes need to be submitted and verified by function, without this shared stack. Closing this PR. |
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
|
Synced the YMM mask/blend writeback correction as commit |
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Combine independently tested AVX lowering, scalar FMA forwarding, VCOMIS flag handling, pixel updates, and VROUNDPS truncation. Preserve aliased VINSERTPS source values and use instruction-based test names. Signed-off-by: Lu Zeng <luzeng87@gmail.com>
dccd7ee to
e4403b0
Compare
|
Reorganized this branch on top of the current #437 head. All sequence changes are now represented by one squashed commit, |
Summary
Organization
This PR is stacked on #437. Its branch contains the five #437 prerequisite commits followed by one squashed instruction-sequence commit. Review the final commit for the additions in this PR. The previous cumulative audio and pixel-update PRs are superseded by this grouped PR.
Validation
This PR remains a draft while the grouped branch checks run.