Sanjay Patel dc18ebc4b1 Shrinkify libcalls: use float versions of double libm functions with fast-math (bug 17850)
When a call to a double-precision libm function has fast-math semantics 
(via function attribute for now because there is no IR-level FMF on calls), 
we can avoid fpext/fptrunc operations and use the float version of the call
if the input and output are both float.

We already do this optimization using a command-line option; this patch just
adds the ability for fast-math to use the existing functionality.

I moved the cl::opt from InstructionCombining into SimplifyLibCalls because
it's only ever used internally to that class.

Modified the existing test cases to use the unsafe-fp-math attribute rather
than repeating all tests.

This patch should solve: http://llvm.org/bugs/show_bug.cgi?id=17850

Differential Revision: http://reviews.llvm.org/D5893



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220390 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 15:29:23 +00:00
..
2013-08-28 23:04:41 +00:00
2012-02-29 01:53:13 +00:00
2014-06-02 21:23:54 +00:00
2013-07-09 07:50:59 +00:00
2013-08-28 23:04:41 +00:00
2014-05-27 16:54:33 +00:00
2013-11-15 01:34:59 +00:00
2014-01-22 22:32:58 +00:00
2014-03-06 05:32:52 +00:00
2013-07-09 22:01:22 +00:00
2014-02-26 19:51:08 +00:00
2013-02-16 23:41:36 +00:00
2014-10-21 23:00:20 +00:00
2014-10-21 23:00:20 +00:00
2014-07-09 17:49:58 +00:00
2014-02-26 22:29:11 +00:00
2014-06-02 22:01:04 +00:00
2014-06-02 22:01:04 +00:00
2014-03-29 10:18:08 +00:00
2014-02-26 22:29:11 +00:00
2013-08-28 23:04:41 +00:00
2013-08-28 23:04:41 +00:00
2013-03-28 19:34:14 +00:00
2014-06-02 22:01:04 +00:00

This directory contains test cases for the instcombine transformation.  The
dated tests are actual bug tests, whereas the named tests are used to test
for features that the this pass should be capable of performing.