[llvm-commits] [llvm] r53454 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Jul 11 01:16:26 PDT 2008
Author: nicholas
Date: Fri Jul 11 03:16:26 2008
New Revision: 53454
URL: http://llvm.org/viewvc/llvm-project?rev=53454&view=rev
Log:
Document 'mask' in this calculation.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=53454&r1=53453&r2=53454&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri Jul 11 03:16:26 2008
@@ -5498,6 +5498,7 @@
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(
More information about the llvm-commits
mailing list