[PATCH] D63294: [Analysis] enhance FP library function prototype checking to match types with name suffix

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 12:36:37 PDT 2019


spatel added a comment.

In D63294#1550775 <https://reviews.llvm.org/D63294#1550775>, @efriedma wrote:

> Not sure what you're talking about with clang; it does the right thing, as far as I can tell.


When compiling for AVR, clang will turn the libcall that uses doubles in C source into:

  %call = call addrspace(1) float @sqrt(float 0.000000e+00) #2

Should clang translate that call into "sqrtf" to be more accurate? Similarly, if the source was written with "sqrtl" and "long double", we'd get this IR out of clang:

  %call = call addrspace(1) float @sqrtl(float 0.000000e+00) #2


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63294/new/

https://reviews.llvm.org/D63294





More information about the llvm-commits mailing list