[all-commits] [llvm/llvm-project] aa5ff6: [HLSL] Shore up floating point conversions (#90222)
Chris B via All-commits
all-commits at lists.llvm.org
Thu May 2 10:42:46 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa5ff68247ddd763c4f5de78ab8ee5739b6f401b
https://github.com/llvm/llvm-project/commit/aa5ff68247ddd763c4f5de78ab8ee5739b6f401b
Author: Chris B <chris.bieneman at me.com>
Date: 2024-05-02 (Thu, 02 May 2024)
Changed paths:
M clang/lib/Sema/SemaOverload.cpp
M clang/test/SemaHLSL/OverloadResolutionBugs.hlsl
A clang/test/SemaHLSL/ScalarOverloadResolution.hlsl
A clang/test/SemaHLSL/VectorElementOverloadResolution.hlsl
Log Message:
-----------
[HLSL] Shore up floating point conversions (#90222)
This PR fixes bugs in HLSL floating conversions. HLSL always has `half`,
`float` and `double` types, which promote in the order:
`half`->`float`->`double`
and convert in the order:
`double`->`float`->`half`
As with other conversions in C++, promotions are preferred over
conversions.
We do have floating conversions documented in the draft language
specification (https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf
[Conv.rank.float]) although the exact language is still in flux
(https://github.com/microsoft/hlsl-specs/pull/206).
Resolves #81047
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list