Fix a bug in vectorization of if-converted reduction variables. If the
authorNadav Rotem <nrotem@apple.com>
Tue, 4 Dec 2012 22:40:22 +0000 (22:40 +0000)
committerNadav Rotem <nrotem@apple.com>
Tue, 4 Dec 2012 22:40:22 +0000 (22:40 +0000)
commit93fa5ef9572d2c5f80080ea44a192d8a1b5d5365
treea7e44ee633f005c962468efb87fb18c1efe2d573
parent3cb2cb800ff6bc19ed4e066af47b0b9994cf13c4
Fix a bug in vectorization of if-converted reduction variables. If the
reduction variable is not used outside the loop then we ran into an
endless loop. This change checks if we found the original PHI.

llvm-svn: 169324
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/if-conversion-reduction.ll [new file with mode: 0644]