blob: 99986cfdbc61724277b9a604b3a7351b0834cdaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* { dg-do compile } */
/* { dg-options "-O1 -fscalar-evolutions -ftree-elim-checks -fdump-tree-scev-details -fdump-tree-elck-details -fdump-tree-optimized" } */
void remove_me (void);
int main(void)
{
int a;
int b = 22;
/* loop_1 runs exactly 28 times. */
for (a = 22; a < 50; a++) /* a -> {22, +, 1}_1 */
{
if (a > b) /* This condition is always false. */
remove_me ();
b = b + 2; /* b -> {22, +, 2}_1 */
}
}
/* { dg-final { scan-tree-dump-times "nb_iterations 28" 1 "scev"} } */
/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */
|