[all-commits] [llvm/llvm-project] 36de8b: [X86] Require legal result types for f32 estimates
Matt via All-commits
all-commits at lists.llvm.org
Tue Sep 15 10:26:14 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 36de8b20fc6cb5edf4f0fe6e686c984e40bed35f
https://github.com/llvm/llvm-project/commit/36de8b20fc6cb5edf4f0fe6e686c984e40bed35f
Author: Matt <MattPD at users.noreply.github.com>
Date: 2026-09-15 (Tue, 15 Sep 2026)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
A llvm/test/CodeGen/X86/recip-sqrt-estimate-illegal-scalar-types.ll
A llvm/test/CodeGen/X86/recip-sqrt-estimate-illegal-types.ll
Log Message:
-----------
[X86] Require legal result types for f32 estimates
The single-precision paths in `getRecipEstimate` and `getSqrtEstimate`
match a fixed set of scalar and vector f32 types, then check the
corresponding subtarget features. Those checks do not imply that the
result type is legal. Soft-float makes these result types illegal. Scalar
f32 is also illegal on a 32-bit SSE1 target without SSE2 or x87. The hooks
can then build an X86-specific estimate node with an illegal result type
before type legalization. Type legalization has no rule for that node, so
compilation fails.
Require a legal result type before entering the single-precision estimate
paths. The f16 paths in these hooks already require a legal type. After
this patch, the f32 paths match that behavior. The hooks return no estimate
for an illegal result type, so the original division or square root stays
in the DAG and follows its normal lowering. Estimate code generation for
legal result types is unchanged.
Fixes https://github.com/llvm/llvm-project/issues/217801
Assisted-by: Claude Opus 5, GPT-5.6 Sol.
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