[PATCH] D112025: Intrinsic for checking floating point class

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 13:31:03 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/docs/LangRef.rst:21984-21993
+- "``zero``": yields ``true`` if the value is a zero.
+- "``subnormal``": yields ``true`` if the value is subnormal.
+- "``normal``": yields ``true`` if the value is normal (neither zero, subnormal,
+  infinite, nor NaN).
+- "``finite``": yields ``true`` if the value is finite (not an infinity or NaN).
+- "``inf``": yields ``true`` if the value is an infinity.
+- "``nan``": yields ``true`` if the value is a NAN.
----------------
AMDGPU has a class instruction but the fields are a bit more expansive than this. Specifically, it has positive and negative versions of each of the non-nan fields. e.g. you can check specifically +inf separately from -inf, and the same for the rest.

I guess we could identify and (signbit check), (class %x, !foo)


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