diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/rotate-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/rotate-1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/rotate-1.c b/gcc/testsuite/gcc.target/i386/rotate-1.c new file mode 100644 index 00000000000..0b9ae5a8c13 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/rotate-1.c @@ -0,0 +1,16 @@ +/* Verify that rolb instruction is emitted on IA-32/x86-64. */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void foo (unsigned char *); + +int +main (void) +{ + unsigned char c = 0; + foo (&c); + c = c >> 1 | c << 7; + return c; +} + +/* { dg-final { scan-assembler "rolb" { target i?86-*-* x86_64-*-* } } } */ |