1 /* PR tree-optimization/78821 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mmovbe" } */
4 
5 unsigned short
foo(unsigned short * buf)6 foo (unsigned short *buf)
7 {
8   unsigned short a = buf[0];
9   return ((unsigned short) (a >> 8)) | (unsigned short) (a << 8);
10 }
11 
12 void
bar(char * buf,unsigned int data)13 bar (char *buf, unsigned int data)
14 {
15   buf[0] = data >> 8;
16   buf[1] = data;
17 }
18 
19 /* { dg-final { scan-assembler-times "movbew\[ \t\]" 2 } } */
20