1/* PR target/15693 */
2/* { dg-do compile { target sparc*-*-* } } */
3/* { dg-options "-O2" } */
4
5/* This used to fail on SPARC at -O2 because the combiner
6   produces a compare insn that was not rematched by the
7   compare expander.  */
8
9static __inline__ __attribute__ ((always_inline))
10int page_mapping (unsigned flags)
11{
12  if (1u & (flags >> 16))
13    return 1;
14  return 0;
15}
16void install_page (unsigned flags)
17{
18  if (__builtin_expect (!page_mapping (flags), 0))
19    __builtin_trap ();
20}
21