1 /* PR target/49621 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target powerpc_altivec_ok } */
4 /* { dg-options "-O2 -maltivec -mno-vsx" } */
5
6 #include <altivec.h>
7
8 int
9 foo (void)
10 {
11 vector unsigned a, b, c;
12 unsigned k = 1;
13
14 a = (vector unsigned) { 0, 0, 0, 1 };
15 b = c = (vector unsigned) { 0, 0, 0, 0 };
16
17 a = vec_add (a, vec_splats (k));
18 b = vec_add (b, a);
19 c = vec_sel (c, a, b);
20
21 if (vec_any_eq (b, c))
22 return 1;
23
24 return 0;
25 }