Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr112276.c

raw
1 /* { dg-do run { target { ! ia32 } } } */
2 /* { dg-options "-O2 -msse4.1" } */
3 /* { dg-require-effective-target sse4 } */
4
5 #include "sse4_1-check.h"
6
7 typedef unsigned short __attribute__((__vector_size__ (8))) U4;
8 typedef unsigned short __attribute__((__vector_size__ (4))) U2;
9
10 U4
11 __attribute__((noipa))
12 foo4 (U4 a, U4 b)
13 {
14 return a > b;
15 }
16
17 U2
18 __attribute__((noipa))
19 foo2 (U2 a, U2 b)
20 {
21 return a > b;
22 }
23
24 static void
25 sse4_1_test ()
26 {
27 U4 a = __extension__(U4) {1, 1, 1, 1};
28 U4 b = foo4 (a, a);
29 if (b[0] || b[1] || b[2] || b[3]) __builtin_abort();
30
31 U2 c = __extension__(U2) {1, 1};
32 U2 d = foo2 (c, c);
33 if (d[0] || d[1]) __builtin_abort();
34
35 return;
36 }