summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-07-11 08:16:26 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-07-11 08:16:26 +0000
commit7d9843fc374296e85769c820ec9c333be1e74c0a (patch)
treeff57cc2fe727883edce2e13171bffb42499a24b0 /lib/Transforms/Scalar
parent569d8f7087bc32e07de98f266c2e0af030d2f033 (diff)
downloadllvm-7d9843fc374296e85769c820ec9c333be1e74c0a.tar.gz
llvm-7d9843fc374296e85769c820ec9c333be1e74c0a.tar.bz2
llvm-7d9843fc374296e85769c820ec9c333be1e74c0a.tar.xz
Document 'mask' in this calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 31525102c7..5864a62677 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -5498,6 +5498,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
case Instruction::Mul:
if (ConstantInt *CI = dyn_cast<ConstantInt>(Op0I->getOperand(1))) {
// a * Cst icmp eq/ne b * Cst --> a & Mask icmp b & Mask
+ // Mask = -1 >> count-trailing-zeros(Cst).
if (!CI->isZero() && !CI->isOne()) {
const APInt &AP = CI->getValue();
ConstantInt *Mask = ConstantInt::get(