Skip to content

Skip CodeGenFloatingPointEnvironment under x64 ARM64 emulation - #8794

Open
Alex Sepkowski (alsepkow) wants to merge 2 commits into
microsoft:mainfrom
alsepkow:fix-arm64-x64-fp-test
Open

Skip CodeGenFloatingPointEnvironment under x64 ARM64 emulation#8794
Alex Sepkowski (alsepkow) wants to merge 2 commits into
microsoft:mainfrom
alsepkow:fix-arm64-x64-fp-test

Conversation

@alsepkow

@alsepkow Alex Sepkowski (alsepkow) commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

fixes #8793

Skip CompilerTest::CodeGenFloatingPointEnvironment when the x64 test binary is running under emulation on ARM64 Windows.

The test attempts to unmask the divide-by-zero floating-point exception, but x64 emulation leaves _EM_ZERODIVIDE masked. The failure occurs before DXC compilation, so it does not indicate an ARM64X compiler regression.

The runtime check uses the x64 target macro together with IsWow64Process2's native machine result. IsWow64Process2 is resolved dynamically to preserve compatibility with older Windows versions.

The following PR's originally added skip logic for this test in 2022
#4308
#4320

Testing

Tested on ARM64 Windows with an x64 build of ClangHLSLTests:

  • Before: CodeGenFloatingPointEnvironment failed with 0x0208021F versus 0x02080217.
  • After: the test is reported as skipped.
  • Full suite: 4928 total, 4927 passed, 0 failed, 1 skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: cf0be5dd-405f-45e0-897d-a4762fa7b920
@alsepkow
Alex Sepkowski (alsepkow) marked this pull request as ready for review August 18, 2026 00:55
Copilot AI balanced review requested due to automatic review settings August 18, 2026 00:55
@alsepkow Alex Sepkowski (alsepkow) changed the title Skip FP environment test under x64 ARM64 emulation Skip CodeGenFloatingPointEnvironment under x64 ARM64 emulation Aug 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Skips a Windows floating-point test when an x64 binary runs under ARM64 emulation, avoiding a known platform-specific false failure.

Changes:

  • Dynamically detects ARM64 host architecture via IsWow64Process2.
  • Reports the affected test as skipped under x64 emulation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/clang/unittests/HLSL/CompilerTest.cpp Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 18, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@damyanp Damyan Pepper (damyanp) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file a follow up bug to remind us to investigate this further please?

@alsepkow

Copy link
Copy Markdown
Contributor Author

Reference in ne

#8795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

CompilerTestCodeGenFloatingPointEnvironment fails on ARM64x when run under x64 emulation

3 participants