Page MenuHomePhabricator

[VPlan] Sink non-uniform recieps for scalar plans.
AcceptedPublic

Authored by fhahn on Sep 19 2022, 1:04 PM.

Details

Reviewers
Ayal
gilr
rengolin
Summary

In scalar plans, replicate recipes will only generate a single value per
UF, independent of whether they are uniform or not. So don't consider
uniformity for plans with scalar VFs only.

This allows us to handle a few additional cases in VPlan sinking instead
of non-VPlan sinkScalarOperands.

Depends on D133762.

Diff Detail

Event Timeline

fhahn created this revision.Sep 19 2022, 1:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 1:04 PM
fhahn requested review of this revision.Sep 19 2022, 1:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2022, 1:04 PM
Ayal accepted this revision.Sep 20 2022, 2:44 AM

LGTM.

This is essentially saying that for VF=1 every recipe is uniform (across VF lanes), or none are.
Perhaps this should be done more 'uniformly', as in CM.isUniformAfterVectorization(I, VF) which returns true if (VF.isScalar()) regardless of I.

llvm/lib/Transforms/Vectorize/VPlan.h
2655

nit: might also be useful when printing VF range of VPlan, currently set in VPlan's name.

This revision is now accepted and ready to land.Sep 20 2022, 2:44 AM