[cfe-dev] FE_INEXACT being set for an exact conversion from float to unsigned long long

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 18 18:14:35 PDT 2017


On 18 April 2017 at 15:54, Michael Clark via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> The only way towards completing a milestone is via fixing a number of small issues along
> the way…

I believe there's more to it than that. None of LLVM's optimizations
are aware of this extra side-channel of information (with possible
exceptions like avoiding speculating fdiv because of unavoidable
exceptions).

>From what I remember, the real proposal is to replace all
floating-point IR with intrinsics when FENV_ACCESS is on, which the
optimizers by default won't have a clue about and will treat
conservatively (essentially like they're modifying external memory).

So be careful with drawing conclusions from small snippets; you're
probably not seeing the full range of LLVM's behaviour.

Cheers.

Tim.



More information about the cfe-dev mailing list