cpu: lower VEX AVX scalar FP, half-register moves, vinsertps/vextractps, and vcomis* #401
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/407"
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 Vonsek on 2026-11-22T00:33:43Z.
Change
vinsertps/vextractps, and scalar compare instructions intools/ffx_version_query.py:vaddss,vsubss,vmulss,vdivss,vsqrtss,vminss,vmaxss,vroundss,vaddsd,vsubsd,vmulsd,vdivsd,vsqrtsd,vminsd,vmaxsd,vroundsdvmovss,vmovhlps,vmovlhps,vmovlps,vmovhps,vmovlpdvinsertps,vextractps,vcomiss,vucomiss,vcomisd,vucomisdEncodingKind.VEX(rejecting EVEX encodings and MXCSR rounding mode) and zero upper YMM bytes for 128-bit XMM destinations.OSXSAVE) and 28 (AVX) plus XCR0 XMM/YMM state before invoking the native fixture (exiting 77 withSKIP_RETURN_CODE 77on hosts without AVX).tests/cpu/avx_scalar_fp.{asm,def,py}, CMake targetcpu_avx_scalar_fp_lifted, CTestcpu_aot_avx_scalar_fp, coverage mapping intools/form_coverage.py, and documentation indocs/experiments.md.Verification
cmake --build --preset dev --target cpu_avx_scalar_fp_lifted:ValueError: unsupported query operation at 0x1008: vaddss xmm0,xmm1,xmm2cmake --build --preset dev --target cpu_avx_scalar_fp_liftedsucceeded with 0 warningsctest --preset dev --no-tests=error -R "^(cpu_aot_avx_scalar_fp|cpu_aot_bmi1)$" -V: 2/2 passed (39 VEX AVX scalar FP/move/extract/insert/compare cases matched native and translated DLLs+ EVEXvaddssrejection control).\out\pe-env\Scripts\python.exe -B tests/form_coverage_check.py:form coverage checks passedEvidence and follow-up
AVX-grouped mnemonics indocs/coverage/x64_zen2.tsvusing source-built fixtures, gated by a runtime CPUID/XCR0 check.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-22T00:44:37Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
f7932cb562ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-22T00:37:38Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
f7932cbℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T17:50:59Z.
I integrated main and repaired the scalar FP findings. Round now quiets signaling NaNs with the original payload, MIN/MAX and directed rounding honor DAZ, and the COMI/UCOMI controls distinguish the masked invalid flag for quiet and signaling NaNs. The 39 original scalar cases, new MXCSR controls and existing shuffle cases passed in both Windows presets. Fresh CI is running.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T18:06:02Z.
The /O2 log showed one stale SSE test expecting rejection of VEX VEXTRACTPS with XMM0, which this PR now verifies against native execution. I changed that negative case to an untracked XMM3 source. SSE3/4.1, AVX scalar and AVX shuffle passed 3/3 in both Windows presets. CI is rerunning on the new head.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-22T00:44:37Z.
Code review location:
tools/ffx_version_query.py; line 35With a signaling-NaN source and masked invalid exceptions,
VROUNDSS/VROUNDSDmust return a quiet NaN, but this non-finite fast path returns the original signaling bit pattern. In a Linux/x64 native probe of this exact header with default MXCSR,vroundsswith immediate0x08converts input bits0x7f800001to0x7fc00001, whileround_x86<float>(x, 0)returns0x7f800001; the double version has the corresponding mismatch. Thus the newly accepted instructions can store different scalar bits from native execution. Handle NaNs separately from infinities and add signaling-NaN differential cases.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-22T00:44:37Z.
Code review location:
tools/ffx_version_query.py; line 293When MXCSR.DAZ is enabled, these comparisons treat subnormal operands as zero but can copy their original nonzero bits into the result. In an unoptimized Linux/x64 GCC probe with MXCSR
0x1fc0,a=1.0fandbcontaining float bits0x00000001, nativevminssreturns0x00000000, whereas this expression returns0x00000001; max and double forms have the same normalization problem. Theround_x86zero fast path likewise returns an unchanged subnormal under DAZ. Normalize DAZ inputs explicitly or use equivalent scalar intrinsics, and add DAZ-enabled differential cases rather than relying on an optimizer to replace the conditional with a native min/max instruction.Useful? React with 👍 / 👎.