[LLVMdev] Inlining sqrt library function in X86
preston.gurd at intel.com
Tue May 21 14:03:00 PDT 2013
Thanks for the fix!
However, there still seems to be a problem in that if you pass –ffast-math to clang, then clang changes “sqrt” to be “__sqrt_finite”. LLVM cannot then change the function call into an x86 sqrt instruction, even with –fno-math-errno set.
Can you suggest where I might look in the clang code to find the place where “sqrt” is converted to “__sqrt_finite” and/or the best way to solve this problem?
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chandler Carruth
Sent: Saturday, May 18, 2013 4:48 PM
To: Nadav Rotem
Cc: LLVMdev (LLVMdev at cs.uiuc.edu)
Subject: Re: [LLVMdev] Inlining sqrt library function in X86
On Sat, May 18, 2013 at 5:18 PM, Nadav Rotem <nrotem at apple.com<mailto:nrotem at apple.com>> wrote:
Does fast-math imply no-math-errno ?
Yes, in both GCC and Clang. Clang does have some annoying logic bugs surrounding this flag though. For example, setting -fno-fast-math would imply no-math-errno, overriding the Linux default. Quite weird. I've cleaned this up some and added more clear tests in r182203.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev