[PATCH] D42668: [Analysis] Disable log/log2/log10 finite lib calls on Android with -ffast-math.

Stephen Hines via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 01:04:53 PST 2018


srhines added inline comments.


================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:413
   // The following functions are available on at least Linux:
   if (!T.isOSLinux()) {
     TLI.setUnavailable(LibFunc_dunder_strdup);
----------------
efriedma wrote:
> Instead of going through this process repeatedly, could we just change this line to "if (!T.isOSLinux() || T.isAndroid())"?
I agree that we should just be nuking all of the *_finite() functions, but many of these other functions are indeed available on Android, so we can't just change this single guard here.

Chih-hung, we should follow up with the bionic folks to ensure that these functions are available for all NDK platforms too. In cases like fseeko64/etc., where it only appears in API level 24, it also wouldn't be correct to lower to any of these libcalls for a target API level < 24.


https://reviews.llvm.org/D42668





More information about the llvm-commits mailing list