Weiming Zhao cc87069c31 [SimplifyLibCalls] Optimization for pow(x, n) where n is some constant
Summary:
    In order to avoid calling pow function we generate repeated fmul when n is a
    positive or negative whole number.
    
    For each exponent we pre-compute Addition Chains in order to minimize the no.
    of fmuls.
    Refer: http://wwwhomes.uni-bielefeld.de/achim/addition_chain.html
    
    We pre-compute addition chains for exponents upto 32 (which results in a max of
    7 fmuls).

    For eg:
    4 = 2+2
    5 = 2+3
    6 = 3+3 and so on
    
    Hence,
    pow(x, 4.0) ==> y = fmul x, x
                    x = fmul y, y
                    ret x

    For negative exponents, we simply compute the reciprocal of the final result.
    
    Note: This transformation is only enabled under fast-math.
    
    Patch by Mandeep Singh Grang <mgrang@codeaurora.org>

Reviewers: weimingz, majnemer, escha, davide, scanon, joerg

Subscribers: probinson, escha, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254776 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-04 22:00:47 +00:00
..
2014-06-02 21:23:54 +00:00
2014-03-06 05:32:52 +00:00
2014-11-04 05:17:58 +00:00
2014-10-21 23:00:20 +00:00
2015-01-06 23:00:33 +00:00
2015-09-08 17:58:22 +00:00
2015-06-05 18:04:42 +00:00
2015-08-11 21:33:55 +00:00
2015-08-28 19:09:31 +00:00
2014-06-02 22:01:04 +00:00
2014-06-02 22:01:04 +00:00
2015-05-11 05:33:27 +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.