[all-commits] [llvm/llvm-project] 748bb1: [KnownFPClass] Propagate non-`sNaN` for `fadd`/`fs...

Eric Ross via All-commits all-commits at lists.llvm.org
Tue Sep 15 12:12:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 748bb124441967238cc4b0190d617cd2c8ec9af3
      https://github.com/llvm/llvm-project/commit/748bb124441967238cc4b0190d617cd2c8ec9af3
  Author: Eric Ross <zerico2005 at gmail.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M llvm/lib/Support/KnownFPClass.cpp
    M llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll
    M llvm/test/Transforms/Attributor/nofpclass-fadd-fsub.ll
    M llvm/test/Transforms/Attributor/nofpclass-fdiv.ll
    M llvm/test/Transforms/Attributor/nofpclass-fma.ll
    M llvm/test/Transforms/Attributor/nofpclass-fmul.ll
    M llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll
    M llvm/unittests/Analysis/ValueTrackingTest.cpp

  Log Message:
  -----------
  [KnownFPClass] Propagate non-`sNaN` for `fadd`/`fsub`, `fmul`, `fdiv`, and `fma` (#221876)

`fadd`, `fsub`, `fmul`, `fdiv`, and `fma` can only return `sNaN` if at
least one of their inputs are `sNaN`. This means that we can rule out
`sNaN` from the result if all of the arguments are known to never be
`sNaN`.

`sNaN` propagation for `frem` is handled in this PR:
https://github.com/llvm/llvm-project/pull/219303



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