[PATCH] D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 15:11:05 PDT 2019
cameron.mcinally added a comment.
In D63782#1559923 <https://reviews.llvm.org/D63782#1559923>, @efriedma wrote:
> > Unless I'm misunderstanding, we should be leaving the constrained converts alone until a hardware instruction is produced.
>
> We have to define the semantics; I mean, I guess we could say "If the value cannot fit in the destination type, the result is computed in a target-specific way", but we'd have to state it explicitly. And it's sort of awkward.
I think IEEE-754 does define this:
When a numeric operand would convert to an integer outside the range of the destination format, the invalid operation exception shall be signaled if this situation cannot otherwise be indicated.
There's some language that follows about IEEE specific converts and rounding mode too.
Let me be clear that this is in one of my blind spots wrt IEEE-754, so take my opinions lightly. And it probably goes without saying that I haven't thought through the edge cases...
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63782/new/
https://reviews.llvm.org/D63782
More information about the llvm-commits
mailing list