mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Bug fix for test/Regression/Other/2002-02-14-LevelRaiseBadAssert.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4ed5534a8f
commit
868c2d3c05
@ -307,8 +307,7 @@ bool ExpressionConvertableToType(Value *V, const Type *Ty,
|
||||
//
|
||||
std::vector<Value*> Indices;
|
||||
const Type *ElTy = ConvertableToGEP(PTy, I->getOperand(1), Indices);
|
||||
if (ElTy) {
|
||||
assert(ElTy == PVTy && "Internal error, setup wrong!");
|
||||
if (ElTy == PVTy) {
|
||||
if (!ExpressionConvertableToType(I->getOperand(0),
|
||||
PointerType::get(ElTy), CTMap))
|
||||
return false; // Can't continue, ExConToTy might have polluted set!
|
||||
|
@ -155,6 +155,7 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal,
|
||||
int Val = getConstantValue(Expr.Scale);
|
||||
if (Val < 0) return false; // Don't mess with negative scales
|
||||
Scale = (unsigned)Val;
|
||||
if (Scale == 1) Scale = 0; // No interesting scale if *1
|
||||
}
|
||||
|
||||
// Loop over the Scale and Offset values, filling in the Indices vector for
|
||||
|
Loading…
x
Reference in New Issue
Block a user