mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-28 06:26:12 -04:00
30 lines
572 B
C
30 lines
572 B
C
$NetBSD$
|
|
|
|
--- gcc/testsuite/gcc.target/powerpc/altivec-34.c.orig Wed May 21 19:48:58 2014
|
|
+++ gcc/testsuite/gcc.target/powerpc/altivec-34.c
|
|
@@ -0,0 +1,24 @@
|
|
+/* PR target/49621 */
|
|
+/* { dg-do compile } */
|
|
+/* { dg-options "-O2 -maltivec" } */
|
|
+
|
|
+#include <altivec.h>
|
|
+
|
|
+int
|
|
+foo (void)
|
|
+{
|
|
+ vector unsigned a, b, c;
|
|
+ unsigned k = 1;
|
|
+
|
|
+ a = (vector unsigned) { 0, 0, 0, 1 };
|
|
+ b = c = (vector unsigned) { 0, 0, 0, 0 };
|
|
+
|
|
+ a = vec_add (a, vec_splats (k));
|
|
+ b = vec_add (b, a);
|
|
+ c = vec_sel (c, a, b);
|
|
+
|
|
+ if (vec_any_eq (b, c))
|
|
+ return 1;
|
|
+
|
|
+ return 0;
|
|
+}
|