This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add instcombine to convert ptest.last/first to ptest.any
ClosedPublic

Authored by bsmith on Nov 14 2022, 7:18 AM.

Details

Summary

This allow for better optimization later in the backend.

This fixes the remaining missed optimizations in D137717.

Depends on D137930

Diff Detail

Event Timeline

bsmith created this revision.Nov 14 2022, 7:18 AM
bsmith requested review of this revision.Nov 14 2022, 7:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 7:18 AM
c-rhodes accepted this revision.Nov 14 2022, 7:57 AM

just one suggestion but otherwise LGTM, cheers

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
983

perhaps worth adding a comment describing the combine?

PTEST_<FIRST|LAST>(X, X) is equivalent to PTEST_ANY(X, X).
This revision is now accepted and ready to land.Nov 14 2022, 7:57 AM
Matt added a subscriber: Matt.Nov 14 2022, 9:55 AM
This revision was landed with ongoing or failed builds.Nov 15 2022, 7:59 AM
This revision was automatically updated to reflect the committed changes.