This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

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
2674

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
fhahn updated this revision to Diff 482872.Dec 14 2022, 8:40 AM

Rebased patch on top of current main.

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.

Thanks! That might be an option in the future.

This revision was landed with ongoing or failed builds.Dec 14 2022, 9:55 AM
This revision was automatically updated to reflect the committed changes.