This is an archive of the discontinued LLVM Phabricator instance.

[AArch64ISelLowering] Don't look through scalable extract_subvector when optimising DUPLANE.
ClosedPublic

Authored by paulwalker-arm on Dec 31 2021, 6:27 AM.

Details

Summary

When constructDup is passed an extract_subvector it tries to use
extract_subvector's operand directly when creating the DUPLANE.
This is invalid when extracting from a scalable vector because the
necessary DUPLANE ISel patterns do not exist.

NOTE: This patch is an update to https://reviews.llvm.org/D110524 that originally fixed this but introduced a bug when the result VT is 64bits. I've restructured the code so the critial final else block is entered when necessary.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Dec 31 2021, 6:27 AM
paulwalker-arm requested review of this revision.Dec 31 2021, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2021, 6:27 AM

Rebase and given the context of the function I've tighten the code a little more.

LGTM! Thanks for the bug fixing

sdesmalen accepted this revision.Jan 4 2022, 3:14 AM
This revision is now accepted and ready to land.Jan 4 2022, 3:14 AM
This revision was landed with ongoing or failed builds.Jan 5 2022, 3:59 AM
This revision was automatically updated to reflect the committed changes.