This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add AVX-IFMA instructions.
ClosedPublic

Authored by FreddyYe on Oct 13 2022, 7:55 PM.

Diff Detail

Event Timeline

FreddyYe created this revision.Oct 13 2022, 7:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 7:55 PM
FreddyYe requested review of this revision.Oct 13 2022, 7:55 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 13 2022, 7:55 PM
FreddyYe retitled this revision from Add AVX-IFMA instructions. to [X86] Add AVX-IFMA instructions..Oct 13 2022, 8:17 PM
RKSimon added inline comments.Oct 14 2022, 1:17 AM
clang/test/CodeGen/avxifma-builtins.c
2

32-bit test coverage?

clang/test/Preprocessor/predefined-arch-macros-x86.c
35 ↗(On Diff #467665)

?

Matt added a subscriber: Matt.Oct 19 2022, 5:04 PM
skan added inline comments.Oct 21 2022, 2:10 AM
clang/lib/Basic/Targets/X86.cpp
785

Why do we need this line?

FreddyYe updated this revision to Diff 469529.Oct 21 2022, 3:21 AM
FreddyYe marked 3 inline comments as done.

Address comments. THX for review!

pengfei added inline comments.Oct 24 2022, 2:24 AM
clang/include/clang/Basic/BuiltinsX86.def
1335–1338

Can we unify the builtins like AVXVNNI? e.g., change it to vx512ifma,avx512vl|avxifma

clang/lib/Headers/avxifmaintrin.h
36

Should we provide unified intrinsic _mm_madd52hi_epu64 like AVXVNNI?

llvm/test/CodeGen/X86/avx-ifma-intrinsics.ll
2

Use AVX,AVX-X86 etc. to reduce the duplicated check.

22

I think we should expect VEX encoding here with comment EVEX TO VEX Compression encoding

FreddyYe updated this revision to Diff 471014.Oct 26 2022, 9:30 PM
FreddyYe marked 4 inline comments as done.

Address comments and update. THX for review:

Added llvm/test/CodeGen/X86/stack-folding-int-avx512ifma.ll and
llvm/test/CodeGen/X86/stack-folding-int-avxifma.ll.

FreddyYe added inline comments.Oct 26 2022, 10:34 PM
clang/lib/Headers/avxifmaintrin.h
36

Good reminding. You mean adding them in intrinsic guide, right?

pengfei added inline comments.Oct 26 2022, 11:09 PM
clang/lib/Headers/avxifmaintrin.h
36
FreddyYe updated this revision to Diff 471033.Oct 26 2022, 11:45 PM
FreddyYe marked an inline comment as done.

Address comment.

pengfei accepted this revision.Oct 27 2022, 12:41 AM

LGTM.

This revision is now accepted and ready to land.Oct 27 2022, 12:41 AM
skan accepted this revision.Oct 27 2022, 1:38 AM

LGTM

FreddyYe updated this revision to Diff 471350.Oct 27 2022, 6:13 PM

Rebase. THX for all of the review!

This revision was landed with ongoing or failed builds.Oct 27 2022, 6:42 PM
This revision was automatically updated to reflect the committed changes.