diff options
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index d079073..a76be44 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -2438,7 +2438,8 @@ Constant *ConstantExpr::getGetElementPtr(Type *Ty, Constant *C, assert(Ty && "Must specify element type"); assert(isSupportedGetElementPtr(Ty) && "Element type is unsupported!"); - if (Constant *FC = ConstantFoldGetElementPtr(Ty, C, InRange, Idxs)) + if (Constant *FC = + ConstantFoldGetElementPtr(Ty, C, NW.isInBounds(), InRange, Idxs)) return FC; // Fold a few common cases. assert(GetElementPtrInst::getIndexedType(Ty, Idxs) && "GEP indices invalid!"); |