[PATCH] D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 15:49:28 PDT 2019
hfinkel added a comment.
In D63782#1559923 <https://reviews.llvm.org/D63782#1559923>, @efriedma wrote:
> > Is this a general comment or referring to a change in Kevin's patch?
>
> It's a question about the semantics of the proposed llvm.experimental.constrained.fptosi/llvm.experimental.constrained.fptoui. Specifically, what does it do when the result is larger than the largest integer representable in the destination format? LangRef for fptoui/fptosi says "If the value cannot fit in ty2, the result is a poison value."
>
> > 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.
And we're generally avoided giving target-independent LLVM operations target-defined semantics, and I prefer that we continue to avoid doing that.
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