Set the default insert point to the first instruction, and not to end()
authorNadav Rotem <nrotem@apple.com>
Tue, 9 Jul 2013 17:55:36 +0000 (17:55 +0000)
committerNadav Rotem <nrotem@apple.com>
Tue, 9 Jul 2013 17:55:36 +0000 (17:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185953 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/SLPVectorizer.cpp

index cfb5be77a4a31f58c845a6f2f4cd47bde0482dac..93ff1f7e5b58c36f5f1345011a393ec2f6a10006 100644 (file)
@@ -1217,7 +1217,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E) {
 }
 
 void BoUpSLP::vectorizeTree() {
-  Builder.SetInsertPoint(&F->getEntryBlock());
+  Builder.SetInsertPoint(F->getEntryBlock().begin());
   vectorizeTree(&VectorizableTree[0]);
 
   // For each vectorized value: