diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-07-11 08:16:26 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-07-11 08:16:26 +0000 |
commit | 7d9843fc374296e85769c820ec9c333be1e74c0a (patch) | |
tree | ff57cc2fe727883edce2e13171bffb42499a24b0 /lib/Transforms/Scalar | |
parent | 569d8f7087bc32e07de98f266c2e0af030d2f033 (diff) | |
download | llvm-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.cpp | 1 |
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( |