diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-07-20 23:07:40 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-07-20 23:07:40 +0000 |
commit | 705141d4df0a150d39ffd633b1008b63303946ef (patch) | |
tree | f9abbbbf90be4c663e2bc39aceb204bd12832c50 /llvm/lib/Analysis | |
parent | dff711ed75bd75a3783ff05ff8505ac0faa20c92 (diff) | |
download | bcm5719-llvm-705141d4df0a150d39ffd633b1008b63303946ef.tar.gz bcm5719-llvm-705141d4df0a150d39ffd633b1008b63303946ef.zip |
baby steps toward fixing some problems with inbound GEPs that overflow, as discussed 2 months ago or so.
Make sure we do not emit index computations with NSW flags so that we dont get an undef value if the GEP overflows
llvm-svn: 160589
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/MemoryBuiltins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp index 39edaaf1c49..8d99ec3e564 100644 --- a/llvm/lib/Analysis/MemoryBuiltins.cpp +++ b/llvm/lib/Analysis/MemoryBuiltins.cpp @@ -645,7 +645,7 @@ ObjectSizeOffsetEvaluator::visitGEPOperator(GEPOperator &GEP) { if (!bothKnown(PtrData)) return unknown(); - Value *Offset = EmitGEPOffset(&Builder, *TD, &GEP); + Value *Offset = EmitGEPOffset(&Builder, *TD, &GEP, /*NoAssumptions=*/true); Offset = Builder.CreateAdd(PtrData.second, Offset); return std::make_pair(PtrData.first, Offset); } |