[VPlan] Also consider operands of sink candidates in same block.
authorFlorian Hahn <flo@fhahn.com>
Fri, 30 Dec 2022 18:24:34 +0000 (18:24 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 30 Dec 2022 18:24:35 +0000 (18:24 +0000)
commitaa2414729ebbcb2d8f162e9002a3a6aa768b1f9d
tree835abcf5cbd725ffedb3b2b6487eae9df16160fb
parent9aa0ee36fe73d8fd29c848f5ecd63422618849ec
[VPlan] Also consider operands of sink candidates in same block.

Even if the the sink candidate is already in the target block, its
operands can be candidates for sinking. Queue them up as well. Also
moves the queuing logic to a helper.
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
llvm/test/Transforms/LoopVectorize/interleave-and-scalarize-only.ll
llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll