mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 07:00:45 +00:00
make ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
flag. Noticed by Jin Gu Kang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f78d51be6
commit
33a8f3385b
@ -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
Block a user