diff options
author | Manuel Jacob <me@manueljacob.de> | 2016-01-17 22:46:43 +0000 |
---|---|---|
committer | Manuel Jacob <me@manueljacob.de> | 2016-01-17 22:46:43 +0000 |
commit | 20c6d5bcb8ad508d07b3be91a28ba4b93131c33d (patch) | |
tree | 49aebe7493d8a2e704591ad5b75c7faba0172ffb /llvm/lib/Analysis/PHITransAddr.cpp | |
parent | 190577ac81d6c7ef6c58850cfbbb3bf18c7c7fab (diff) | |
download | bcm5719-llvm-20c6d5bcb8ad508d07b3be91a28ba4b93131c33d.tar.gz bcm5719-llvm-20c6d5bcb8ad508d07b3be91a28ba4b93131c33d.zip |
[opaque pointer types] [breaking-change] [NFC] SimplifyGEPInst: take the source element type of the GEP as an argument.
Patch by Eduard Burtescu.
Reviewers: dblaikie, mjacob
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16281
llvm-svn: 258024
Diffstat (limited to 'llvm/lib/Analysis/PHITransAddr.cpp')
-rw-r--r-- | llvm/lib/Analysis/PHITransAddr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/PHITransAddr.cpp b/llvm/lib/Analysis/PHITransAddr.cpp index f7545ea05a3..9c60a0463bc 100644 --- a/llvm/lib/Analysis/PHITransAddr.cpp +++ b/llvm/lib/Analysis/PHITransAddr.cpp @@ -229,7 +229,8 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, return GEP; // Simplify the GEP to handle 'gep x, 0' -> x etc. - if (Value *V = SimplifyGEPInst(GEPOps, DL, TLI, DT, AC)) { + if (Value *V = SimplifyGEPInst(GEP->getSourceElementType(), + GEPOps, DL, TLI, DT, AC)) { for (unsigned i = 0, e = GEPOps.size(); i != e; ++i) RemoveInstInputs(GEPOps[i], InstInputs); |