[PATCH] D72685: [PowerPC] Exploit VSX rounding instrs for rint

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 02:03:15 PST 2020


uweigand added a comment.

I believe the conversion of SNaN to QNaN is expected here.  Note that the (current) C standard does not mention support signaling NaNs at all, and does not really ever mention them.  This is planned to be fixed with the upcoming C2x version, which explicitly states that "rint" is supposed to implement the IEEE-754 "roundToIntegerExact" function.  And that function, like most general functions defined by IEEE-754, is indeed defined to return a QNaN when the input is a SNaN.

So the current behavior already implements C2x correctly, and is a valid extension to C11, so this should be fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72685





More information about the llvm-commits mailing list