Remove not needed __builtin_expect due to malloc predictor.
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr53976-1.c
blob716a0095442e0b5916887cd61ba3b2109b5fe677
1 /* Check that the SH specific sh_optimize_sett_clrt RTL optimization pass
2 works as expected. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5 /* { dg-final { scan-assembler-times "clrt" 2 } } */
6 /* { dg-final { scan-assembler-times "sett" 1 } } */
8 long long
9 test_00 (long long a, long long b, long long c, int d)
11 /* One of the blocks should have a clrt and the other one should not. */
12 if (d > 5)
13 return a + b;
14 else
15 return a + c;
18 long long
19 test_01 (long long a, long long b)
21 /* Must see a clrt because T bit is undefined at function entry. */
22 return a + b;
25 int
26 test_02 (int a, int b, int c, int d)
28 /* One of the blocks should have a sett and the other one should not. */
29 if (d > 4)
30 return a + b + 1;
31 else
32 return a + c + 1;