On 05/25/16 14:50, Segher Boessenkool wrote:
On Wed, May 25, 2016 at 10:37:43AM -0500, Bill Seurer wrote:
This patch adds support for the vec_cmpne altivec builtins from the Power
Architecture 64-Bit ELF V2 ABI OpenPOWER ABI for Linux Supplement (16 July
2015 Version 1.1). There are many of the builtins that are missing and this
is part of a series of patches to add them.

There aren't instructions for vec_cmpne so the output code is built from other
built-ins that do have instructions which in this case is the following.

vec_cmpneq (va, vb) == vec_nor (vec_cmpeq (va, vb), vec_cmpeq (va, vb))

The new test cases are executable tests which verify that the generated
code produces expected values. C macros were used so that the same
test case could be used for both the signed and unsigned versions of various
basic types. A separate executable test case is used for the long long versions
of vec_cmpne because of some differences in loading and storing the vectors.

Bootstrapped and tested on powerpc64le-unknown-linux-gnu (power8) and
powerpc64-unknown-linux-gnu (both power7 and power8) with no regressions. Is
this ok for trunk?

Okay for trunk, thanks!  One formatting nit, one question...

+             /* call = vec_cmpeq (va, vb)
+                result = vec_nor (call, call)
+              */

Please put the */ at the end of the last line, not on its own.

Will do.


--- gcc/testsuite/gcc.target/powerpc/vec-cmpne-long.c   (revision 0)
+++ gcc/testsuite/gcc.target/powerpc/vec-cmpne-long.c   (working copy)
@@ -0,0 +1,110 @@
+/* { dg-do run { target { powerpc64*-*-* } } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { 
"-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -mpower8-vector -O3" } */

Just a question: does this need -O3 to work?

No, the opt level doesn't really matter for these tests because they aren't looking for specific code sequences.

--

-Bill Seurer

Reply via email to