1 /* Check that the redundant test removal code in the *cbranch_t split works
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
6 /* { dg-final { scan-assembler-not "extu|exts|negc" } } */
7 /* { dg-final { scan-assembler-times "tst" 6 } } */
9 /* { dg-final { scan-assembler-times "movt" 6 { target { ! sh2a } } } } */
10 /* { dg-final { scan-assembler-times "xor" 3 { target { ! sh2a } } } } */
12 /* { dg-final { scan-assembler-times "movt" 3 { target { sh2a } } } } */
13 /* { dg-final { scan-assembler-times "movrt" 3 { target { sh2a } } } } */
18 test_0 (int a
, int b
, int c
, int* d
)
20 /* non SH2A: 1x tst, 1x movt, 1x xor
21 SH2A: 1x tst, 1x movrt */
28 test_1 (int a
, int b
, int c
, int* d
)
37 test_2 (int a
, int b
, int c
, char* d
)
39 /* Check that there is no sign/zero-extension before the store.
40 non SH2A: 1x tst, 1x movt, 1x xor
41 SH2A: 1x tst, 1x movrt */
48 test_3 (int a
, int b
, int c
, char* d
)
50 /* Check that there is no sign/zero-extension before the store.
58 test_4 (int a
, int b
, int c
, char* d
)
67 test_5 (int a
, int b
, int c
, char* d
)
69 /* non SH2A: 1x tst, 1x movt, 1x xor
70 SH2A: 1x tst, 1x movrt */