[ValueTracking] Improve ComputeNumSignBits for SRem.
The result will have the same sign as the dividend unless the result is 0. The magnitude of the result will always be less than or equal to the dividend. So the result will have at least as many sign bits as the dividend. Previously we would do this if the divisor was a positive constant, but that isn't required. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D97170
Loading
Please sign in to comment