]>
Commit | Line | Data |
---|---|---|
37ccb0ba SB |
1 | /* { dg-do compile } */ |
2 | /* { dg-options "-O2 -fdump-tree-optimized" } */ | |
3 | ||
4 | /* From PR21485. */ | |
5 | ||
6 | long | |
7 | NumSift (long *array, int b, unsigned long k) | |
8 | { | |
9 | if (b) | |
10 | if (array[k] < array[k + 1L]) | |
11 | ++k; | |
12 | return array[k]; | |
13 | } | |
14 | ||
15 | /* There should be only two loads left. And the final value in the | |
16 | if (b) arm should be if-converted: | |
17 | tem1 = array[k]; | |
18 | if (b) | |
19 | tem1 = MAX (array[k+1], tem1) | |
20 | return tem1; */ | |
21 | ||
22 | /* { dg-final { scan-tree-dump-times "= \\*" 2 "optimized" } } */ | |
23 | /* { dg-final { scan-tree-dump-times "MAX_EXPR" 1 "optimized" } } */ | |
24 | /* { dg-final { scan-tree-dump-times "= PHI" 1 "optimized" } } */ |