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

Hiroshi Inoue via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 11:37:39 PDT 2017


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}}
----------------
jtony wrote:
> inouehrs wrote:
> > I am not sure we can assure that clang always do a constant propagation to resolve `index` as a compile time constant. But it seems that an existing test case above already assumes clang does it. 
> > IMO, `const unsigned index = 5;` is a little better.
> Hi Hiroshi, the index is used as a non-constant variable test input to test the diagnostic message. We want it to be a variable here. But I guess I can leave it uninitialized to be clear.
Thank you for the clarification. Comment says expected error. 
Sorry for confusing you.


https://reviews.llvm.org/D33053





More information about the cfe-commits mailing list