Document 'mask' in this calculation.
authorNick Lewycky <nicholas@mxc.ca>
Fri, 11 Jul 2008 08:16:26 +0000 (08:16 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 11 Jul 2008 08:16:26 +0000 (08:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53454 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 31525102c711e093d12b63a5c9714369bd5fb4be..5864a62677778c674ecf46d5ecc06a452ecb71c0 100644 (file)
@@ -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(