Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/sqrt_div.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -fdump-tree-forwprop-details" } */
3 /* { dg-require-effective-target c99_runtime } */
4
5 #define T(n, type, fname) \
6 type f##n (type x) \
7 { \
8 type t1 = __builtin_##fname (x); \
9 type t2 = x / t1; \
10 return t2; \
11 }
12
13 T(1, double, sqrt)
14
15 /* { dg-final { scan-tree-dump "gimple_simplified to t2_\[0-9\]+ = __builtin_sqrt .x_\[0-9\]*.D.." "forwprop1" } } */
16
17 T(2, float, sqrtf )
18
19 /* { dg-final { scan-tree-dump "gimple_simplified to t2_\[0-9\]+ = __builtin_sqrtf .x_\[0-9\]*.D.." "forwprop1" } } */
20
21 T(3, long double, sqrtl)
22
23 /* { dg-final { scan-tree-dump "gimple_simplified to t2_\[0-9\]+ = __builtin_sqrtl .x_\[0-9\]*.D.." "forwprop1" } } */