2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr46212.c
blob3329ed5f47ce857eef772ebf3e223dcdc724a1ff
1 /* PR rtl-optimization/46212 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -funroll-loops" } */
4 /* { dg-options "-O3 -funroll-loops -march=i386" { target { { i686-*-* x86_64-*-* } && ia32 } } } */
5 /* { dg-require-effective-target int32plus } */
7 static inline unsigned
8 foo (void *x)
10 unsigned y = *(volatile unsigned *) (x);
11 return (y >> 24) | ((y >> 8) & 0xff00) | ((y & 0xff00) << 8) | (y << 24);
14 void
15 bar (void *x, void *y, int z)
17 unsigned c;
18 while (z--)
20 c = foo (y);
21 *(unsigned *) x = (c & 0xf80000) >> 9 | (c & 0xf800) >> 6
22 | (c & 0xf8) >> 3 | (c & 0x80000000) >> 16;