[llvm] ValueTracking: Improve handling for fma/fmuladd (PR #175614)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 23 13:50:07 PST 2026
================
@@ -229,7 +229,8 @@ define float @square_nnan_fma_fabs_nsz_intrinsic_f32(float noundef %x, float %y)
define float @square_nnan_fma_fabs_intrinsic_f32_add_const(float noundef %x) {
; CHECK-LABEL: @square_nnan_fma_fabs_intrinsic_f32_add_const(
; CHECK-NEXT: [[FMA:%.*]] = call nnan float @llvm.fma.f32(float [[X:%.*]], float [[X]], float 1.000000e+00)
-; CHECK-NEXT: ret float [[FMA]]
+; CHECK-NEXT: [[FABSF:%.*]] = call float @llvm.fabs.f32(float [[FMA]])
----------------
dtcxzyw wrote:
We can make fadd_impl a bit more aggressive like `(pzero psub pnorm pinf) + (pnorm pinf) -> (psub pnorm pinf)`. This should cover the edge cases that nsub gets flushed to pzero.
https://github.com/llvm/llvm-project/pull/175614
More information about the llvm-commits
mailing list