1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-reassoc1" } */
3 
test3(unsigned int x,unsigned int y,unsigned int z,unsigned int weight,unsigned int w1,unsigned int w2,unsigned int w3)4 unsigned int test3 (unsigned int x, unsigned int y, unsigned int z,
5 		    unsigned int weight,
6 		    unsigned int w1, unsigned int w2, unsigned int w3)
7 {
8   unsigned int wtmp1 = w1 * weight;
9   unsigned int wtmp2 = w2 * weight;
10   unsigned int wtmp3 = w3 * weight;
11   unsigned int tmp1 = x * wtmp1;
12   unsigned int tmp2 = y * wtmp2;
13   unsigned int tmp3 = z * wtmp3;
14   return tmp1 + tmp2 + tmp3;
15 }
16 
17 /* The multiplication with weight should be un-distributed.
18    ???  This pattern is not recognized currently.  */
19 
20 /* { dg-final { scan-tree-dump-times "\\\*" 4 "reassoc1" } } */
21