]> granicus.if.org Git - llvm/commit
[SLP] Fix for PR30626: Compiler crash inside SLP Vectorizer.
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 27 Oct 2016 12:02:28 +0000 (12:02 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 27 Oct 2016 12:02:28 +0000 (12:02 +0000)
commitd6d83fe649c9c23b9474bd73d191f179af524aec
treec07784e5a8fc820e93495e05bac9038d6c2a09cf
parent5e7dda5a1f04028974a00470831a0f65d18e8d39
[SLP] Fix for PR30626: Compiler crash inside SLP Vectorizer.

After successfull horizontal reduction vectorization attempt for PHI node
vectorizer tries to update root binary op by combining vectorized tree
and the ReductionPHI node. But during vectorization this ReductionPHI
can be vectorized itself and replaced by the `undef` value, while the
instruction itself is marked for deletion. This 'marked for deletion'
PHI node then can be used in new binary operation, causing "Use still
stuck around after Def is destroyed" crash upon PHI node deletion.

Also the test is fixed to make it perform actual testing.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285286 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/horizontal.ll