1 /* Verify straight-line strength reduction for add candidates in
2 which the stride is unknown and increments appear that differ
3 only in sign. Verify the increments are shared. */
5 /* { dg-do compile } */
6 /* { dg-options "-O3 -fdump-tree-optimized" } */
11 int a1
, a2
, a3
, a4
, x1
, x2
, x3
, x4
, x
;
15 a2
= 4 * s
; /* incr = +2 */
19 a4
= 5 * s
; /* incr = -2 */
21 x
= x1
+ x2
+ x3
+ x4
;
25 /* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
26 /* { dg-final { scan-tree-dump-times " \\* -2" 0 "optimized" } } */