mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-13 15:37:24 +00:00
Document 'mask' in this calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
569d8f7087
commit
7d9843fc37
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user