* tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / backprop-2.c
blobd54fd36e2fb3c8836adaaa7fe5ddd4cc4d8cdb00
1 /* { dg-do compile } */
2 /* { dg-options "-O -g -fdump-tree-backprop-details" } */
4 /* Test a simple case of non-looping code in which both uses ignore
5 the sign but only one definition is a sign op. */
6 #define TEST_FUNCTION(TYPE, SUFFIX) \
7 TYPE \
8 test##SUFFIX (TYPE x, int sel1, int sel2) \
9 { \
10 TYPE input = sel1 ? -x : x + 1; \
11 if (sel2) \
12 return __builtin_cos##SUFFIX (input); \
13 else \
14 return __builtin_cosh##SUFFIX (input); \
17 TEST_FUNCTION (float, f)
18 TEST_FUNCTION (double, )
19 TEST_FUNCTION (long double, l)
21 /* { dg-final { scan-tree-dump-times {Deleting[^\n]* = -x} 3 "backprop" } } */