Skip to content

Conversation

tcorringham
Copy link

Amend the test to use literal double values which are encoded to the same binary represenation by both dxc and clang. This allows the expected values to match regardless of which compiler the test instance is using.

The encoding of the previous arbitrary values used just happened to differ between dxc and clang, resulting in the test failing when using dxc as the expected values were those produced by clang.

Fixes #398
Fixes #415
Fixes #418

Tim Corringham added 2 commits September 11, 2025 11:18
Amend the test to use literal double values which are encoded to the
same binary represenation by both dxc and clang.  This allows the
expected values to match regardless of which compiler the test
instance is using.

The encoding of the previous arbitrary values used just happened to
differ between dxc and clang, resulting in the test failing when
using dxc as the expected values were those produced by clang.

Fixes llvm#398
Fixes llvm#415
Fixes llvm#418
Change the failing literal double value to one that (hopefully)
is encoded to the same 64 bit pattern by both dxc and clang.
@llvm-beanz
Copy link
Collaborator

With -HV 202x Clang and DXC should be encoding the literals the same, and the generated IR seems to be the same:

https://godbolt.org/z/19bY6jPW8

@tcorringham
Copy link
Author

Hmm, that isn't what I've been seeing locally - I see the difference as in in the reported issues. I'll take another look...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

asuint.64.test fails on warp OffloadTest-d3d12 :: Feature/HLSLLib/asuint.64.test Test Feature/HLSLLib/asuint.64.test fails on Nvidia GTX 1070
2 participants