[PATCH] D47807: Make uitofp and sitofp defined on overflow.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 6 15:38:51 PDT 2018
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
I agree that this is a good change, so LGTM. But we should wait a bit for more comments in case anyone else sees potential downside.
================
Comment at: docs/LangRef.rst:3289
type. CST must be of scalar or vector integer type. Both CST and TYPE must
- be scalars, or vectors of the same number of elements. If the value
- won't fit in the floating-point type, the results are undefined.
+ be scalars, or vectors of the same number of elements.
``sitofp (CST to TYPE)``
----------------
Nit - I'd find it easier to read if we rewrote as:
```
``uitofp (CONSTANT to TYPE)``
Convert an unsigned integer constant to floating-point.
CONSTANT must be a scalar or vector integer type.
TYPE must be a scalar or vector floating-point type.
If CONSTANT is a vector, TYPE must be a vector with the same number of elements.
```
Repository:
rL LLVM
https://reviews.llvm.org/D47807
More information about the llvm-commits
mailing list