[llvm-commits] [llvm] r125366 - /llvm/trunk/lib/VMCore/Constants.cpp
Chris Lattner
sabre at nondot.org
Thu Feb 10 21:37:21 PST 2011
Author: lattner
Date: Thu Feb 10 23:37:21 2011
New Revision: 125366
URL: http://llvm.org/viewvc/llvm-project?rev=125366&view=rev
Log:
make ConstantExpr::replaceUsesOfWithOnConstant preserve the inbounds
flag. Noticed by Jin Gu Kang!
Modified:
llvm/trunk/lib/VMCore/Constants.cpp
Modified: llvm/trunk/lib/VMCore/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=125366&r1=125365&r2=125366&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Constants.cpp (original)
+++ llvm/trunk/lib/VMCore/Constants.cpp Thu Feb 10 23:37:21 2011
@@ -2054,7 +2054,8 @@
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;
More information about the llvm-commits
mailing list