summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-07-20 23:07:40 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-07-20 23:07:40 +0000
commit705141d4df0a150d39ffd633b1008b63303946ef (patch)
treef9abbbbf90be4c663e2bc39aceb204bd12832c50 /llvm/lib/Analysis
parentdff711ed75bd75a3783ff05ff8505ac0faa20c92 (diff)
downloadbcm5719-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.cpp2
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);
}
OpenPOWER on IntegriCloud