Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr96166.c

raw
1 /* PR target/96166 */
2 /* { dg-do compile { target { ! ia32 } } } */
3 /* { dg-options "-O3 -mtune=generic -masm=att" } */
4 /* { dg-final { scan-assembler "rolq\\s\\\$32, \\\(%\[re]di\\\)" } } */
5
6 static inline void
7 swap (int *x, int *y)
8 {
9 int tmp = *x;
10 *x = *y;
11 *y = tmp;
12 }
13
14 void
15 bar (int (*x)[2])
16 {
17 int y[2];
18 __builtin_memcpy (&y, x, sizeof *x);
19 swap (&y[0], &y[1]);
20 __builtin_memcpy (x, &y, sizeof *x);
21 }