[PATCH] D97901: [SystemZ] Test for infinity in testFPKind().
Thomas Preud'homme via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 4 07:42:41 PST 2021
thopre added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:7229
+ case Builtin::BI__builtin_isfinite:
+ Invert = true;
+ LLVM_FALLTHROUGH;
----------------
thopre wrote:
> uweigand wrote:
> > thopre wrote:
> > > jonpa wrote:
> > > > What are these variants all about...?
> > > >
> > > They were introduced in https://reviews.llvm.org/D24483
> > This "invert" logic doesn't look correct. "isfinite" and "isinf" **both** need to return false on NaNs. I think you should just drop the invert logic and use a TDC mask of 0xFC0 (zero, normal, or subnormal) to implement "isfinite".
> My bad, I made the same mistake in https://reviews.llvm.org/D97125. I'll revert for now and will notify this review once I've got it fixed.
I've fixed https://reviews.llvm.org/D97125 and added some isfinite cases.. Thanks @uweigand for pointing the NaN case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97901/new/
https://reviews.llvm.org/D97901
More information about the cfe-commits
mailing list