[PATCH] D60021: InstSimplify: Fold round intrinsics from sitofp

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 07:53:18 PDT 2019


arsenm added a comment.

In D60021#1449807 <https://reviews.llvm.org/D60021#1449807>, @lebedev.ri wrote:

> I'm still a bit unsure about this. I could be simply confused though.
>  I agree that it is fine for those integral types when `iN.SINT_MAX() <= float.MAX() && iN.SINT_MIN() >= float.MIN()`.
>  That means, we are good for up to i128 for `float` / i1024 for `double` or so.
>  But what about larger types? I don't think `[su]itofp` clamps?


"If the value cannot be exactly represented, it is rounded using the default rounding mode."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60021/new/

https://reviews.llvm.org/D60021





More information about the llvm-commits mailing list