This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][Power10] Implement centrifuge, vector gather every nth bit, vector evaluate Builtins in LLVM/Clang
ClosedPublic

Authored by amyk on Jun 1 2020, 6:25 PM.

Details

Summary

This patch implements builtins for the following prototypes:

unsigned long long __builtin_cfuged (unsigned long long, unsigned long long);
vector unsigned long long vec_cfuge (vector unsigned long long, vector unsigned long long);
unsigned long long vec_gnb (vector unsigned __int128, const unsigned int);
vector unsigned char vec_ternarylogic (vector unsigned char, vector unsigned char, vector unsigned char, const unsigned int);
vector unsigned short vec_ternarylogic (vector unsigned short, vector unsigned short, vector unsigned short, const unsigned int);
vector unsigned int vec_ternarylogic (vector unsigned int, vector unsigned int, vector unsigned int, const unsigned int);
vector unsigned long long vec_ternarylogic (vector unsigned long long, vector unsigned long long, vector unsigned long long, const unsigned int);
vector unsigned __int128 vec_ternarylogic (vector unsigned __int128, vector unsigned __int128, vector unsigned __int128, const unsigned int);

Depends on D80935

Diff Detail

Event Timeline

amyk created this revision.Jun 1 2020, 6:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2020, 6:25 PM
jsji added a reviewer: Restricted Project.Jun 1 2020, 7:54 PM
jsji added a project: Restricted Project.
anil9 added a subscriber: anil9.Jun 11 2020, 11:20 PM
anil9 added inline comments.
clang/include/clang/Basic/BuiltinsPPC.def
305

nit : // P10 Vector Centrifuge built-in.

308

similar as above.

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

Try out some numbers which have different interpretation as signed/unsigned, if that matters that is.

lei accepted this revision as: lei.Jun 15 2020, 12:25 PM

LGTM

This revision is now accepted and ready to land.Jun 15 2020, 12:25 PM
amyk added a comment.Jun 25 2020, 2:37 PM

Talked to Anil, and will address his nit comments on the commit and disregard the comment about the test.

This revision was automatically updated to reflect the committed changes.