This is an archive of the discontinued LLVM Phabricator instance.

Add missing builtins to altivec.h for ABI compliance (vol. 2)
ClosedPublic

Authored by nemanjai on Jul 1 2015, 10:42 AM.

Details

Summary

The bulk of the second round of additions to altivec.h.
The following interfaces were added:
vector double vec_floor(vector double a)
vector double vec_madd(vector double
a, vector double b, vector double c)
vector float vec_msub(vector float a, vector float b, vector float c)
vector double vec_msub(vector double
a, vector double b, vector double c)
vector float vec_mul(vector float a, vector float b)
vector double vec_mul(vector double a, vector double b)
vector float vec_nmadd(vector float a, vector float b, vector float c)
vector double vec_nmadd(vector double
a, vector double b, vector double c)
vector double vec_nmsub(vector double a, vector double b, vector double c)
vector double vec_nor(vector double
a, vector double b)
vector double vec_or(vector double
a, vector double b)
vector float vec_rint(vector float
a)
vector double vec_rint(vector double a)
vector float vec_nearbyint(vector float
a)
vector double vec_nearbyint(vector double a)
vector float vec_sqrt(vector float
a)
vector double vec_sqrt(vector double a)
vector double vec_rsqrte(vector double
a)
vector double vec_sel(vector double a, vector double b, vector unsigned long long c)
vector double vec_sel(vector double
a, vector double b, vector unsigned long long c)
vector double vec_sub(vector double a, vector double b)
vector double vec_trunc(vector double a)
vector double vec_xor(vector double
a, vector double b)
vector double vec_xor(vector double
a, vector bool long long b)
vector double vec_xor(vector bool long long
a, vector double __b)

New VSX paths for the following interfaces:
vector float vec_madd(vector float a, vector float b, vector float c)
vector float vec_nmsub(vector float
a, vector float b, vector float c)
vector float vec_rsqrte(vector float a)
vector float vec_trunc(vector float
a)
vector float vec_floor(vector float __a)

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 28882.Jul 1 2015, 10:42 AM
nemanjai retitled this revision from to Add missing builtins to altivec.h for ABI compliance (vol. 2).
nemanjai updated this object.
nemanjai edited the test plan for this revision. (Show Details)
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: Unknown Object (MLST).
echristo edited edge metadata.Jul 1 2015, 2:31 PM

Hi Nemanja,

Few inline comments then this looks good to me. Note that this isn't perfectly compatible with the gcc version because of stricter types in things like vec_vsx_ld/st, but I think that's ok here.

The inline comments generally happen quite a few times, but I've only highlighted a single one in general.

Thanks!

-eric

lib/CodeGen/CGBuiltin.cpp
6642–6643

Formatting?

lib/Headers/altivec.h
5338

This change seems unrelated, make it separately?

11208

Make all of these changes separately?

test/CodeGen/builtins-ppc-vsx.c
36

Seems like something that should be made separately?

wschmidt edited edge metadata.Jul 2 2015, 10:02 AM

I don't have anything to add to Eric's comments. Thanks for getting all these done!

nemanjai updated this revision to Diff 28997.Jul 3 2015, 2:03 AM
nemanjai edited edge metadata.

Addressed the review comments:

  • fixed formatting issues in the switch statements
  • removed unrelated changes to altivec.h and the test case
echristo accepted this revision.Jul 4 2015, 11:58 AM
echristo edited edge metadata.

LGTM thanks!

-eric

This revision is now accepted and ready to land.Jul 4 2015, 11:58 AM
nemanjai closed this revision.Jul 4 2015, 11:41 PM

Committed revision 241399.