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 | 45e127ab20cf0264e49edf78f0a6ab0984447d87 (patch) | |
| tree | 61308f81660149248da795bd7a19ce5a72533f3d /llvm/lib | |
| parent | 914ca2d36834c4f88f5f3664ac74a31b010b21f0 (diff) | |
| download | bcm5719-llvm-45e127ab20cf0264e49edf78f0a6ab0984447d87.tar.gz bcm5719-llvm-45e127ab20cf0264e49edf78f0a6ab0984447d87.zip | |
Document 'mask' in this calculation.
llvm-svn: 53454
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 31525102c71..5864a626777 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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( |

