[all-commits] [llvm/llvm-project] 58b5df: Clang: Add elementwise minnum/maxnum builtin funct...

YunQiang Su via All-commits all-commits at lists.llvm.org
Sun Apr 13 22:49:54 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58b5df09dc6f899016fc707bf937b36b36934b6d
      https://github.com/llvm/llvm-project/commit/58b5df09dc6f899016fc707bf937b36b36934b6d
  Author: YunQiang Su <syq at debian.org>
  Date:   2025-04-14 (Mon, 14 Apr 2025)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/Builtins.td
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Sema/SemaChecking.cpp
    A clang/test/CodeGen/builtin-maxnum-minnum.c

  Log Message:
  -----------
  Clang: Add elementwise minnum/maxnum builtin functions (#129207)

With https://github.com/llvm/llvm-project/pull/112852, we claimed that
llvm.minnum and llvm.maxnum should treat +0.0>-0.0, while libc doesn't
require fmin(3)/fmax(3) for it.

To make llvm.minnum/llvm.maxnum easy to use, we define the builtin
functions for them, include
    __builtin_elementwise_minnum
    __builtin_elementwise_maxnum

All of them support _Float16, __bf16, float, double, long double.



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