Debian Codegraph @

gcc/testsuite/gcc.target/i386/movbe-5.c

raw
1 /* PR tree-optimization/78821 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mmovbe" } */
4
5 unsigned short
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
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 } } */