diff options
author | Tobias Grosser <tobias@grosser.es> | 2014-06-08 19:21:20 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2014-06-08 19:21:20 +0000 |
commit | 5e66eea5ba25c8d6406a456113dfa352919f3d19 (patch) | |
tree | 412eb47ae816389c8b363a12dbe96985dd6f73cb /lib/Analysis | |
parent | 62dd1181350947670d6cfe0d338c63322d45cef0 (diff) | |
download | llvm-5e66eea5ba25c8d6406a456113dfa352919f3d19.tar.gz llvm-5e66eea5ba25c8d6406a456113dfa352919f3d19.tar.bz2 llvm-5e66eea5ba25c8d6406a456113dfa352919f3d19.tar.xz |
ScalarEvolution: Derive element size from the type of the loaded element
Before, we where looking at the size of the pointer type that specifies the
location from which to load the element. This did not make any sense at all.
This change fixes a bug in the delinearization where we failed to delinerize
certain load instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index bc9f45b204..06dbde58c1 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -7365,7 +7365,7 @@ const SCEV *ScalarEvolution::getElementSize(Instruction *Inst) { if (StoreInst *Store = dyn_cast<StoreInst>(Inst)) Ty = Store->getValueOperand()->getType(); else if (LoadInst *Load = dyn_cast<LoadInst>(Inst)) - Ty = Load->getPointerOperand()->getType(); + Ty = Load->getType(); else return nullptr; |