mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Teach getSmallConstantTripMultiple about Shl operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -243,6 +243,11 @@ unsigned Loop::getSmallConstantTripMultiple() const {
|
||||
case BinaryOperator::Mul:
|
||||
Result = dyn_cast<ConstantInt>(BO->getOperand(1));
|
||||
break;
|
||||
case BinaryOperator::Shl:
|
||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1)))
|
||||
if (CI->getValue().getActiveBits() <= 5)
|
||||
return 1u << CI->getZExtValue();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user