mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
fix PR8983, a broken assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -581,7 +581,7 @@ static Constant *SymbolicallyEvaluateGEP(Constant *const *Ops, unsigned NumOps,
|
||||
if (NumOps == 2 &&
|
||||
cast<PointerType>(ResultTy)->getElementType()->isIntegerTy(8)) {
|
||||
ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]);
|
||||
assert(CE->getType() == IntPtrTy &&
|
||||
assert((CE == 0 || CE->getType() == IntPtrTy) &&
|
||||
"CastGEPIndices didn't canonicalize index types!");
|
||||
if (CE && CE->getOpcode() == Instruction::Sub &&
|
||||
CE->getOperand(0)->isNullValue()) {
|
||||
|
Reference in New Issue
Block a user