Skip to content

Commit f4de7ed

Browse files
committed
[TargetLowering][NFC] prepareUREMEqFold(): fixup comment
The comment initially matched the code, but the code was incorrect and was fixed after the initial revert back back when it was introduced, but the comment was never updated. llvm-svn: 368701
1 parent 1896a31 commit f4de7ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4866,7 +4866,7 @@ TargetLowering::prepareUREMEqFold(EVT SETCCVT, SDValue REMNode,
48664866
// fold (seteq/ne (urem N, D), 0) -> (setule/ugt (rotr (mul N, P), K), Q)
48674867
// - D must be constant, with D = D0 * 2^K where D0 is odd
48684868
// - P is the multiplicative inverse of D0 modulo 2^W
4869-
// - Q = floor((2^W - 1) / D0)
4869+
// - Q = floor(((2^W) - 1) / D)
48704870
// where W is the width of the common type of N and D.
48714871
assert((Cond == ISD::SETEQ || Cond == ISD::SETNE) &&
48724872
"Only applicable for (in)equality comparisons.");

0 commit comments

Comments
 (0)