[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-19 Thread Hiroshi Inoue via Phabricator via cfe-commits
inouehrs added inline comments. Comment at: test/CodeGen/builtins-ppc-error.c:23 +void testXXPERMDI(void) { + int index = 5; + vec_xxpermdi(vsi); //expected-error {{too few arguments to function call, expected at least 3, have 1}} I am not sure we can assure

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-18 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. Other than the few minor comments, this LGTM. Comment at: lib/CodeGen/CGBuiltin.cpp:8458 +if (getTarget().isLittleEndian()) { + ElemIdx0 = (~Index & 1) + 2; + ElemIdx1 = (~Index & 2) >> 1; Minor nit: please add a comment

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-17 Thread Tony Jiang via Phabricator via cfe-commits
jtony updated this revision to Diff 99292. jtony added a comment. Address all the comments from Nemanja. https://reviews.llvm.org/D33053 Files: include/clang/Basic/BuiltinsPPC.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/CodeGen/CGBuiltin.cpp

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-16 Thread Tony Jiang via Phabricator via cfe-commits
jtony marked 6 inline comments as done. jtony added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8433 +if (getTarget().isLittleEndian()) { + switch (Index) { + case 0: nemanjai wrote: > The switch is overkill. You should just implement

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-13 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai requested changes to this revision. nemanjai added a comment. This revision now requires changes to proceed. Add a test case like the one that currently crashes (see inline comment). Also, please do the following: - Put a note in the description (and the commit message) with a link to

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-10 Thread Tony Jiang via Phabricator via cfe-commits
jtony created this revision. The vec_xxpermdi builtin is missing from altivec.h. This has been requested by developers working on libvpx for VP9 support for Google. Initially, I tried to define a new intrinsic to map it to the corresponding PowerPC hard instruction (XXPERMDI) directly. But