This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Use CMTST for != 0 vector compares (vnot (CMEQz A)).
ClosedPublic

Authored by fhahn on Feb 23 2021, 9:15 AM.

Details

Summary

(CMTST A, A) will only set elements to 0 if the element is 0 in A. Use
it for != 0 compares, which currently use (vnot (CMEQz A)). This saves a
mvn instruction.

Diff Detail

Event Timeline

fhahn created this revision.Feb 23 2021, 9:15 AM
fhahn requested review of this revision.Feb 23 2021, 9:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2021, 9:15 AM
dmgreen accepted this revision.Feb 23 2021, 9:56 AM

LGTM. Looks like a nice extension to the existing AArch64cmtst pattern.

This revision is now accepted and ready to land.Feb 23 2021, 9:56 AM
This revision was landed with ongoing or failed builds.Feb 24 2021, 1:39 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Feb 24 2021, 1:49 AM

LGTM. Looks like a nice extension to the existing AArch64cmtst pattern.

Thanks, once I found the right place to add it fit in quite nicely :)