This is an archive of the discontinued LLVM Phabricator instance.

[LoopVectorize] Make VPWidenCanonicalIVRecipe::execute work for scalable vectors
ClosedPublic

Authored by david-arm on Nov 4 2021, 4:01 AM.

Details

Summary

The code in VPWidenCanonicalIVRecipe::execute only worked for fixed-width
vectors due to the way we generate the values per lane. This patch changes
the code to use a combination of vector splats and step vectors to get
the same result. This then works for both fixed-width and scalable vectors.

Tests that exercise this code path for scalable vectors have been added here:

Transforms/LoopVectorize/AArch64/sve-tail-folding.ll

Diff Detail

Event Timeline

david-arm created this revision.Nov 4 2021, 4:01 AM
david-arm requested review of this revision.Nov 4 2021, 4:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2021, 4:01 AM
This revision is now accepted and ready to land.Nov 10 2021, 5:28 AM
Matt added a subscriber: Matt.Nov 17 2021, 12:03 PM
This revision was landed with ongoing or failed builds.Jan 10 2022, 6:12 AM
This revision was automatically updated to reflect the committed changes.