diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2017-03-31 19:58:07 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2017-03-31 19:58:07 +0000 |
commit | 28bed106e09975d25879e3cf4390bc02f2ab9b90 (patch) | |
tree | eb8faeeb39f1be314feabc69a6a080eca14c1b19 /llvm/lib/CodeGen/ResetMachineFunctionPass.cpp | |
parent | 8edfaee7be8ba17cd054a90055c91a18c4d239e3 (diff) | |
download | bcm5719-llvm-28bed106e09975d25879e3cf4390bc02f2ab9b90.tar.gz bcm5719-llvm-28bed106e09975d25879e3cf4390bc02f2ab9b90.zip |
Do not translate rint into nearbyint, but truncate it like nearbyint.
A common way to implement nearbyint is by fiddling with the floating
point environment and calling rint. This is used at least by the BSD
libm and musl. As such, canonicalizing the latter to the former will
create infinite loops for libm and generally pessimize performance, at
least when the generic C versions are used.
This change preserves the rint in the libcall translation and also
handles the domain truncation logic, so that rint with float argument
will be reduced to rintf etc.
llvm-svn: 299247
Diffstat (limited to 'llvm/lib/CodeGen/ResetMachineFunctionPass.cpp')
0 files changed, 0 insertions, 0 deletions