mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Fix bug: test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4229be3ce7
commit
e29f6a85ee
@ -177,6 +177,7 @@ bool ExpressionConvertableToType(Value *V, const Type *Ty,
|
|||||||
|
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
case Instruction::Sub:
|
case Instruction::Sub:
|
||||||
|
if (!Ty->isInteger() && !Ty->isFloatingPoint()) return false;
|
||||||
if (!ExpressionConvertableToType(I->getOperand(0), Ty, CTMap) ||
|
if (!ExpressionConvertableToType(I->getOperand(0), Ty, CTMap) ||
|
||||||
!ExpressionConvertableToType(I->getOperand(1), Ty, CTMap))
|
!ExpressionConvertableToType(I->getOperand(1), Ty, CTMap))
|
||||||
return false;
|
return false;
|
||||||
@ -610,6 +611,8 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
|
|||||||
}
|
}
|
||||||
// FALLTHROUGH
|
// FALLTHROUGH
|
||||||
case Instruction::Sub: {
|
case Instruction::Sub: {
|
||||||
|
if (!Ty->isInteger() && !Ty->isFloatingPoint()) return false;
|
||||||
|
|
||||||
Value *OtherOp = I->getOperand((V == I->getOperand(0)) ? 1 : 0);
|
Value *OtherOp = I->getOperand((V == I->getOperand(0)) ? 1 : 0);
|
||||||
return ValueConvertableToType(I, Ty, CTMap) &&
|
return ValueConvertableToType(I, Ty, CTMap) &&
|
||||||
ExpressionConvertableToType(OtherOp, Ty, CTMap);
|
ExpressionConvertableToType(OtherOp, Ty, CTMap);
|
||||||
|
Loading…
Reference in New Issue
Block a user