[all-commits] [llvm/llvm-project] 4f42de: [SimplifyLibCalls] Constant fold nan libcall (#101...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Thu Aug 1 02:25:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f42deb5f4fde1676e7cf3ddc54e44e0f4a89760
      https://github.com/llvm/llvm-project/commit/4f42deb5f4fde1676e7cf3ddc54e44e0f4a89760
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    A llvm/test/Transforms/InstCombine/nan.ll
    A llvm/test/Transforms/InstCombine/nanl-fp128.ll
    A llvm/test/Transforms/InstCombine/nanl-fp80.ll
    A llvm/test/Transforms/InstCombine/nanl-ppc-fp128.ll

  Log Message:
  -----------
  [SimplifyLibCalls] Constant fold nan libcall (#101459)

Reference: https://en.cppreference.com/w/c/numeric/math/nan
The logic is copied from clang frontend:


https://github.com/llvm/llvm-project/blob/1d2b2d29d733200b704f38d220d22ecc07d6cf42/clang/lib/AST/ExprConstant.cpp#L14741-L14777

---------

Co-authored-by: Nikita Popov <github at npopov.com>



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