1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib/Transforms/InstCombine
Sanjay Patel 2e19fa34bb 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

llvm-svn: 220390
2014-10-22 15:29:23 +00:00
..
CMakeLists.txt
InstCombine.h InstCombine: Optimize icmp eq/ne (shl Const2, A), Const1 2014-10-19 08:23:08 +00:00
InstCombineAddSub.cpp InstCombine: (sub (or A B) (xor A B)) --> (and A B) 2014-10-19 08:32:32 +00:00
InstCombineAndOrXor.cpp InstCombine: Turn (x != 0 & x <u C) into the canonical range check form (x-1 <u C-1) 2014-10-12 14:02:34 +00:00
InstCombineCalls.cpp Add minnum / maxnum intrinsics 2014-10-21 23:00:20 +00:00
InstCombineCasts.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
InstCombineCompares.cpp InstCombine: Simplify FoldICmpCstShrCst 2014-10-21 19:51:55 +00:00
InstCombineLoadStoreAlloca.cpp Revert "Teach the load analysis to allow finding available values which require" (r220277) 2014-10-21 23:49:52 +00:00
InstCombineMulDivRem.cpp InstCombine: Don't miscompile X % ((Pow2 << A) >>u B) 2014-10-14 20:28:40 +00:00
InstCombinePHI.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
InstCombineSelect.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
InstCombineShifts.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
InstCombineSimplifyDemanded.cpp Add additional patterns for @llvm.assume in ValueTracking 2014-09-07 19:21:07 +00:00
InstCombineVectorOps.cpp fixed some typos 2014-07-07 22:13:58 +00:00
InstCombineWorklist.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
InstructionCombining.cpp Shrinkify libcalls: use float versions of double libm functions with fast-math (bug 17850) 2014-10-22 15:29:23 +00:00
LLVMBuild.txt
Makefile