[PATCH] D147932: ValueTracking: Implement computeKnownFPClass for various rounding intrinsics
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 01:54:18 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4873-4874
FPClassTest InterestedSrcs = InterestedClasses;
if (InterestedClasses & fcZero)
- InterestedClasses |= fcNormal | fcSubnormal;
+ InterestedSrcs |= fcNormal | fcSubnormal;
----------------
arsenm wrote:
> foad wrote:
> > This doesn't seem to match the code any more? I guess you want:
> > ```
> > if (InterestedClass & fcPosFinite)
> > InterestedSrcs |= fcPosFinite;
> > ```
> > etc.
> >
> > (Strictly I think you ought to do this for fcNan too, throughout computeKnownFPClass, in case InterestedClasses only contains one of fcSNan or fcQNan.)
> I don't see the point of enabling more bits here, not sure why I put this here in the first place
The point is that if you're only interested in whether the result is (say) negzero, you can't prove that unless you know the source is none of negzero|negsubnormal|negfinite. Isn't that the way InterestedClasses is supposed to work?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147932/new/
https://reviews.llvm.org/D147932
More information about the llvm-commits
mailing list