[PATCH] D112025: Intrinsic for checking floating point class
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 21:48:12 PDT 2022
sepavloff added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7387
+ // Recognize unsupported values as NaNs for compatibility with glibc.
+ // In them (exp(V)!=0) == int_bit.
+ SDValue ExpBits = DAG.getNode(ISD::AND, DL, IntVT, AbsV, ExpMaskV);
----------------
thopre wrote:
> Does `them` refer to unsupported values? So an exponent of 0 and a int_bit set is a supported value. But the equality check on line 7392 will return true for that case so I'm a bit confused.
You are right, the comment describes supported values. Thank you for the catch.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7396
+ } else if (PartialCheck == fcQNan) {
+ // isquiet(V) ==> unsigned(V) >= (unsigned(Inf) | quiet_bit)
+ PartialRes =
----------------
thopre wrote:
>
Here you are also right. Fixed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112025/new/
https://reviews.llvm.org/D112025
More information about the llvm-commits
mailing list