I barely understand what this does, but try to
handle the last case required to delete cannotBeOrderedLessThanZeroImpl.
Also improve by following fdiv handling for nans and identical operand case.
Details
Diff Detail
Event Timeline
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4746 | 754-2019 section 6.1 says "remainder(subnormal, Inf) signals underflow." Does that mean it produces a nan or a zero? I'm guessing zero, but don't hold me to that. Anybody? Section 7.2 agrees with your comment and code here. |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4726–4727 | Yes |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4743–4760 | "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 |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4743–4760 |
Good point. I was looking at "man remainder" instead of "man fmod". |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4699 | No, the signs cancel and the divide is exact. The only case to worry about would be frem -0, -0 but that's nan. |
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
4699 | That seems to contradict "the result has the same sign as x". Surely that implies that -1 frem -1 is -0. |
fcPosZero seems wrong. Wouldn't the result be -0 if X is -ve?