This is an archive of the discontinued LLVM Phabricator instance.

[LV] Use VPReplicateRecipe::isUniform instead isUniformAfterVec (NFCI).
ClosedPublic

Authored by fhahn on Jan 5 2022, 5:13 AM.

Details

Summary

In scalarizeInstruction(), isUniformAfterVectorization is used to detect
cases where it is sufficient to always access the first lane. This
should map directly checking whether the operand is a uniform replicate
recipe.

As an alternative, VPTransformState::get could check for uniforms
directly, as in D91501.

Diff Detail

Event Timeline

fhahn created this revision.Jan 5 2022, 5:13 AM
fhahn requested review of this revision.Jan 5 2022, 5:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2022, 5:14 AM
david-arm accepted this revision.Jan 5 2022, 5:35 AM

LGTM! I think this looks like a sensible change. I see we also call isUniformAfterVectorization in InnerLoopVectorizer::fixLCSSAPHIs, but in that case we are using a VPWidenPHIRecipe. :( Not sure if that matters and anyway it doesn't hold up this patch.

This revision is now accepted and ready to land.Jan 5 2022, 5:35 AM
fhahn updated this revision to Diff 404468.Jan 31 2022, 3:09 AM

Rebase on top of recent changes.

This revision was landed with ongoing or failed builds.Feb 6 2022, 8:41 AM
This revision was automatically updated to reflect the committed changes.