[PATCH] D84835: [APFloat] Fix incorrect fptrunc rouning when from semantics exp lower than minimal exp of target semantics

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 03:40:34 PDT 2020


uweigand added a comment.

I'm not sure what specific problem you're trying to solve here, but this change in itself looks incorrect.

The computation done here follows the same logic that would occur later in normalize().  `exponentChange` is (correctly) set to `toSemantics.minExponent - exponent` here so that the subsequent `exponent += exponentChange` will then set `exponent` to `toSemantics.minExponent`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84835



More information about the llvm-commits mailing list