aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-09-12 19:04:12 +0000
committerHal Finkel <hfinkel@anl.gov>2013-09-12 19:04:12 +0000
commit1e2e3ea584121f523aa4118f383927ed6b73246c (patch)
treec99d510e77bf3fbccdc9b92041c51d1cdf15f4b0 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentba8071ec81eb5c39f8ebb869a18181a1ed25c782 (diff)
downloadllvm-1e2e3ea584121f523aa4118f383927ed6b73246c.zip
llvm-1e2e3ea584121f523aa4118f383927ed6b73246c.tar.gz
llvm-1e2e3ea584121f523aa4118f383927ed6b73246c.tar.bz2
Make the PPC fast-math sqrt expansion safe at 0
In fast-math mode sqrt(x) is calculated using the fast expansion of the reciprocal of the reciprocal sqrt expansion. The reciprocal and reciprocal sqrt expansions use the associated estimate instructions along with some Newton iterations. Unfortunately, as a result, sqrt(0) was being calculated as NaN, which is not correct. Now we explicitly return a result of zero if the input is zero. llvm-svn: 190624
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions