1 /* Verify straight-line strength reduction for simple pointer subtraction. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 f (int s
, int *c
, int *d
)
9 int a1
, a2
, a3
, *x1
, *x2
, *x3
;
17 return x1
== d
? x2
: x3
;
20 /* Note that since some branch prediction heuristics changed, the
21 calculations of x2 and x3 are pushed downward into the legs
22 of the conditional, changing the code presented to SLSR.
23 However, this proves to be a useful test for introducing an
24 initializer with a cast, so we'll keep it as is. */
26 /* There are 4 ' * ' instances in the decls (since "int * iftmp.0;" is
27 added), 2 parms, 3 in the code. The second one in the code may
28 be a widening multiply (for example, on AArch64). */
29 /* { dg-final { scan-tree-dump-times " w?\\* " 9 "optimized" } } */