This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen][AArch64][SVE] Canonicalize intrinsic rdffr{ => _z}
ClosedPublic

Authored by peterwaller-arm on May 17 2021, 7:13 AM.

Details

Summary

Follow up to D101357 / 3fa6510f6.
Supersedes D102330.

Goal: Use flags setting rdffrs instead of rdffr + ptest.

Problem: RDFFR_P doesn't have have a flags setting equivalent.

Solution: in instcombine, canonicalize to RDFFR_PP at the IR level, and
rely on RDFFR_PP+PTEST => RDFFRS_PP optimization in
AArch64InstrInfo::optimizePTestInstr.

While here:

  • Test that rdffr.z+ptest generates a rdffrs.
  • Use update_{test,llc}_checks.py on the tests.
  • Use sve attribute on functions.

Diff Detail

Event Timeline

peterwaller-arm requested review of this revision.May 17 2021, 7:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2021, 7:13 AM
david-arm added inline comments.May 18 2021, 3:55 AM
llvm/test/CodeGen/AArch64/sve-intrinsics-rdffr-predication.ll
1 ↗(On Diff #345866)

Hi @peterwaller-arm, I think this test should probably live in Transforms/InstCombine/AArch64

  • Move test per review comment.
  • Update ACLE test.
  • Rebase.
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2021, 5:58 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
peterwaller-arm marked an inline comment as done.May 19 2021, 5:58 AM
bsmith accepted this revision.May 19 2021, 8:14 AM

LGTM

This revision is now accepted and ready to land.May 19 2021, 8:14 AM
This revision was landed with ongoing or failed builds.May 20 2021, 9:23 AM
This revision was automatically updated to reflect the committed changes.