[ConstantFolding] Expand folding of some library functions
authorEvandro Menezes <e.menezes@samsung.com>
Thu, 12 Sep 2019 21:23:22 +0000 (21:23 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Thu, 12 Sep 2019 21:23:22 +0000 (21:23 +0000)
commit08df6e64d5700d9469358ecfa4bdb46073116529
tree4f418a0c6795345932cb2553a2fc9218fb44ea60
parent75e963ec6fae4ba36bae3c6712614847f8221754
[ConstantFolding] Expand folding of some library functions

Expanding the folding of `nearbyint()`, `rint()` and `trunc()` to library
functions, in addition to the current support for intrinsics.

Differential revision: https://reviews.llvm.org/D67468

llvm-svn: 371774
llvm/lib/Analysis/ConstantFolding.cpp
llvm/test/Analysis/ConstantFolding/rint.ll [new file with mode: 0644]
llvm/test/Analysis/ConstantFolding/round.ll [moved from llvm/test/Transforms/InstCombine/round.ll with 86% similarity]
llvm/test/Analysis/ConstantFolding/trunc.ll [new file with mode: 0644]