[LV] Do not try to sink dead instructions.
authorFlorian Hahn <flo@fhahn.com>
Tue, 28 Jan 2020 16:20:40 +0000 (08:20 -0800)
committerFlorian Hahn <florian_hahn@apple.com>
Tue, 28 Jan 2020 16:28:03 +0000 (08:28 -0800)
commita911fef3dd79e0a04b241be7b476dde7e99744c4
treeec13b088ae68a8a14c4adab68008f710e7f93c08
parentb7e415f37f38c65ced6d725d100790526920bc0c
[LV] Do not try to sink dead instructions.

Dead instructions do not need to be sunk. Currently we try and record
the recipies for them, but there are no recipes emitted for them and
there's nothing to sink. They can be removed from SinkAfter while
marking them for recording.

Fixes PR44634.

Reviewers: rengolin, hsaito, fhahn, Ayal, gilr

Reviewed By: gilr

Differential Revision: https://reviews.llvm.org/D73423
llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll