projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f78d51
)
make ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
author
Chris Lattner
<sabre@nondot.org>
Fri, 11 Feb 2011 05:37:21 +0000
(
05:37
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 11 Feb 2011 05:37:21 +0000
(
05:37
+0000)
flag. Noticed by Jin Gu Kang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125366
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Constants.cpp
b/lib/VMCore/Constants.cpp
index 3a5a8b06635ee23f66f29484869fc46f9a6bf9b5..42c60769f5eb4032e7b46c51ee706aaa1274dac7 100644
(file)
--- a/
lib/VMCore/Constants.cpp
+++ b/
lib/VMCore/Constants.cpp
@@
-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;