1 /* PR tree-optimization/57233 */
2 /* { dg-do run { target { ilp32 || lp64 } } } */
3 /* { dg-options "-O2" } */
4 /* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */
6 typedef unsigned V4
__attribute__((vector_size(4 * sizeof (int))));
7 typedef unsigned V8
__attribute__((vector_size(8 * sizeof (int))));
8 typedef unsigned V16
__attribute__((vector_size(16 * sizeof (int))));
13 __attribute__((noinline
)) void
16 a
= (a
<< 2) | (a
>> 30);
19 __attribute__((noinline
)) void
22 a
= (a
<< 30) | (a
>> 2);
25 __attribute__((noinline
)) void
28 a
= (a
<< b
) | (a
>> (32 - b
));
31 __attribute__((noinline
, noclone
)) void
34 a
= (a
<< x
) | (a
>> (32 - x
));
37 __attribute__((noinline
)) void
40 c
= (c
<< 2) | (c
>> 30);
43 __attribute__((noinline
)) void
46 c
= (c
<< 30) | (c
>> 2);
49 __attribute__((noinline
)) void
52 c
= (c
<< d
) | (c
>> (32 - d
));
55 __attribute__((noinline
, noclone
)) void
58 c
= (c
<< x
) | (c
>> (32 - x
));
61 __attribute__((noinline
)) void
64 e
= (e
<< 2) | (e
>> 30);
67 __attribute__((noinline
)) void
70 e
= (e
<< 30) | (e
>> 2);
73 __attribute__((noinline
)) void
76 e
= (e
<< f
) | (e
>> (32 - f
));
79 __attribute__((noinline
, noclone
)) void
82 e
= (e
<< x
) | (e
>> (32 - x
));
88 static unsigned x
= 0xdeadbeefU
;
89 static unsigned y
= 0x12347654U
;
90 static unsigned z
= 0x1a2b3c4dU
;
91 static unsigned w
= 0x87654321U
;
92 unsigned t
= x
^ (x
<< 11);
96 w
= w
^ (w
>> 19) ^ t
^ (t
>> 8);
101 init (unsigned int *p
, int count
, int mod
)
104 for (i
= 0; i
< count
; i
++)
106 unsigned int v
= r ();
114 check (unsigned int *p
, unsigned int *q
, int count
, unsigned int *s
, int ss
)
117 for (i
= 0; i
< count
; i
++)
121 if (p
[i
] != ((q
[i
] << ss
) | (q
[i
] >> (32 - ss
))))
129 init ((unsigned int *) &a
, 4, 0);
130 init ((unsigned int *) &b
, 4, 1);
131 init ((unsigned int *) &c
, 8, 0);
132 init ((unsigned int *) &d
, 8, 1);
133 init ((unsigned int *) &e
, 16, 0);
134 init ((unsigned int *) &f
, 16, 1);
141 check ((unsigned int *) &a
, (unsigned int *) &g
, 4, 0, 2);
142 check ((unsigned int *) &c
, (unsigned int *) &h
, 8, 0, 2);
143 check ((unsigned int *) &e
, (unsigned int *) &j
, 16, 0, 2);
150 check ((unsigned int *) &a
, (unsigned int *) &g
, 4, 0, 30);
151 check ((unsigned int *) &c
, (unsigned int *) &h
, 8, 0, 30);
152 check ((unsigned int *) &e
, (unsigned int *) &j
, 16, 0, 30);
159 check ((unsigned int *) &a
, (unsigned int *) &g
, 4, (unsigned int *) &b
, 0);
160 check ((unsigned int *) &c
, (unsigned int *) &h
, 8, (unsigned int *) &d
, 0);
161 check ((unsigned int *) &e
, (unsigned int *) &j
, 16, (unsigned int *) &f
, 0);
168 check ((unsigned int *) &a
, (unsigned int *) &g
, 4, 0, 5);
169 check ((unsigned int *) &c
, (unsigned int *) &h
, 8, 0, 5);
170 check ((unsigned int *) &e
, (unsigned int *) &j
, 16, 0, 5);