LATX: optimize AVX and IR2 instruction generation - #438
Conversation
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)。
|
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. |
|
Synced the YMM mask/blend writeback correction as commit |
dccd7ee to
e4403b0
Compare
|
Reorganized this branch on top of the current #437 head. All sequence changes are now represented by one squashed commit, |
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>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
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>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
e4403b0 to
5672cc0
Compare
|
Rebased and consolidated on current master. The reviewed YMM writeback and VINSERTPS alias defects are fixed and retained. New focused coverage includes YMM mask/blend aliases, VINSERTPS dest==src1==src2, VEX.128 signal-state preservation, conversion rounding/saturation, and JIT/cold-AOT/hot-AOT execution. A clean 3A6000-25G integrated build passed lat-pr-fast 25/25 and all 21 instruction fixtures in JIT and AOT modes. Please re-review the updated draft head. |
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
Signed-off-by: Lu Zeng <luzeng87@gmail.com>
|
Added commit |
Summary
Correctness coverage
dest == src1anddest == src2VINSERTPS dest == src1 == src2Validation
master: passedlat-pr-fast: 25/25 passed.aot2fileslat-pr-fastchecks: 20/20 passedThis PR consolidates and supersedes #437, #439, #442, #445, #446, #448, #449, #450, #451, #452, #453, #454, #456, and #457. It remains a draft pending re-review of the current head.