diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-10-22 18:27:56 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-10-22 18:27:56 +0000 |
commit | 782090aa02484d7d1d335e3a7e209f1132aaa1a7 (patch) | |
tree | c2535a2e31b8d190fb064ac95b6c90ddc5fc3f95 /lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 81750822f4f74801d219ad970be079c2f59b9d66 (diff) |
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/LoopVectorize.cpp')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.cpp | 2 |
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; |