[PATCH] D112025: Intrinsic for checking floating point class
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 22 00:02:59 PDT 2021
sepavloff 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.
----------------
arsenm wrote:
> 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)
Updated the patch to better represent targets with such instructions.
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