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 | 40ac10085a496e529c259d200ec27bc000eb4e2e (patch) | |
tree | 116911d4361101b6933d41ba1ef85645559890e8 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 402cb2c981d0b2ac27ddf1d0ccf761bf94625811 (diff) | |
download | bcm5719-llvm-40ac10085a496e529c259d200ec27bc000eb4e2e.tar.gz bcm5719-llvm-40ac10085a496e529c259d200ec27bc000eb4e2e.zip |
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.
llvm-svn: 210435
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index bc9f45b2043..06dbde58c10 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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; |