1 /* Check that the redundant test removal code in the *cbranch_t split works
2 as expected on non-SH2A targets. Because on SH2A the movrt instruction
3 is used, this test is re-used and checked differently in pr51244-16.c. */
4 /* { dg-do compile { target "sh*-*-*" } } */
5 /* { dg-options "-O2" } */
6 /* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
7 /* { dg-final { scan-assembler-times "tst" 6 } } */
8 /* { dg-final { scan-assembler-times "movt" 6 } } */
9 /* { dg-final { scan-assembler-times "xor" 3 } } */
10 /* { dg-final { scan-assembler-not "extu|exts|negc" } } */
15 test_0 (int a, int b, int c, int* d)
17 /* non SH2A: 1x tst, 1x movt, 1x xor
18 SH2A: 1x tst, 1x movrt */
25 test_1 (int a, int b, int c, int* d)
34 test_2 (int a, int b, int c, char* d)
36 /* Check that there is no sign/zero-extension before the store.
37 non SH2A: 1x tst, 1x movt, 1x xor
38 SH2A: 1x tst, 1x movrt */
45 test_3 (int a, int b, int c, char* d)
47 /* Check that there is no sign/zero-extension before the store.
55 test_4 (int a, int b, int c, char* d)
64 test_5 (int a, int b, int c, char* d)
66 /* non SH2A: 1x tst, 1x movt, 1x xor
67 SH2A: 1x tst, 1x movrt */