131
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-Ofast -fdump-tree-recip" } */
|
|
3
|
|
4 /* The main path doesn't have any multiplications.
|
|
5 Avoid introducing them in the recip pass. */
|
|
6
|
|
7 double res, res2, tmp;
|
|
8 void
|
|
9 foo (double a, double b, int c, int d)
|
|
10 {
|
|
11 tmp = 1.0 / __builtin_sqrt (a);
|
|
12 if (c)
|
|
13 res = tmp * tmp;
|
|
14
|
|
15 if (d)
|
|
16 res2 = a * tmp;
|
|
17 }
|
|
18
|
|
19 /* { dg-final { scan-tree-dump-not "Optimizing reciprocal sqrt multiplications" "recip" } } */
|
|
20 /* { dg-final { scan-tree-dump-not "Replacing squaring multiplication" "recip" } } */
|
|
21 /* { dg-final { scan-tree-dump-not "Replacing original division" "recip" } } */
|