summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-19 19:18:01 +0000
committerDan Gohman <gohman@apple.com>2009-05-19 19:18:01 +0000
commit7a97e933cdf240cace3ccd7790df61cb209eec12 (patch)
tree0f61a6213578ce4a5796a6b21a3d093310dea025
parent71b6a37bc453333d210c67acc49916ecbd32e1e8 (diff)
downloadbcm5719-llvm-7a97e933cdf240cace3ccd7790df61cb209eec12.tar.gz
bcm5719-llvm-7a97e933cdf240cace3ccd7790df61cb209eec12.zip
Create ConstantExpr GEPs the correct way. This fixes
MultiSource/Benchmarks/Prolangs-C/football and a variety of other failures. llvm-svn: 72120
-rw-r--r--llvm/lib/Analysis/ScalarEvolutionExpander.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
index 36b6206a9bc..d110385fb3e 100644
--- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -246,7 +246,7 @@ Value *SCEVExpander::expandAddToGEP(const SCEVAddExpr *S,
// Fold a GEP with constant operands.
if (Constant *CLHS = dyn_cast<Constant>(V))
if (Constant *CRHS = dyn_cast<Constant>(Idx))
- return ConstantExpr::get(Instruction::GetElementPtr, CLHS, CRHS);
+ return ConstantExpr::getGetElementPtr(CLHS, &CRHS, 1);
// Do a quick scan to see if we have this GEP nearby. If so, reuse it.
unsigned ScanLimit = 6;
OpenPOWER on IntegriCloud