mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2407,9 +2407,9 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
|
||||
for (User::op_iterator i = GEP->op_begin() + 1, e = GEP->op_end();
|
||||
i != e; ++i)
|
||||
GEPOps.push_back(getVal(Values, *i));
|
||||
InstResult = cast<GEPOperator>(GEP)->isInBounds() ?
|
||||
ConstantExpr::getInBoundsGetElementPtr(P, GEPOps) :
|
||||
ConstantExpr::getGetElementPtr(P, GEPOps);
|
||||
InstResult =
|
||||
ConstantExpr::getGetElementPtr(P, GEPOps,
|
||||
cast<GEPOperator>(GEP)->isInBounds());
|
||||
} else if (LoadInst *LI = dyn_cast<LoadInst>(CurInst)) {
|
||||
if (LI->isVolatile()) return false; // no volatile accesses.
|
||||
InstResult = ComputeLoadResult(getVal(Values, LI->getOperand(0)),
|
||||
|
Reference in New Issue
Block a user