SLPVectorizer: Fix invalid iterator errors
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 20 Aug 2013 21:21:45 +0000 (21:21 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 20 Aug 2013 21:21:45 +0000 (21:21 +0000)
commit16a2253e4011d27a9426f81f55501fd5dfb863bd
tree0bbd22cce6aac60f5be4a8f48f226a48dcb0c78d
parent80f495aab0b1103b880196191af56f1d1c473ea1
SLPVectorizer: Fix invalid iterator errors

Update iterator when the SLP vectorizer changes the instructions in the basic
block by restarting the traversal of the basic block.

Patch by Yi Jiang!

Fixes PR 16899.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188832 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/pr16899.ll [new file with mode: 0644]