[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)
commitb63ed9154961eb17e2eb92f3184fbd26acefb2e1
tree28182558e59d5debb15dc16cd2d6ec7ba3d1f596
parentcef9e52736f9dd886a22696d26a86121d31e6cf2
[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

llvm-svn: 299911
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/hoist-fast-fdiv.ll [new file with mode: 0644]