1 /* A test for # of iterations analysis (signed counter cannot wrap) and final
4 /* { dg-options "-O2 -fdump-tree-optimized" } */
13 /* The loop should be removed completely. */
14 for (i
= 1; i
<= n
; i
++)
17 /* Should be replaced with return n * n; */
21 /* Since the loop is removed, there should be no addition. */
22 /* { dg-final { scan-tree-dump-times " \\+ " 0 "optimized" } } */
23 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
25 /* The if from the loop header copying remains in the code. */
26 /* { dg-final { scan-tree-dump-times "if " 1 "optimized" } } */