[PATCH] D150985: [clang] Allow fp in atomic fetch max/min builtins

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 24 10:51:45 PDT 2023


yaxunl added a comment.

In D150985#4357207 <https://reviews.llvm.org/D150985#4357207>, @tra wrote:

> The code changes look OK to me.
>
> Whether allowing FP for clang builtins is OK -- I have no idea, especially for the c11 ones.

hardware atomic fmax/fmin instructions are added because users have such needs. Their adoption in LLVM IR is to facilitate such needs. Then again in clang builtins. For users who would like to use clang builtins to access atomic fmax/fmin, it is a natural extension for the existing clang builtins since otherwise, they have to use LLVM intrinsics. Uniformly extending all clang builtins simplifies the code and also facilitates the language APIs to extend to atomic fmax/fmin. I think this is the rationale we did this for atomic fadd/fsub.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150985/new/

https://reviews.llvm.org/D150985



More information about the cfe-commits mailing list