[VPlan] Only create extracts for recurrence exits if there are live-outs.
authorFlorian Hahn <flo@fhahn.com>
Mon, 10 Apr 2023 20:08:33 +0000 (21:08 +0100)
committerFlorian Hahn <flo@fhahn.com>
Mon, 10 Apr 2023 20:08:34 +0000 (21:08 +0100)
commit35af27c30a29106dc18c291f0220f429fca15345
tree0031ca8f17efd13f5e9e507835bf3ecf11eb9a0d
parent1c624633a67c48f0b1483fafe9dac02c5f2e3c5a
[VPlan] Only create extracts for recurrence exits if there are live-outs.

Move the code to collect live-out earlier and only generate extracts for
exit values if there are any live-outs that use them.

Depends on D147472.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D147567
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence-fold-tail.ll
llvm/test/Transforms/LoopVectorize/AArch64/fixed-order-recurrence.ll
llvm/test/Transforms/LoopVectorize/SystemZ/predicated-first-order-recurrence.ll
llvm/test/Transforms/LoopVectorize/X86/fixed-order-recurrence.ll
llvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll
llvm/test/Transforms/LoopVectorize/first-order-recurrence-multiply-recurrences.ll
llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
llvm/test/Transforms/LoopVectorize/induction.ll