Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx2-shiftqihi-constant-1.c

raw
1 /* PR target/95524 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mavx2 -mno-avx512f" } */
4 /* { dg-final { scan-assembler-times "vpand\[^\n\]*%ymm" 3 } } */
5 typedef char v32qi __attribute__ ((vector_size (32)));
6 typedef unsigned char v32uqi __attribute__ ((vector_size (32)));
7
8 __attribute__((noipa)) v32qi
9 foo_ashiftrt_256 (v32qi a)
10 {
11 return a >> 2;
12 }
13 /* { dg-final { scan-assembler-times "vpsraw\[^\n\]*%ymm" 1 } } */
14 /* { dg-final { scan-assembler-times "vpxor\[^\n\]*%ymm" 1 } } */
15 /* { dg-final { scan-assembler-times "vpsubb\[^\n\]*%ymm" 1 } } */
16
17 __attribute__((noipa)) v32qi
18 foo_ashift_256 (v32qi a)
19 {
20 return a << 7;
21 }
22
23 /* { dg-final { scan-assembler-times "vpsllw\[^\n\]*%ymm" 1 } } */
24
25 __attribute__((noipa)) v32uqi
26 foo_lshiftrt_256 (v32uqi a)
27 {
28 return a >> 2;
29 }
30
31 /* { dg-final { scan-assembler-times "vpsrlw\[^\n\]*%ymm" 1 } } */