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
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
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
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
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
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