[llvm-bugs] [Bug 17686] static_casting to a large unsigned long long from a double causes an FPE
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 4 03:31:09 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=17686
Simon Pilgrim <llvm-dev at redking.me.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Fixed By Commit(s)| |348251
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #10 from Simon Pilgrim <llvm-dev at redking.me.uk> ---
(In reply to Paul.Zimmermann from comment #8)
> I suggest to change the code as follows:
>
> result = select (x < 0x8000000000000000), fp_to_sint(x), 0x8000000000000000
> + fp_to_sint(x - 0x8000000000000000)
>
> This should not raise any exception.
Fixed by rL348251 which added a TargetLowering::shouldUseStrictFP_TO_INT
override to allow the opt-in use of the above code.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181204/0e77e989/attachment.html>
More information about the llvm-bugs
mailing list