This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b5fe9c42d94: [clang][Interp] Check floating results for
NaNs (authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D156506?vs=
tbaeder added a comment.
I thought this review wasn't clear at all on what's supposed to happen but
since https://reviews.llvm.org/D157072 is going nowhere, I'll just push this
one in the next few days.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org
jcranmer-intel added inline comments.
Comment at: clang/lib/AST/Interp/Interp.cpp:503
+ // If during the evaluation of an expression, the result is not
+ // mathematically defined [...], the behavior is undefined.
+ // FIXME: C++ rules require us to not conform to IEEE 754
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/Interp.cpp:503
+ // If during the evaluation of an expression, the result is not
+ // mathematically defined [...], the behavior is undefined.
+ // FIXME: C++ rules require us to not conform to IEEE 754 here.
jcranmer-intel added a comment.
You definitely don't want these rules to apply to all qNaNs. It's when an input
operand is an sNaN for many operations. Note that the result of an operation
with an sNaN as input (and FP result type) is a qNaN output, and the only times
that you get an sNaN outpu
aaron.ballman accepted this revision.
aaron.ballman added a subscriber: jcranmer-intel.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
> This does not handle the builtin functions yet, since I'm not sure if I
> should check for all nans or only signaling ones yet.
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This does not handle the builtin functions yet, since