llvm/lib
Sanjay Patel d2153694e0 Handle sqrt() shrinking in SimplifyLibCalls like any other call
This patch removes a chunk of special case logic for folding 
(float)sqrt((double)x) -> sqrtf(x)
in InstCombineCasts and handles it in the mainstream path of SimplifyLibCalls.

No functional change intended, but I loosened the restriction on the existing
sqrt testcases to allow for this optimization even without unsafe-fp-math because
that's the existing behavior.

I also added a missing test case for not shrinking the llvm.sqrt.f64 intrinsic
in case the result is used as a double.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220514 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-23 21:52:45 +00:00
..
Analysis [InstSimplify] Support constant folding to vector of pointers 2014-10-22 12:18:48 +00:00
AsmParser Make CallingConv::ID an alias of "unsigned". 2014-09-10 18:00:17 +00:00
Bitcode clang-format two code snippets to make the next patch easy to read. 2014-10-23 15:20:05 +00:00
CodeGen DebugInfo: Simplify/tidy/correct global variable decl/def emission handling. 2014-10-23 19:12:43 +00:00
DebugInfo [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump. 2014-10-23 04:08:34 +00:00
ExecutionEngine [MCJIT] Make repeat calls to MCJIT::getPointerToFunction for declarations safe. 2014-10-22 23:18:42 +00:00
IR Revert "Don't count inreg params when mangling fastcall functions" 2014-10-23 17:50:42 +00:00
IRReader Pass a && to getLazyBitcodeModule. 2014-09-03 17:31:46 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Merge alignment of common GlobalValue. 2014-09-09 17:48:18 +00:00
LTO LTO: Document the Boolean argument from r218784 2014-10-02 21:11:04 +00:00
MC Attempt to fix the build after r220439 2014-10-22 22:46:05 +00:00
Object Update llvm-objdump’s Mach-O symbolizer code for Objective-C references. 2014-10-23 19:37:31 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData Reduce double set lookups. NFC. 2014-10-10 15:32:50 +00:00
Support Modernize doxygen comments in Support/Dwarf.h 2014-10-23 04:08:38 +00:00
TableGen Eliminate some deep std::vector copies. NFC. 2014-10-03 18:33:16 +00:00
Target Do not emit intermediate register for zero FP immediate 2014-10-23 15:31:50 +00:00
Transforms Handle sqrt() shrinking in SimplifyLibCalls like any other call 2014-10-23 21:52:45 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00