[PATCH] D153233: clang: Add __builtin_elementwise_rint and nearbyint

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 20 15:33:13 PDT 2023


arsenm added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:656
+  T __builtin_elementwise_nearbyint(T x)     round x to the nearest  integer value in floating point format,      floating point types
+                                             rounding according to the current rounding direction.
+                                             May not raise the inexact floating-point exception. This is
----------------
bob80905 wrote:
> Nit: I don't think a "current rounding direction" exists, and personally don't see the significance of the second half of this sentence.
It does exist, we just happen to ignore floating point environment most of the time. The current state of things is we have 3 LLVM intrinsics with the same behavior (nearbyint, rint and roundeven). The distinction only exists with fenv access / strictfp 


================
Comment at: clang/lib/Sema/SemaChecking.cpp:18583
           << Callee << CallerTCB;
     }
   }
----------------
bob80905 wrote:
> I don't believe you intended to remove all this code in your latest update, did you?
I didn't delete any code?


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

https://reviews.llvm.org/D153233



More information about the cfe-commits mailing list