1 /* Check that the rotcr instruction is generated when shifting the
2 negated T bit on non-SH2A.
3 On SH2A expect a movrt rotr sequence instead. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1" } */
6
7 /* { dg-final { scan-assembler-times "rotcr" 1 { target { ! sh2a } } } } */
8 /* { dg-final { scan-assembler-times "tst" 1 { target { ! sh2a } } } } */
9 /* { dg-final { scan-assembler-times "movt" 1 { target { ! sh2a } } } } */
10
11 /* { dg-final { scan-assembler-times "movrt" 1 { target { sh2a } } } } */
12 /* { dg-final { scan-assembler-times "rotr" 1 { target { sh2a } } } } */
13
14 int
test_00(int a,int b)15 test_00 (int a, int b)
16 {
17 int r = a != b;
18 return r << 31;
19 }
20