Page MenuHomePhabricator

[Power10] Implement Vector Permute Extended Builtins in LLVM/Clang
ClosedPublic

Authored by biplmish on Jun 30 2020, 5:19 AM.

Details

Reviewers
nemanjai
amyk
Group Reviewers
Restricted Project
Commits
rG286073484f7d: [PowerPC]Implement Vector Permute Extended Builtin
Summary

This patch implements builtins for the following prototypes:

vector signed char vec_permx (vector signed char, vector signed char, vector unsigned char, const int);
vector unsigned char vec_permx (vector unsigned char, vector unsigned char, vector unsigned char, const int);
vector signed short vec_permx (vector signed short, vector signed short, vector unsigned char, const int);
vector unsigned short vec_permx (vector unsigned short, vector unsigned short, vector unsigned char, const int);
vector signed int vec_permx (vector signed int, vector signed int, vector unsigned char, const int);
vector unsigned int vec_permx (vector unsigned int, vector unsigned int, vector unsigned char, const int);
vector signed long long vec_permx (vector signed long long, vector signed long long, vector unsigned char, const int);
vector unsigned long long vec_permx (vector unsigned long long, vector unsigned long long, vector unsigned char, const int);
vector float vec_permx (vector float, vector float, vector unsigned char, const int);
vector double vec_permx (vector double, vector double, vector unsigned char, const int);

“Depends on D82859

Diff Detail

Event Timeline

biplmish created this revision.Jun 30 2020, 5:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2020, 5:19 AM
biplmish updated this revision to Diff 274673.Jun 30 2020, 8:26 PM

Repatching after the p10 vector permute instructions have been merged upstream.

lei added a subscriber: lei.Jul 1 2020, 6:27 AM

p10-permute-ops.ll => builtins-ppc-p10permute.ll
Looks like this file is being created in several diff patches you have up for review.

llvm/lib/Target/PowerPC/PPCInstrPrefix.td
739

nit: indentation is off

743

Looks like you are creating is block in several other patches you have up for review. Can you please make sure when rebasing after they get comitted to make sure you are added these new patters into the same predicate block rather then creating a new one each time.

lei added inline comments.Jul 1 2020, 6:33 AM
llvm/include/llvm/IR/IntrinsicsPowerPC.td
1023

indentation

biplmish updated this revision to Diff 274993.Jul 1 2020, 7:59 PM

Correct Indendation and rename test file.

lei added inline comments.Jul 2 2020, 6:51 AM
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
737

These should go to the end of this file under the section "Anonymous Patterns": line 823

amyk accepted this revision as: amyk.Jul 2 2020, 9:30 AM

I think this overall LGTM.

This revision is now accepted and ready to land.Jul 2 2020, 9:30 AM
amyk added inline comments.Jul 2 2020, 9:30 AM
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
737

Yeah, I agree. We can probably address that on commit.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2020, 12:58 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript