This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] [NFC] Add Big-Endian checks for existing MMA tests
ClosedPublic

Authored by saghir on Sep 1 2021, 8:32 PM.

Details

Summary

This patch adds Big-Endian checks for the existing MMA test cases.
It also changes the target for these test cases to pwr10.

Diff Detail

Event Timeline

saghir created this revision.Sep 1 2021, 8:32 PM
saghir requested review of this revision.Sep 1 2021, 8:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 8:32 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
saghir added reviewers: Restricted Project, nemanjai, lei.Sep 1 2021, 8:33 PM
saghir edited the summary of this revision. (Show Details)
qiucf added a subscriber: qiucf.Sep 1 2021, 10:19 PM
qiucf added inline comments.
clang/test/CodeGen/builtins-ppc-pair-mma.c
5

Seems just adding %clang_cc1 -O3 -triple powerpc64-unknown-unknown -target-cpu pwr10 -emit-llvm %s -o - | FileCheck %s also makes the test pass. CHECK and CHECK-BE contents are the same.

nemanjai accepted this revision.Sep 2 2021, 4:43 AM

LGTM. Please update the description and commit message as to why this is being added.

clang/test/CodeGen/builtins-ppc-pair-mma.c
5

The existing builtins produce the same IR but I think this is done in preparation for https://reviews.llvm.org/D107647 which will add builtins very similar to these but that produce different IR on LE and BE. The description of the patch should probably mention that.

This revision is now accepted and ready to land.Sep 2 2021, 4:43 AM
lei added a comment.Sep 2 2021, 7:37 AM

Is it really necessary to add the BE checks in this patch if they are the same as LE checks? Why not just add it later when there is a diff seen?

saghir updated this revision to Diff 371164.Sep 7 2021, 1:13 PM

Addressed review comments.

saghir marked an inline comment as done.Sep 7 2021, 1:27 PM
saghir added inline comments.
clang/test/CodeGen/builtins-ppc-pair-mma.c
5

Since all the builtins in this file produce the same output for LE and BE, it's probably better to add checks for the new builtins (having different output for LE/BE) in a separate file.

saghir updated this revision to Diff 371919.Sep 10 2021, 7:30 AM

Rebased.

saghir updated this revision to Diff 372143.Sep 12 2021, 6:33 PM

Rebased before commit.

This revision was landed with ongoing or failed builds.Sep 12 2021, 6:39 PM
This revision was automatically updated to reflect the committed changes.