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

Steve Canon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 11:19:38 PDT 2019


scanon added a comment.

Backing up what everyone says here: `logb` doesn't define the sign of NaN results, and 754 explicitly says not to interpret the sign of NaN as having any meaning except in the `copySign`, `absoluteValue`, `negate`, and `copy` operations. (That's a semantically meaningless statement, since those operations do not exist in a vacuum, which means that you can't actually say anything about the sign of NaN from a formal perspective, but, well, it's the standard we have.)

Matching the libm behavior is nice, but normally outside the scope of compiler-rt w.r.t. NaN encodings (sign, payload, and signaling status--since compiler-rt is meant for use in soft-float contexts, it doesn't have a meaningful notion of signaling NaNs, and generally doesn't even try. We could pin that down more for hybrid situations, but that's a much larger change.)

There's nothing *wrong* with making this match, but we should also relax the test to not expect that it do so.


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