mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Quiet warnings on the persephone tester
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17821 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e529e4b3c
commit
50e60c7026
@ -329,10 +329,10 @@ static inline Value *dyn_castFoldableMul(Value *V, ConstantInt *&CST) {
|
|||||||
if (V->hasOneUse() && V->getType()->isInteger())
|
if (V->hasOneUse() && V->getType()->isInteger())
|
||||||
if (Instruction *I = dyn_cast<Instruction>(V)) {
|
if (Instruction *I = dyn_cast<Instruction>(V)) {
|
||||||
if (I->getOpcode() == Instruction::Mul)
|
if (I->getOpcode() == Instruction::Mul)
|
||||||
if (CST = dyn_cast<ConstantInt>(I->getOperand(1)))
|
if ((CST = dyn_cast<ConstantInt>(I->getOperand(1))))
|
||||||
return I->getOperand(0);
|
return I->getOperand(0);
|
||||||
if (I->getOpcode() == Instruction::Shl)
|
if (I->getOpcode() == Instruction::Shl)
|
||||||
if (CST = dyn_cast<ConstantInt>(I->getOperand(1))) {
|
if ((CST = dyn_cast<ConstantInt>(I->getOperand(1)))) {
|
||||||
// The multiplier is really 1 << CST.
|
// The multiplier is really 1 << CST.
|
||||||
Constant *One = ConstantInt::get(V->getType(), 1);
|
Constant *One = ConstantInt::get(V->getType(), 1);
|
||||||
CST = cast<ConstantInt>(ConstantExpr::getShl(One, CST));
|
CST = cast<ConstantInt>(ConstantExpr::getShl(One, CST));
|
||||||
|
Loading…
Reference in New Issue
Block a user