1 /* { dg-do compile } */
2 /* { dg-require-effective-target bswap } */
3 /* { dg-options "-O2 -fdump-tree-bswap" } */
4 /* { dg-additional-options "-march=z900" { target s390-*-* } } */
6 struct L
{ unsigned int l
[2]; };
7 union U
{ double a
; struct L l
; } u
;
10 foo (double a
, struct L
*p
)
14 m
.l
[0] = (((l
.l
[1] & 0xff000000) >> 24)
15 | ((l
.l
[1] & 0x00ff0000) >> 8)
16 | ((l
.l
[1] & 0x0000ff00) << 8)
17 | ((l
.l
[1] & 0x000000ff) << 24));
18 m
.l
[1] = (((l
.l
[0] & 0xff000000) >> 24)
19 | ((l
.l
[0] & 0x00ff0000) >> 8)
20 | ((l
.l
[0] & 0x0000ff00) << 8)
21 | ((l
.l
[0] & 0x000000ff) << 24));
26 bar (double a
, struct L
*p
)
31 /* { dg-final { scan-tree-dump-times "32 bit bswap implementation found at" 2 "bswap" } } */