[llvm-dev] PR43374 - when should comparing NaN values raise a floating point exception?

Ulrich Weigand via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 10 09:38:48 PDT 2019

Kevin Neal <Kevin.Neal at sas.com> wrote on 01.10.2019 16:25:55:

> Ulrich offered to do it instead since I expect he can get it done
> much faster than me. Instead I'm doing SIToFP and UIToFP. Ulrich
> said he wasn't going to be able to get to it for a couple of weeks,
> but that was a week or two ago.

Sorry for the late reply, I've been traveling ...

Yes, I'll start looking into strict FP comparisons.  One issue is
indeed that we'll need to support both signaling and non-signaling

My prefered solution would probably be to have two sets of strict
intrinsics, one for signaling compares and one for non-signaling
ones, implement those in the back-ends using the appropriate set
of signaling vs. non-signaling instructions, and then leave it to
the front-end to chose which of the two to use when, in order to
implement the semantics mandated by the language standard.

(Note that for the default LLVM compare IR instructions, those
-like all floating-point instructions- are considered to only
be used in contexts where FP exceptions are ignored, and therefore
the signaling vs. non-signaling distinction is meaningless for
those IR instructions.)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191010/ca44fb22/attachment-0001.html>

More information about the llvm-dev mailing list