This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][MMA] Allow MMA builtin types in pre-P10 compilation units
ClosedPublic

Authored by kamaub on Sep 10 2021, 5:14 AM.

Details

Summary

This patch allows the use of vector_quad and vector_pair, PPC MMA builtin
types, on all PowerPC 64-bit compilation units. When these types are
made available the builtins that use them automatically become available
so semantic checking for mma and pair vector memop __builtins is also
expanded to ensure these builtin function call are only allowed on
Power10 and new architectures. All related test cases are updated to
ensure test coverage.

Diff Detail

Event Timeline

kamaub created this revision.Sep 10 2021, 5:14 AM
kamaub requested review of this revision.Sep 10 2021, 5:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2021, 5:14 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
kamaub edited the summary of this revision. (Show Details)Sep 10 2021, 5:18 AM
kamaub updated this revision to Diff 371954.Sep 10 2021, 10:19 AM

The condition for failing semantic chequing on mma builtins was incorrect,
updating this patch to correctly check the semantics and associated testing.

NeHuang added inline comments.
clang/test/Sema/ppc-mma-builtins.c
1 ↗(On Diff #371954)

can you please add // REQUIRES: powerpc-registered-target for the ppc specific test?

kamaub updated this revision to Diff 376300.Sep 30 2021, 11:23 AM

Rebasing this patch and addressing review comments

An upstream commit removed the need for this patch to modify a few
test cases so it has been rebased to remain up-to-date, also addressing
review comments.

kamaub marked an inline comment as done.Sep 30 2021, 11:24 AM
nemanjai accepted this revision.Sep 30 2021, 5:57 PM

LGTM as long as you add the back end test.

clang/test/CodeGen/ppc-mma-types.c
2–6

Please add this IR test to the back end codegen tests (for older CPUs).

This revision is now accepted and ready to land.Sep 30 2021, 5:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 5:59 AM
kamaub marked an inline comment as done.Oct 5 2021, 6:02 AM

Updated an existing test for the backend with pwr8 and pwr9 be/le targets during commit