[cfe-dev] Floating-point traps on x86-64

Dallman, John via cfe-dev cfe-dev at lists.llvm.org
Fri Mar 8 03:31:32 PST 2019


Vlad wrote:
> Unfortunately the LLVM x86 backend has at least one bug that causes FPU exceptions on valid FP operations that I know
> of: https://bugs.llvm.org/show_bug.cgi?id=30885. You can work around that bug by using -march=haswell, if you continue
> to hit other exceptions you can file LLVM bugs against them, though I'm not sure if there is anyone actively interested in
> fixing them.

I’ll give it a try, although I don’t hold out much hope.

Cameron wrote:
> This is something we're currently working on. See:
> https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics
> There's still a lot to be done though. Short of this work, I don't think you'll find guarantees of trap-safety in LLVM.

That seems to be saying that trap-safety will be available on those intrinsics when they’re complete.

How about expressions written with variables holding doubles and the ordinary C arithmetic operators? My chances of getting millions of line of code that use those re-written with intrinsics are zero; without that, I’ll be forced to turn off floating-point traps if the -march=haswell tweak does not help.

Thanks,

--
John Dallman

-----------------
Siemens Industry Software Limited is a limited company registered in England and Wales.
Registered number: 3476850.
Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190308/7b7859c5/attachment.html>


More information about the cfe-dev mailing list