Commit f4de7eda authored by Roman Lebedev's avatar Roman Lebedev
Browse files

[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
parent 1896a31d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4866,7 +4866,7 @@ TargetLowering::prepareUREMEqFold(EVT SETCCVT, SDValue REMNode,
  // fold (seteq/ne (urem N, D), 0) -> (setule/ugt (rotr (mul N, P), K), Q)
  // - D must be constant, with D = D0 * 2^K where D0 is odd
  // - P is the multiplicative inverse of D0 modulo 2^W
  // - Q = floor((2^W - 1) / D0)
  // - Q = floor(((2^W) - 1) / D)
  // where W is the width of the common type of N and D.
  assert((Cond == ISD::SETEQ || Cond == ISD::SETNE) &&
         "Only applicable for (in)equality comparisons.");