]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.target/powerpc/vec-cmp-sel.c
simplify-rtx.c (simplify_ternary_operation): Add simplification for (!c) != {0,....
[gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-cmp-sel.c
1 /* { dg-do compile { target powerpc64*-*-* } } */
2 /* { dg-require-effective-target powerpc_p8vector_ok } */
3 /* { dg-options "-maltivec -O2" } */
4 /* { dg-final { scan-assembler "vcmpgtsd" } } */
5 /* { dg-final { scan-assembler-not "xxlnor" } } */
6
7 /* Test code in simplify-rtx.c that converts
8 (!c) != {0,...,0} ? a : b
9 into
10 c != {0,...,0} ? b : a */
11
12 #include <altivec.h>
13
14 vector signed long long foo () {
15 vector signed long long x = { 25399, -12900 };
16 vector signed long long y = { 12178, -9987 };
17 vector bool long long b = vec_cmpge (x, y);
18 vector signed long long z = vec_sel (y, x, b);
19 return z;
20 }
This page took 0.036116 seconds and 5 git commands to generate.