summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-09-12 23:57:55 +0000
committerHal Finkel <hfinkel@anl.gov>2013-09-12 23:57:55 +0000
commitce4ad40100573008d013d2b9d3104c218ea34c2a (patch)
tree886b50f66d2a35221ce7881b641ff60d6bdb55c7 /lib/CodeGen/CGExprConstant.cpp
parentb2956ba4f79fbe0b38bd5200ad3ed515fdbfacb3 (diff)
downloadclang-ce4ad40100573008d013d2b9d3104c218ea34c2a.tar.gz
clang-ce4ad40100573008d013d2b9d3104c218ea34c2a.tar.bz2
clang-ce4ad40100573008d013d2b9d3104c218ea34c2a.tar.xz
Restore the sqrt -> llvm.sqrt mapping in fast-math mode
This restores the sqrt -> llvm.sqrt mapping, but only in fast-math mode (specifically, when the UnsafeFPMath or NoNaNsFPMath CodeGen options are enabled). The @llvm.sqrt* intrinsics have slightly different semantics from the libm call, specifically, they are undefined when given a non-zero negative number (the libm calls will always return NaN for any negative number). This mapping was removed in r100613, and replaced with a TODO, but at that time the fast-math flags were not yet implemented. Now that we have these, restoring this mapping is important because it will enable autovectorization of sqrt calls in loops (at least in fast-math mode). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions