[PATCH] D148674: ValueTracking: Handle frem in computeKnownFPClass

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 01:06:30 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4686
     if (KnownLHS.isKnownNever(fcNegative) && KnownRHS.isKnownNever(fcNegative))
       Known.knownNot(fcNegative);
 
----------------
arsenm wrote:
> foad wrote:
> > This part only works for FDiv. I can't think of anything useful you can prove about the sign of FRem.
> "the result has the same sign as x and magnitude less than the magnitude of y."
> 
> So actually this is more conservative than required for free 
> "the result has the same sign as x and magnitude less than the magnitude of y."
Good point. I was looking at "man remainder" instead of "man fmod".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148674/new/

https://reviews.llvm.org/D148674



More information about the llvm-commits mailing list