[PATCH] D112025: Intrinsic for checking floating point class

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 04:35:39 PDT 2022


thopre 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);
----------------
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.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7396
+    } else if (PartialCheck == fcQNan) {
+      // isquiet(V) ==> unsigned(V) >= (unsigned(Inf) | quiet_bit)
+      PartialRes =
----------------



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