This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add the Ampere1A core
ClosedPublic

Authored by philipp.tomsich on Jan 23 2023, 12:05 PM.

Details

Summary

The Ampere1A core improves on the Ampere1 with key differences being:

  • FEAT_MTE is now supported
  • adds a new fusion pair for (A+B+1 and A-B-1)

Depends on D142395

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 12:05 PM
philipp.tomsich requested review of this revision.Jan 23 2023, 12:05 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 23 2023, 12:05 PM

v2 changes:

  • fixes a whitespace issue
  • fixes a rebase artifact on Ampere1

Sounds OK, but do you mind splitting FeatureFuseAddSub2RegAndConstOne into a separate patch. They seem to be logically separable, and it can help in case there are problems found in one of the patches.

llvm/include/llvm/TargetParser/AArch64TargetParser.h
490

Can you clang-format the patch, otherwise lines get a little longer than they should be for llvm.

  • Split off new (Ampere1A-specific) fusion case
  • Updated the Ampere1A SubtargetFeature list to include (hopefully) all features
dmgreen added inline comments.Jan 24 2023, 9:39 AM
llvm/include/llvm/TargetParser/AArch64TargetParser.h
492

Just to check, you didn't mention SM4 in the commit message or the gcc patch from https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605942.html. Should that be included here?

llvm/lib/Target/AArch64/AArch64.td
1166

Formatting.

llvm/include/llvm/TargetParser/AArch64TargetParser.h
492

I'll have to review GCC I guess.
Small omissions are still possible, as we didn't get a /proc/cpuinfo to test -mcpu=native against -mcpu=ampere1a yet...

The manual states "The second-generation core adds support for the Memory Tagging Extension and SM3/SM4 cryptography instructions." So yes, it should be included.

  • untabify on some tabs that slipped in
dmgreen accepted this revision.Jan 24 2023, 10:09 AM

OK Thanks for the clarification. LGTM then.

This revision is now accepted and ready to land.Jan 24 2023, 10:09 AM
This revision was landed with ongoing or failed builds.Jan 24 2023, 1:42 PM
This revision was automatically updated to reflect the committed changes.