[PATCH] D59070: [builtins] Divide shouldn't underflow if rounded result would be normal.

Steve Canon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 16:37:40 PDT 2019


scanon requested changes to this revision.
scanon added a comment.
This revision now requires changes to proceed.

In the parlance of IEEE 754, there are two ways to "detect tininess": "before rounding" and "after rounding". The standard doesn't define how to flush subnormal results, but in practice most HW flushes results that are "tiny". The existing code flushes as though tininess is detected before rounding. This proposed update flushes as though tininess were detected after rounding.

Of mainstream platforms supported by LLVM, only x86 detects tininess after rounding, and these functions should approximately never be used on x86, because HW floating-point is always available there. So I would lean towards keeping the existing behavior, so that e.g. soft-float and hard-float ARM match their behavior.


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D59070





More information about the llvm-commits mailing list