[PATCH] D47851: [LangRef] fptosi and fptoui return poison on overflow.
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 7 06:10:32 PDT 2018
nlopes accepted this revision.
nlopes added a comment.
This revision is now accepted and ready to land.
LGTM.
The C++ standard defines this as UB: http://eel.is/c++draft/conv.fpint#1
"A prvalue of a floating-point type can be converted to a prvalue of an integer type. The conversion truncates; that is, the fractional part is discarded.
The behavior is undefined if the truncated value cannot be represented in the destination type."
Repository:
rL LLVM
https://reviews.llvm.org/D47851
More information about the llvm-commits
mailing list