]>
gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.target/aarch64/vect-widen-shift.c
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -save-temps" } */
3 /* { dg-final { check-function-bodies "**" "" "" } } */
7 #pragma GCC target "+nosve"
11 /* Should produce an shll,shll2 pair*/
15 ** shll v[0-9]+.4s, v[0-9]+.4h, 16
16 ** shll2 v[0-9]+.4s, v[0-9]+.8h, 16
19 void sshll_opt1 (int32_t *foo
, int16_t *a
, int16_t *b
)
21 for( int i
= 0; i
< ARR_SIZE
- 3;i
=i
+4)
24 foo
[i
+1] = a
[i
+1] << 16;
25 foo
[i
+2] = a
[i
+2] << 16;
26 foo
[i
+3] = a
[i
+3] << 16;
33 ** sxtl v[0-9]+.4s, v[0-9]+.4h
34 ** sxtl2 v[0-9]+.4s, v[0-9]+.8h
35 ** sshl v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
36 ** sshl v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
39 void sshll_opt2 (int32_t *foo
, int16_t *a
, int16_t *b
)
41 for( int i
= 0; i
< ARR_SIZE
- 3;i
=i
+4)
44 foo
[i
+1] = a
[i
+1] << 15;
45 foo
[i
+2] = a
[i
+2] << 14;
46 foo
[i
+3] = a
[i
+3] << 17;
This page took 0.037731 seconds and 5 git commands to generate.