[SLP]PR39774: Update references of the replaced external instructions.
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 30 Nov 2018 15:14:20 +0000 (15:14 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 30 Nov 2018 15:14:20 +0000 (15:14 +0000)
commit3689747619a6eba93d8e051e0fec2b75612eef3a
treebb8db448111a698ef8cf7daf47c85f4ee70bce52
parent7213cd14f59c5a9f474cb1a379905192b2d1ea7b
[SLP]PR39774: Update references of the replaced external instructions.

Summary:
An additional fix for PR39774. Need to update the references for the
RedcutionRoot instruction when it is replaced during the vectorization
phase to avoid compiler crash on reduction vectorization.

Reviewers: RKSimon, spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D55017

llvm-svn: 347997
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/PR35628_1.ll
llvm/test/Transforms/SLPVectorizer/X86/PR35628_2.ll
llvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
llvm/test/Transforms/SLPVectorizer/X86/horizontal-list.ll