This is an archive of the discontinued LLVM Phabricator instance.

[X86] Support AMX Complex instructions
ClosedPublic

Authored by xiangzhangllvm on Apr 2 2023, 6:05 PM.

Details

Summary

Add AMX API _tile_cmmimfp16ps and _tile_cmmrlfp16ps
corresponding to instructions tcmmimfp16ps and tcmmrlfp16ps
ISA link: 671368

Diff Detail

Event Timeline

xiangzhangllvm created this revision.Apr 2 2023, 6:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2023, 6:05 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
xiangzhangllvm requested review of this revision.Apr 2 2023, 6:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2023, 6:05 PM

Add release notes like other ISAs. E.g., D135941

clang/lib/Headers/CMakeLists.txt
123

Move before amxfp16intrin.h to keep the order.

clang/lib/Headers/amxcomplexintrin.h
2–38

Update the license.

pengfei added inline comments.Apr 2 2023, 6:37 PM
clang/include/clang/Driver/Options.td
4667–4668

Move before mamx_fp16 to keep order.

clang/lib/Headers/immintrin.h
542

Remove

llvm/include/llvm/TargetParser/X86TargetParser.def
173

ditto.

xiangzhangllvm edited the summary of this revision. (Show Details)
xiangzhangllvm marked 5 inline comments as done.Apr 2 2023, 11:19 PM
xiangzhangllvm added inline comments.
llvm/lib/Target/X86/X86ExpandPseudo.cpp
578

Here keep old format style (didn't clang format here and so do changes in X86IselLowering.cpp)

Could you add a link to a reference?

pengfei added inline comments.Apr 3 2023, 12:41 AM
clang/docs/ReleaseNotes.rst
335–336

support -> supports

It's better to mention tcmmimfp16ps and tcmmrlfp16ps rather then intrinsics.

clang/lib/Basic/Targets/X86.cpp
923

This needs to keep in order too.

1025

ditto.

llvm/test/CodeGen/X86/AMX/amxcomplex-intrinsics.ll
4

No need for -O0

xiangzhangllvm edited the summary of this revision. (Show Details)Apr 3 2023, 1:15 AM
xiangzhangllvm marked 3 inline comments as done.Apr 3 2023, 1:48 AM

Could you add a link to a reference?

Done, PLS refer SUMMARY

pengfei accepted this revision.Apr 3 2023, 1:52 AM

LGTM except for one nit.

llvm/include/llvm/IR/IntrinsicsX86.td
5355–5361

Format it like others.

This revision is now accepted and ready to land.Apr 3 2023, 1:52 AM
xiangzhangllvm added inline comments.Apr 3 2023, 5:34 PM
llvm/include/llvm/IR/IntrinsicsX86.td
5355–5361

I'll reformat it when commits, thanks!

This revision was landed with ongoing or failed builds.Apr 3 2023, 6:55 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 6:55 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript