Make uitofp and sitofp defined on overflow.
authorEli Friedman <efriedma@codeaurora.org>
Thu, 14 Jun 2018 22:58:48 +0000 (22:58 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Thu, 14 Jun 2018 22:58:48 +0000 (22:58 +0000)
commit3f1ce093ea4dd86c50ececa1da85edb78b904e72
treef50336563a7d7fe394368d5f5e555e7c3c099e46
parent9afe1fa7e295d31ecdaed5ab33bf3e5bbb804f40
Make uitofp and sitofp defined on overflow.

IEEE 754 defines the expected result on overflow. As far as I know,
hardware implementations (of f16), and compiler-rt (__floatuntisf)
correctly return +-Inf on overflow. And I can't think of any useful
transform that would take advantage of overflow being undefined here.

Differential Revision: https://reviews.llvm.org/D47807

llvm-svn: 334777
llvm/docs/LangRef.rst
llvm/lib/IR/ConstantFold.cpp
llvm/test/Transforms/ConstProp/cast.ll