1 /* { dg-do compile } */
2 /* { dg-require-effective-target int128 } */
3 /* { dg-options "-O" } */
7 int32_t round32hi (const __int128_t arg
)
10 const int mshift
= 96;
11 const __int128_t M
= (~(__int128_t
) 0) << mshift
;
12 const __int128_t L
= (~M
) + 1;
13 const __int128_t L1
= ((__int128_t
) L
) >> 1;
14 const __int128_t Mlo
= ((__int128_t
) (~M
)) >> 1;
15 __int128_t vv
= arg
& M
;
17 if ((arg
& (L1
)) && ((arg
& Mlo
) || (arg
& L
)))
20 return (int32_t) (vv
>> SHIFT
);