[PATCH] D149112: InstCombine: Try to turn is.fpclass sign checks to fcmp with 0
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 08:36:24 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:826
+
/// \returns true if the test performed by llvm.is.fpclass(x, \p Mask) is
+/// equivalent to fcmp o__ x, 0.0 with the floating-point environment assumed
----------------
foad wrote:
> "returns true" needs updating.
ping
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:848-851
+ case fcPosSubnormal | fcPosNormal | fcPosInf:
+ if (inputDenormalIsIEEE(F, Ty))
+ return FCmpInst::FCMP_OGT;
+ break;
----------------
arsenm wrote:
> foad wrote:
> > Any reason not to add the DAZ counterpart of this case, i.e. `fcPosNormal | fcPosInf`? And the same for OLT.
> It is already handled, this is called twice. The second time with the inverted mask (so actually we have some redundant cases here). I could either expand all the cases here and stop doing the invert trick, or trim the redundant cases
Yeah, now it looks odd that the two FMP_ONE cases are missing.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149112/new/
https://reviews.llvm.org/D149112
More information about the llvm-commits
mailing list