forked from OSchip/llvm-project
make ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
flag. Noticed by Jin Gu Kang! llvm-svn: 125366
This commit is contained in:
parent
94c8d2941f
commit
603af18826
|
@ -2054,7 +2054,8 @@ void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
|
|||
Indices.push_back(Val);
|
||||
}
|
||||
Replacement = ConstantExpr::getGetElementPtr(Pointer,
|
||||
&Indices[0], Indices.size());
|
||||
&Indices[0], Indices.size(),
|
||||
cast<GEPOperator>(this)->isInBounds());
|
||||
} else if (getOpcode() == Instruction::ExtractValue) {
|
||||
Constant *Agg = getOperand(0);
|
||||
if (Agg == From) Agg = To;
|
||||
|
|
Loading…
Reference in New Issue