llvm-6502/lib/Transforms/InstCombine
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
..
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 Assert that ValueHandleBase::ValueIsRAUWd doesn't change the tracked Value type. 2014-10-23 04:08:42 +00:00
InstCombineCasts.cpp Handle sqrt() shrinking in SimplifyLibCalls like any other call 2014-10-23 21:52:45 +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