Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.target/i386/avx512bw-pr94500.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 /* PR target/94500 */ | |
2 /* { dg-do run { target avx512bw } } */ | |
3 /* { dg-options "-O3 -mavx512bw -mprefer-vector-width=512" } */ | |
4 | |
5 #define AVX512BW | |
6 #include "avx512f-helper.h" | |
7 | |
8 __attribute__((noipa)) signed char | |
9 foo (signed char *p) | |
10 { | |
11 signed char r = 0; | |
12 int i; | |
13 for (i = 0; i < 256; i++) | |
14 if (p[i] > r) r = p[i]; | |
15 return r; | |
16 } | |
17 | |
18 signed char buf[256]; | |
19 | |
20 static void | |
21 TEST (void) | |
22 { | |
23 int i; | |
24 for (i = 0; i < 256; i++) | |
25 buf[i] = i - 128; | |
26 if (foo (buf) != 127) | |
27 abort (); | |
28 } |