Merging r258416 and r258428:
authorHans Wennborg <hans@hanshq.net>
Fri, 22 Jan 2016 18:37:31 +0000 (18:37 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 22 Jan 2016 18:37:31 +0000 (18:37 +0000)
commit16f83af7618a4dfb4ef1891b07adb23cc54e4c86
tree0a1d0935d96c46d51ee282e50c94aba2db958f5d
parentc89d9654310e0f5b1171888c6573d09c9e66d0c4
Merging r258416 and r258428:

------------------------------------------------------------------------
r258416 | spatel | 2016-01-21 10:01:57 -0800 (Thu, 21 Jan 2016) | 2 lines

make helper functions static; NFCI
------------------------------------------------------------------------

------------------------------------------------------------------------
r258428 | spatel | 2016-01-21 12:19:54 -0800 (Thu, 21 Jan 2016) | 15 lines

[LibCallSimplifier] don't get fooled by a fake fmin()

This is similar to the bug/fix:
https://llvm.org/bugs/show_bug.cgi?id=26211
http://reviews.llvm.org/rL258325

The fmin() test case reveals another bug caused by sloppy
code duplication. It will crash without this patch because
fp128 is a valid floating-point type, but we would think
that we had matched a function that used doubles.

The new helper function can be used to replace similar
checks that are used in several other places in this file.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258512 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/double-float-shrink-1.ll