1 /* Check that the rotcr instruction is generated. */
2 /* { dg-do compile } */
3 /* { dg-options "-O1" } */
4 /* { dg-final { scan-assembler-times "rotcr" 4 } } */
5 /* { dg-final { scan-assembler-not "movt" } } */
6 /* { dg-final { scan-assembler-not "or\t" } } */
7 /* { dg-final { scan-assembler-not "rotr" } } */
8 /* { dg-final { scan-assembler-not "and" } } */
13 test_00 (int* a
, int* b
)
17 for (i
= 0; i
< 16; ++i
)
19 bool t
= a
[i
] == b
[i
];
20 r
= (t
<< 31) | (r
>> 1);
26 test_01 (int* a
, int* b
)
30 for (i
= 0; i
< 16; ++i
)
32 bool t
= a
[i
] == b
[i
];
33 r
= (t
<< 31) | (r
>> 2);
39 test_02 (int* a
, int* b
)
43 for (i
= 0; i
< 16; ++i
)
45 bool t
= a
[i
] == b
[i
];
46 r
= (t
<< 31) | (r
>> 3);
52 test_03 (const bool* a
)
56 for (i
= 0; i
< 32; ++i
)
59 r
= (t
<< 31) | (r
>> 1);