This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE][InstCombine] Fold redundant zip(unzip) operations
ClosedPublic

Authored by mnadeem on Sep 12 2021, 3:51 PM.

Details

Summary
zip1(uzp1(A, B), uzp2(A, B)) --> A
zip2(uzp1(A, B), uzp2(A, B)) --> B

Diff Detail

Event Timeline

mnadeem created this revision.Sep 12 2021, 3:51 PM
mnadeem requested review of this revision.Sep 12 2021, 3:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2021, 3:51 PM
david-arm accepted this revision.Sep 15 2021, 7:26 AM

LGTM. Nice folds!

This revision is now accepted and ready to land.Sep 15 2021, 7:26 AM
paulwalker-arm added inline comments.Sep 15 2021, 8:40 AM
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
799

I think the function will be more readable if the names in the code matched the comment, i.e. can these just be A and B? Don't let this hold up the patch, if you agree it's just something to consider before pushing the change.

This revision was landed with ongoing or failed builds.Sep 17 2021, 3:25 PM
This revision was automatically updated to reflect the committed changes.
mnadeem marked an inline comment as done.Sep 17 2021, 3:26 PM
mnadeem added inline comments.
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
799

Updated in the final commit.

mnadeem marked an inline comment as done.Sep 17 2021, 3:26 PM