LoopVectorizer: Fix a bug in the code that updates the loop exiting block.
authorNadav Rotem <nrotem@apple.com>
Sun, 30 Dec 2012 07:47:00 +0000 (07:47 +0000)
committerNadav Rotem <nrotem@apple.com>
Sun, 30 Dec 2012 07:47:00 +0000 (07:47 +0000)
commitdb2367512e87dbd7b93c3250ef30c9df5e40cb43
treee5e199e109705e5cd36224f6db77c8b8adb13074
parenta6542923b8ad94d791a12d3d5ae3e62a611f0383
LoopVectorizer: Fix a bug in the code that updates the loop exiting block.
LCSSA PHIs may have undef values. The vectorizer updates values that are used by outside users such as PHIs.
The bug happened because undefs are not loop values. This patch handles these PHIs.

PR14725

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