1  /* { dg-options "isa_rev>=2 -mgp64" } */
       2  /* { dg-skip-if "bswap recognition needs expensive optimizations" { *-*-* } { "-O0" "-O1" } { "" } } */
       3  
       4  typedef unsigned long long uint64_t;
       5  
       6  NOMIPS16 uint64_t
       7  foo (uint64_t x)
       8  {
       9    return (((x << 56) & 0xff00000000000000ull)
      10  	  | ((x << 40) & 0xff000000000000ull)
      11  	  | ((x << 24) & 0xff0000000000ull)
      12  	  | ((x << 8) & 0xff00000000ull)
      13  	  | ((x >> 8) & 0xff000000)
      14  	  | ((x >> 24) & 0xff0000)
      15  	  | ((x >> 40) & 0xff00)
      16  	  | ((x >> 56) & 0xff));
      17  }
      18  
      19  /* { dg-final { scan-assembler "\tdsbh\t" } } */
      20  /* { dg-final { scan-assembler "\tdshd\t" } } */