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)
commite570dee4b03cca54bbf27a7f7a3299c5cdc3d087
tree726bf66578555bf99cacb7661049782cd711e36b
parentf7999fe1cb2c2bdb0a4080efabb4743719ce45ca
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.

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