diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-08-13 14:57:08 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2019-08-13 14:57:08 +0000 |
commit | f4de7eda4a7098ea3a5d60c56af8ab8e9d28ff08 (patch) | |
tree | bcf35a3ced5d62eda36213d484d52bf0b2dc80fe /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 1896a31dd33147d6bd798b5b209ec74e50b27783 (diff) | |
download | bcm5719-llvm-f4de7eda4a7098ea3a5d60c56af8ab8e9d28ff08.tar.gz bcm5719-llvm-f4de7eda4a7098ea3a5d60c56af8ab8e9d28ff08.zip |
[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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index f373eee469b..eb39c2523e1 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -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."); |