This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Use more flag-setting instructions
ClosedPublic

Authored by c-rhodes on Oct 17 2022, 7:38 AM.

Details

Summary

If OP in PTEST(PG, OP(PG, ...)) has a flag-setting variant change the
opcode so the PTEST becomes redundant. This patch extends this existing
optimization in AArch64::optimizePTestInstr to cover all flag-setting
opcodes.

Diff Detail

Event Timeline

c-rhodes created this revision.Oct 17 2022, 7:38 AM
c-rhodes requested review of this revision.Oct 17 2022, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 7:38 AM
Matt added a subscriber: Matt.Oct 19 2022, 5:19 AM
peterwaller-arm accepted this revision.Oct 24 2022, 6:46 AM

LGTM, one nit.

llvm/test/CodeGen/AArch64/sve-ptest-removal-brk.ll
58

Does this want warrant a comment above it that it's a negtest, or in the name? (otherwise it looks like it's covered by the comment at the top of the file, that these should be removed).

This revision is now accepted and ready to land.Oct 24 2022, 6:46 AM
This revision was landed with ongoing or failed builds.Oct 25 2022, 2:02 AM
This revision was automatically updated to reflect the committed changes.
c-rhodes marked an inline comment as done.Oct 25 2022, 2:03 AM