libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / sqrt_div.c
blob2ae481b79826e343259784748e1a493810bee72c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ffast-math -fdump-tree-forwprop-details" } */
3 /* { dg-require-effective-target c99_runtime } */
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; \
13 T(1, double, sqrt)
15 /* { dg-final { scan-tree-dump "gimple_simplified to t2_\[0-9\]+ = __builtin_sqrt .x_\[0-9\]*.D.." "forwprop1" } } */
17 T(2, float, sqrtf )
19 /* { dg-final { scan-tree-dump "gimple_simplified to t2_\[0-9\]+ = __builtin_sqrtf .x_\[0-9\]*.D.." "forwprop1" } } */
21 T(3, long double, sqrtl)
23 /* { dg-final { scan-tree-dump "gimple_simplified to t2_\[0-9\]+ = __builtin_sqrtl .x_\[0-9\]*.D.." "forwprop1" } } */