Skip to content

[SPIRV] Preserve NaN, Inf, and signed zeros w/ -Gis - #7693

Merged
Chris B (llvm-beanz) merged 3 commits into
microsoft:mainfrom
llvm-beanz:cbieneman/SignedZeroInfNanPreserve
Aug 18, 2025
Merged

Chris B (llvm-beanz) merged 3 commits into
microsoft:mainfrom
llvm-beanz:cbieneman/SignedZeroInfNanPreserve

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

The -Gis flag opts into "strict" IEEE math rules, which include preserving NaN, Inf and signed/unsigned zeros. This change adds the SPIRV SignedZeroInfNanPreserve capability and execution mode when -Gis is passed to DXC.

The `-Gis` flag opts into "strict" IEEE math rules, which include
preserving NaN, Inf and signed/unsigned zeros. This change adds the
SPIRV SignedZeroInfNanPreserve capability and execution mode when `-Gis`
is passed to DXC.

../tools/clang/test/CodeGenSPIRV/SignedZeroInfNanPreserve.hlsl

@bob80905 Joshua Batista (bob80905) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Keenuts Nathan Gauër (Keenuts) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! Just the extension possibility, otherwise if there is a reason not to, looks good

Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp
../tools/clang/test/CodeGenSPIRV/SignedZeroInfNanPreserve.hlsl

@Keenuts Nathan Gauër (Keenuts) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor nit on the CHECK line name, otherwise LGTM,thanks!

Comment thread tools/clang/test/CodeGenSPIRV/SignedZeroInfNanPreserve.hlsl Outdated
Comment thread tools/clang/test/CodeGenSPIRV/SignedZeroInfNanPreserve.hlsl Outdated
Co-authored-by: Nathan Gauër <github@keenuts.net>
@llvm-beanz
Chris B (llvm-beanz) merged commit 7a8c90c into microsoft:main Aug 18, 2025
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Aug 18, 2025
@llvm-beanz
Chris B (llvm-beanz) deleted the cbieneman/SignedZeroInfNanPreserve branch August 18, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants