cpu: cover eight AVX2 lane, blend and cross-lane permute lowerings #662
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/668"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-22T18:40:32Z.
Change
This closes eight coverage gaps in the AVX2 lane, blend and cross-lane permute lowering of
tools/ffx_version_query.py. Each was a one-line mutation that passed everycpu_test onmain. Only the AVX2 fixture (tests/cpu/avx2_permutes.{asm,def,py}) and its export count indocs/experiments.mdchange; the translator does not.Six new cases cover the eight mutations:
vextracti128 xmm0, ymm0, 2, then the fullymm0is storedvinserti128 ymm0, ymm1, xmm2, 2(register source)vpblendd ymm0, ymm1, ymm2, 1vperm2i128 ymm0, ymm1, ymm2, 38h(zeroed low lane)vpermdwith an index of 6 in lane 0vpermq ymm0, ymm1, 4Every existing case is unchanged, and
run2/run3compare all 32 output bytes.Verification
On
26fedf7(branch onf1f95cf), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14, on an AVX2-capable host:All 295 tests pass.
Each mutation was applied to
tools/ffx_version_query.pyone at a time, and allcpu_tests were run. Onmain, all of them passed for each mutation. A control that madevextracti128always take the low lane was caught bycpu_aot_avx2_permutes, so the run does detect a broken translator. On this branch, each of the eight mutations failscpu_aot_avx2_permutes.Checklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T19:17:30Z.
Verified
26fedf7on an Intel Core i7-6820HQ (Skylake), Windows 11 26100.9168, MSVC/ML64 19.52.37029,devpreset. It merges cleanly withmainatedc2e54.ctest --preset dev --no-tests=error -R "^cpu_" -j 4: 100% tests passed, 0 failed out of 119, and the new controls hold on an Intel host too.AI-assisted (Claude Code).