summaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-10-22 18:27:56 +0000
committerNadav Rotem <nrotem@apple.com>2012-10-22 18:27:56 +0000
commit782090aa02484d7d1d335e3a7e209f1132aaa1a7 (patch)
treec2535a2e31b8d190fb064ac95b6c90ddc5fc3f95 /lib/Transforms/Vectorize
parent81750822f4f74801d219ad970be079c2f59b9d66 (diff)
downloadllvm-782090aa02484d7d1d335e3a7e209f1132aaa1a7.tar.gz
llvm-782090aa02484d7d1d335e3a7e209f1132aaa1a7.tar.bz2
llvm-782090aa02484d7d1d335e3a7e209f1132aaa1a7.tar.xz
Don't crash if the load/store pointer is not a GEP.
Fix by Shivarama Rao <Shivarama.Rao@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6fbf342d06..f944d9b4fc 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -389,7 +389,7 @@ Value *SingleBlockLoopVectorizer::getConsecutiveVector(Value* Val) {
}
bool LoopVectorizationLegality::isConsecutiveGep(Value *Ptr) {
- GetElementPtrInst *Gep = dyn_cast<GetElementPtrInst>(Ptr);
+ GetElementPtrInst *Gep = dyn_cast_or_null<GetElementPtrInst>(Ptr);
if (!Gep)
return false;