1 /* { dg-do compile { target powerpc64*-*-* } } */
2 /* { dg-require-effective-target powerpc_p8vector_ok } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-maltivec -O2 -mvsx -mpower8-vector" } */
5 /* { dg-final { scan-assembler "vcmpgtsd" } } */
6 /* { dg-final { scan-assembler-not "xxlnor" } } */
7
8 /* Test code in simplify-rtx.c that converts
9 (!c) != {0,...,0} ? a : b
10 into
11 c != {0,...,0} ? b : a */
12
13 #include <altivec.h>
14
15 volatile vector signed long long x = { 25399, -12900 };
16 volatile vector signed long long y = { 12178, -9987 };
17
18 vector signed long long foo () {
19 vector bool long long b = vec_cmpge (x, y);
20 vector signed long long z = vec_sel (y, x, b);
21 return z;
22 }