1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -fdump-tree-reassoc1" } */
4 double test1 (double x
, double y
, double z
, double weight
)
6 double tmp1
= x
/ weight
;
7 double tmp2
= y
/ weight
;
8 double tmp3
= -x
/ weight
;
9 return tmp1
+ tmp2
+ tmp3
;
12 /* The division should be un-distributed and all references to x should
15 /* { dg-final { scan-tree-dump-times "/" 1 "reassoc1" } } */
16 /* { dg-final { cleanup-tree-dump "reassoc1" } } */