[all-commits] [llvm/llvm-project] f4779c: [InstCombine] Preserve signbit semantics of NaN wi...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Tue Apr 29 15:34:05 PDT 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f4779c389868d0edc05322059bf23434ae340349
      https://github.com/llvm/llvm-project/commit/f4779c389868d0edc05322059bf23434ae340349
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2025-04-29 (Tue, 29 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/fabs.ll

  Log Message:
  -----------
  [InstCombine] Preserve signbit semantics of NaN with fold to fabs (#136648)

As per the LangRef and IEEE 754-2008 standard, the sign bit of NaN is
preserved if there is no floating-point operation being performed.
See also
https://github.com/llvm/llvm-project/commit/862e35e25a68502433da0a8d0819448ff5745339
for reference.

Alive2: https://alive2.llvm.org/ce/z/QYtEGj
Closes https://github.com/llvm/llvm-project/issues/136646

(cherry picked from commit 3e1e4062e1e95031c32c0ed9786647ef1a4141aa)



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