From 782090aa02484d7d1d335e3a7e209f1132aaa1a7 Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Mon, 22 Oct 2012 18:27:56 +0000 Subject: Don't crash if the load/store pointer is not a GEP. Fix by Shivarama Rao git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166427 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp') 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(Ptr); + GetElementPtrInst *Gep = dyn_cast_or_null(Ptr); if (!Gep) return false; -- cgit v1.2.3-18-g5258