Page MenuHomePhabricator

[LV] Collect candidates for sinking during VP2P sinkScalarOperands.
Needs ReviewPublic

Authored by fhahn on Tue, Apr 20, 7:41 AM.

Details

Reviewers
Ayal
gilr
rengolin
Summary

Some cases currently cannot be handled by the VPlan-to-VPlan version of
sinkScalarOperands. Those include cases where only scalars for some
lanes be sunk (e.g. for induction variables) or the code to extract
scalars from a widened instruction.

Those are still handled by the original sinkScalarOperands, but we can
collect the source instructions during the VPlan-to-VPlan transform, to
avoid unnecessary work.

Note that this also fixes an issues where sinkScalarOperands would sink
instructions that may read from memory. This is not legal, unless we can
prove there are no aliasing stores in between the original and target
location.

Diff Detail