[PATCH] D67999: Fix `compiler_rt_logbf_test.c` test failure for Builtins-i386-darwin test suite.

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 08:49:21 PDT 2019


compnerd added a comment.

@rupprecht as much as I really want to agree with you in that this isn't needed to match the behaviour of the system's libm, the problem is that `__builtin_logb`  **can** be misused to implement a library.  So, really, I would really urge Apple to consider maintaining similarity across all the platforms for the builtins - there is no official guarantee that is made on the behaviour of the builtin operations, so If there is a strong reason to have the divergence, please do share that, and I think that we can probably accommodate that with the small tweak that @rupprecht points out:

  if (x != x) {
  #if defined(__APPLE__) && defined(__i386__)
    return fromRep(~signBit & rep);
  #else
    return x;
  #endif
  } else if ((rep & signBit) == 0) {


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D67999





More information about the llvm-commits mailing list