Controlling FP exceptions

Hello,

I have looked for a way to control (read: read and write) the current
floating point exception status from LLVM IR. This does not seem to be
a new concern, see:

    https://llvm.org/bugs/show_bug.cgi?id=6050
    http://lists.llvm.org/pipermail/llvm-dev/2014-September/076918.html
    http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140929/237997.html

It seems to me there's no way to set or floating point exceptions from
LLVM IR. As for setting them, the best I can think (because of the
optimizer issues mentioned above, simply computing e.g. `fdiv 1.0, 0.0`
doesn't work) would be to register and call an opaque function that does
just that, but that would be quite bad performance-wise.

Even if the optimizer weren't fixed, a simple way (intrinsics?) to set a
FP exception from LLVM IR would be a nice addition, IMHO.

Am I missing something?

Regards

Antoine.