summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/libcall-declarations.c
Commit message (Collapse)AuthorAgeFilesLines
* Declare lgamma library builtins as never being constJacob Gravelle2017-02-211-3/+12
| | | | | | | | | | | | | | | Summary: POSIX requires lgamma writes to an external global variable, signgam. This prevents annotating lgamma with readnone, which is incorrect on targets that write to signgam. Reviewers: efriedma, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29778 llvm-svn: 295781
* Darwin: add __sinpi (etc) and __exp10 libbuiltinsTim Northover2014-01-141-1/+20
| | | | | | | | | | | These functions have the same constness properties of the normal libm functions, which allows LLVM to optimise code better in general. There are also a couple of specific optimisations that only trigger when these are properly marked. rdar://problem/13729466 llvm-svn: 199249
* The second parameter of nexttoward is always long double.Benjamin Kramer2013-09-281-4/+4
| | | | llvm-svn: 191623
* Add new libm LIBBUILTIN definitions, synchronizing with __builtin_*Hal Finkel2013-09-181-99/+479
| | | | | | | | | | | | For all libm __builtin_* functions that are defined, this adds the corresponding LIBBUILTIN definitions (tagged, as necessary, with "e" instead of "c" when the function may set errno). Note that this changes the current definitions for lrint and fma (unfortunately). The Linux man page documents that these don't set errno, but the POSIX standard says that they should. llvm-svn: 190922
* Add the missing "n" to libm LIBBUILTIN definitionsHal Finkel2013-09-061-9/+22
| | | | | | | | | | The libm math functions should be marked with the "n" (nothrow) flag so that the corresponding IR function declarations are tagged with the nounwind attribute (this has been true in C mode, but not in C++ mode). The test case has been updated to run in C++ mode in addition to in C mode. llvm-svn: 190217
* Add lrint to the list of math builtins. It never sets errno so we can mark ↵Benjamin Kramer2013-08-091-9/+18
| | | | | | it as readnone. llvm-svn: 188065
* Fix testcases to not rely upon target-* attributes.Bill Wendling2013-02-261-105/+104
| | | | llvm-svn: 176135
* Revert "Add more attributes from the command line to functions."Anna Zaks2013-02-251-104/+105
| | | | | | | | This reverts commit 176009. The commit is a likely cause of several buildbot failures. llvm-svn: 176044
* Add more attributes from the command line to functions.Bill Wendling2013-02-251-105/+104
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-201-102/+107
| | | | | | function attributes. llvm-svn: 175606
* Make ceil/floor/nearbyint/rint/round const even with -fmath-errno.Benjamin Kramer2012-08-221-1/+16
| | | | | | | | The conditions described by POSIX can never happen with IEEE-754 floats. When the function is const we can emit a single sse4.1 instruction for it, without losing anything :) llvm-svn: 162379
* Math builtin definition tweaks.Benjamin Kramer2012-08-221-0/+176
There were missed optimizations when the system headers didn't have attributes in place, specifically: - Add copysign, exp2, log2, nearbyint, rint and trunc to the list. These are functions that get inlined by LLVM's optimizer, but only when they have the right attributes. - Mark copysign, fabs, fmax, fmin and trunc const unconditionally. Previously these were only const with -fno-math-errno, but they never set errno per POSIX. For ceil/floor/nearbyint/round I'm not aware of any implementation that sets errno, but POSIX says it may signal overflow so I left them alone for now. llvm-svn: 162375
OpenPOWER on IntegriCloud