[LLVMdev] Optimization of sqrt() with invalid argument
Stephen Canon
scanon at apple.com
Fri Sep 26 09:09:27 PDT 2014
> On Sep 26, 2014, at 11:59 AM, Tim Northover <t.p.northover at gmail.com> wrote:
>
>> I know it's part of test-suite/external, but this constant fold code has
>> been around 5+ years. Was the bug lying dormant all this time, only visible
>> on PPC, or something else?
>
> My guess would be that people don't tend to run with -ffast-math (it's
> got a reputation for breaking code, even ignoring this particular
> issue). Without that, from what I can see the issue won't arise.
If this can really only happen under fast-math, I take back what I said entirely. IIRC, NaNs are explicitly not supported in that mode, so all bets are off. Zero is a perfectly reasonable result.
– Steve
More information about the llvm-dev
mailing list