1 /* Check that the rotr and rotl instructions are generated. */
2 /* { dg-do compile { target "sh*-*-*" } } */
3 /* { dg-options "-O1" } */
4 /* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
5 /* { dg-final { scan-assembler-times "rotr" 2 } } */
6 /* { dg-final { scan-assembler-times "rotl" 2 } } */
11 return (a << 1) | ((a >> 31) & 1);
17 return (a << 1) | ((unsigned int)a >> 31);
23 return ((unsigned int)a >> 1) | (a << 31);
29 return ((a >> 1) & 0x7FFFFFFF) | (a << 31);