This is an archive of the discontinued LLVM Phabricator instance.

[Power9] vector load/store with length - llvm portion
ClosedPublic

Authored by syzaara on Nov 4 2016, 12:19 PM.

Details

Summary

Add builtin functions for prototypes:

vector signed char vec_xl_len (signed char *, size_t);
vector unsigned char vec_xl_len (unsigned char *, size_t);
vector signed int vec_xl_len (signed int *, size_t);
vector unsigned int vec_xl_len (unsigned int *, size_t);
vector signed int128 vec_xl_len (signed int128 *, size_t);
vector unsigned int128 vec_xl_len (unsigned int128 *, size_t);
vector signed long long vec_xl_len (signed long long *, size_t);
vector unsigned long long vec_xl_len (unsigned long long *, size_t);
vector signed short vec_xl_len (signed short *, size_t);
vector unsigned short vec_xl_len (unsigned short *, size_t);
vector double vec_xl_len (double *, size_t);
vector float vec_xl_len (float *, size_t);

vector unsigned char vec_xl_len_r (unsigned char *, size_t);

void vec_xst_len (vector signed char, signed char *, size_t);
void vec_xst_len (vector unsigned char, unsigned char *, size_t);
void vec_xst_len (vector signed int, signed int *, size_t);
void vec_xst_len (vector unsigned int, unsigned int *, size_t);
void vec_xst_len (vector signed int128, signed int128 *, size_t);
void vec_xst_len (vector unsigned int128, unsigned int128 *, size_t);
void vec_xst_len (vector signed long long, signed long long *, size_t);
void vec_xst_len (vector unsigned long long, unsigned long long *, size_t);
void vec_xst_len (vector signed short, signed short *, size_t);
void vec_xst_len (vector unsigned short, unsigned short *, size_t);
void vec_xst_len (vector double, double *, size_t);
void vec_xst_len (vector float, float *, size_t);

void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);

Diff Detail

Event Timeline

syzaara updated this revision to Diff 76929.Nov 4 2016, 12:19 PM
syzaara retitled this revision from to [Power9] vector load/store with length - llvm portion.
syzaara updated this object.
syzaara added subscribers: echristo, llvm-commits.
kbarton accepted this revision.Nov 7 2016, 8:07 PM
kbarton edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 7 2016, 8:07 PM
nemanjai requested changes to this revision.Nov 8 2016, 5:39 AM
nemanjai edited edge metadata.
nemanjai added inline comments.
include/llvm/IR/IntrinsicsPowerPC.td
724

I realized after we spoke yesterday that we have to change this. The length operand is in bits 0-7 of the second GPR operand. It therefore means that we cannot model this with an i32 so the instructions operands need to be G8RC and this has to be llvm_i64_ty.

lib/Target/PowerPC/PPCInstrVSX.td
2298–2305

See comment above.

This revision now requires changes to proceed.Nov 8 2016, 5:39 AM
syzaara updated this revision to Diff 77622.Nov 11 2016, 8:20 AM
syzaara edited edge metadata.

Updates for length parameter to be 64 bits rather than 32 bits.

nemanjai accepted this revision.Nov 13 2016, 5:38 PM
nemanjai edited edge metadata.

Other than the few minor nits about indentation, this LGTM.

include/llvm/IR/IntrinsicsPowerPC.td
724

Please fix the indentation as follows:

def int_ppc_vsx_lxvl :
      Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_i64_ty],
                [IntrReadMem, IntrArgMemOnly]>;

Same comment for the definitions below. The third line has the entire contents of the list enclosed in [] and it lines up inside the angle bracket since it is an argument to the Intrinsic.

lib/Target/PowerPC/PPCInstrVSX.td
2299

Same as above, the double quote character lines up under the 3 on the line above.

2301

This should line up with the XX1Form above since it is another class that this definition inherits from.

2349

Same indentation comment as above.

This revision is now accepted and ready to land.Nov 13 2016, 5:38 PM
syzaara closed this revision.Nov 21 2016, 11:55 AM