Page MenuHomePhabricator

[Power10] Implement Vector Replace Builtins in LLVM
ClosedPublic

Authored by biplmish on Jul 7 2020, 7:51 AM.

Details

Reviewers
lei
amyk
nemanjai
Group Reviewers
Restricted Project
Commits
rG62ba48b45f65: [PowerPC] Implement Vector Replace Builtins in LLVM
Summary

This patch implements the LLVM intrinsics needed to implement the following prototypes of Vector Replace Builtins.

vector signed int vec_replace_elt (vector signed int, signed int, const int);
vector unsigned int vec_replace_elt (vector unsigned int, unsigned int, const int);
vector float vec_replace_elt (vector float, float, const int);
vector signed long long vec_replace_elt (vector signed long long, signed long long, const int);
vector unsigned long long vec_replace_elt (vector unsigned long long, unsigned long long, const int);
vector double rec_replace_elt (vector double, double, const int);

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

Diff Detail

Event Timeline

biplmish created this revision.Jul 7 2020, 7:51 AM
amyk added inline comments.Jul 7 2020, 7:59 AM
llvm/include/llvm/IR/IntrinsicsPowerPC.td
526

If we are going to custom codegen the front end, I believe we have to omit the GCCBuiltin part. Same with int_ppc_altivec_vinsd.

nemanjai accepted this revision.Jul 7 2020, 8:04 AM

LGTM as long as the inheriting of GCCBuiltin is removed. This can be done on commit.

llvm/include/llvm/IR/IntrinsicsPowerPC.td
526

Yes. Even if we don't plan custom code gen in the front end, we shouldn't have this in the initial back end patch because it is referencing a builtin that we do not define.

This revision is now accepted and ready to land.Jul 7 2020, 8:04 AM
This revision was automatically updated to reflect the committed changes.