Page MenuHomePhabricator

[PowerPC][Power10] Implement Truncate and Store VSX Vector Builtins
ClosedPublic

Authored by amyk on Jun 24 2020, 8:00 AM.

Details

Summary

This patch implements the following function prototypes for the truncate and store VSX Vector instructions:

void vec_xst_trunc (vector signed __int128, signed long long, signed char *);
void vec_xst_trunc (vector unsigned __int128, signed long long, unsigned char *);

void vec_xst_trunc (vector signed __int128, signed long long, signed short *);
void vec_xst_trunc (vector unsigned __int128, signed long long, unsigned short *);

void vec_xst_trunc (vector signed __int128, signed long long, signed int *);
void vec_xst_trunc (vector unsigned __int128, signed long long, unsigned int *);

void vec_xst_trunc (vector signed __int128, signed long long, signed long long *);
void vec_xst_trunc (vector unsigned __int128, signed long long, unsigned long long *);

Depends on D82431.

Diff Detail

Event Timeline

amyk created this revision.Jun 24 2020, 8:00 AM
amyk updated this revision to Diff 274260.Jun 29 2020, 3:13 PM

Updated the patch to move the MC/llc tests into the appropriate files.

amyk updated this revision to Diff 274672.Jun 30 2020, 8:22 PM

Update the patch to place MC tests into appropriate files.

lei requested changes to this revision.Jun 30 2020, 8:31 PM
lei added a subscriber: lei.

Please move encoding tests to ppc64-encoding-ISA31.[txt|s].

clang/test/CodeGen/builtins-ppc-p10vector.c
647

I don't see a run line above that uses CHECK-BE|CHECK-LE. Since all these look the same, did you mean to use the default CHECK?

This revision now requires changes to proceed.Jun 30 2020, 8:31 PM
amyk marked an inline comment as done.Jun 30 2020, 9:01 PM
amyk added inline comments.
clang/test/CodeGen/builtins-ppc-p10vector.c
647

You're right - unfortunately in the previous tests that use CHECK-BE/CHECK-LE that were committed, I did not realize that I forgot to upstream the appropriate RUN lines... If it is okay, I can add them into this patch when I update it.

lei added inline comments.Jul 1 2020, 5:27 AM
clang/test/CodeGen/builtins-ppc-p10vector.c
647

Not sure what you mean by appropriate RUN lines. From the checks you are adding seems there is no diff between BE and LE so both can use the default CHECK.

amyk updated this revision to Diff 276881.Jul 9 2020, 5:18 PM

Rebased patch, and addressed review comments of having a single CHECK.

NeHuang added inline comments.
llvm/test/CodeGen/PowerPC/builtins-ppc-p10vsx.ll
2

Do we also need to run for big endian?

stefanp accepted this revision as: stefanp.Jul 17 2020, 12:08 PM
stefanp added a subscriber: stefanp.

LGTM.

Please wait for Lei to give the approval as well before you commit.

llvm/test/CodeGen/PowerPC/builtins-ppc-p10vsx.ll
2

I don't think it would hurt to add a BE run for this as well. the only thing to watch out for is the fact that this is not actually a new file. This test file already exists on master so I assume that this will be merged in (and not added as a new file).

lei accepted this revision.Jul 23 2020, 4:55 AM

LGTM,
Please add tests for BE in llvm/test/CodeGen/PowerPC/builtins-ppc-p10vsx.ll prior to committing.

llvm/test/CodeGen/PowerPC/builtins-ppc-p10vsx.ll
2

I believe this is a new file 🙂

This revision is now accepted and ready to land.Jul 23 2020, 4:55 AM
amyk added a comment.EditedJul 24 2020, 3:41 PM

The llvm/test/CodeGen/PowerPC/builtins-ppc-p10vsx.ll file actually exists, but does not have a BE RUN line. I realized I didn't rebase this diff to my previous patch that introduced it. Thus on the commit, I will append my tests to that file and add a BE line to it.

This revision was automatically updated to reflect the committed changes.