[all-commits] [llvm/llvm-project] e1823e: [X86] Fix miscompile of fptosi.sat.iN.f16 for NaN ...
Nathaniel McCallum via All-commits
all-commits at lists.llvm.org
Fri Jul 31 00:14:16 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e1823e8b1778997d12ba947350190af5ee845ca9
https://github.com/llvm/llvm-project/commit/e1823e8b1778997d12ba947350190af5ee845ca9
Author: Nathaniel McCallum <nathaniel at mccallum.life>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
A llvm/test/CodeGen/X86/fptosi-sat-scalar-f16.ll
M llvm/test/CodeGen/X86/fptosi-sat-scalar.ll
Log Message:
-----------
[X86] Fix miscompile of fptosi.sat.iN.f16 for NaN under avx512fp16 (#210556)
`X86TargetLowering::LowerFP_TO_INT_SAT` incorrectly lowered
`llvm.fptosi.sat.iN.f16` for N = 13, 14, 15, 16 under `avx512fp16`
codegen: NaN inputs produced the destination type's minimum value
instead of the 0 that the intrinsic's documented semantics require.
Vector forms that scalarize through this lowering are affected under
the same condition, applied per element. See the third commit message
for the full root-cause analysis and fix rationale.
---
Assisted-by: Claude (Anthropic)
Assisted-by: Codex (OpenAI)
The investigation, root-cause analysis, fix, and tests in this PR were
developed with substantial AI assistance (Claude), including four
independent AI-assisted review rounds (Codex). I reviewed and take
responsibility for all code, analysis, and claims in this PR, and can
answer questions about the reasoning above.
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