]> granicus.if.org Git - llvm/commit
[LICM] Hoist fp division from the loops and replace by a reciprocal
authorHal Finkel <hfinkel@anl.gov>
Tue, 11 Apr 2017 02:22:54 +0000 (02:22 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 11 Apr 2017 02:22:54 +0000 (02:22 +0000)
commitbf06691a187578071ed1cd5ffef219e9feef7d4b
tree86c377e85450a64be7467144f9cc77987331586f
parent7ddaf9fa1f1af01b8955fa42a773f988b82199ce
[LICM] Hoist fp division from the loops and replace by a reciprocal

When allowed, we can hoist a division out of a loop in favor of a
multiplication by the reciprocal. Fixes PR32157.

Patch by vit9696!

Differential Revision: https://reviews.llvm.org/D30819

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299911 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LICM.cpp
test/Transforms/LICM/hoist-fast-fdiv.ll [new file with mode: 0644]