projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
569d8f7
)
Document 'mask' in this calculation.
author
Nick Lewycky
<nicholas@mxc.ca>
Fri, 11 Jul 2008 08:16:26 +0000
(08:16 +0000)
committer
Nick 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
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 31525102c711e093d12b63a5c9714369bd5fb4be..5864a62677778c674ecf46d5ecc06a452ecb71c0 100644
(file)
--- 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(