From 5a4118217696b53715cb480c3dfb59c4b17b9854 Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev@redking.me.uk>
Date: Mon, 16 Sep 2019 10:48:16 +0000
Subject: [PATCH] [SLPVectorizer] Assert that we find a LastInst to silence
 analyzer null dereference warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371974 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/Transforms/Vectorize/SLPVectorizer.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index a9d8649ce75..12c114f83d4 100644
--- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -3528,6 +3528,7 @@ void BoUpSLP::setInsertPointAfterBundle(TreeEntry *E) {
         break;
     }
   }
+  assert(LastInst && "Failed to find last instruction in bundle");
 
   // Set the insertion point after the last instruction in the bundle. Set the
   // debug location to Front.
-- 
2.40.0