diff options
author | Dan Gohman <gohman@apple.com> | 2009-05-19 19:18:01 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-05-19 19:18:01 +0000 |
commit | 6f952ff964c207c09411f7f93f9a12a2e5fb4121 (patch) | |
tree | c8215fb1bf011f99e7bc19f82cb8a04c601814c9 /lib | |
parent | 3b2f1927e7e8d03cbc5d0f2b1115815d94218838 (diff) | |
download | external_llvm-6f952ff964c207c09411f7f93f9a12a2e5fb4121.zip external_llvm-6f952ff964c207c09411f7f93f9a12a2e5fb4121.tar.gz external_llvm-6f952ff964c207c09411f7f93f9a12a2e5fb4121.tar.bz2 |
Create ConstantExpr GEPs the correct way. This fixes
MultiSource/Benchmarks/Prolangs-C/football and a variety of other
failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index 36b6206..d110385 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/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; |