This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Treat the icmp in icmp(and(..), 0) as free
ClosedPublic

Authored by dmgreen on Jun 22 2023, 11:52 PM.

Details

Summary

As in https://godbolt.org/z/4dafd9Geq, the icmp from an and may use an ands to set flags, meaning the icmp is free.

This could also be done for add/sub, but those patterns often happen in the induction variable of a loop, making them quite performance sensitive.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 22 2023, 11:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 11:52 PM
dmgreen requested review of this revision.Jun 22 2023, 11:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 11:52 PM
samtebbs accepted this revision.Jun 23 2023, 3:02 AM
This revision is now accepted and ready to land.Jun 23 2023, 3:02 AM
This revision was landed with ongoing or failed builds.Jul 1 2023, 2:00 PM
This revision was automatically updated to reflect the committed changes.