annotate gcc/testsuite/gcc.dg/tree-ssa/backprop-3.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O -g -fdump-tree-backprop-details" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 /* Test a simple case of non-looping code in which one use ignores
kono
parents:
diff changeset
5 the sign but another doesn't. */
kono
parents:
diff changeset
6 #define TEST_FUNCTION(TYPE, SUFFIX) \
kono
parents:
diff changeset
7 TYPE \
kono
parents:
diff changeset
8 test##SUFFIX (TYPE x, int sel1, int sel2) \
kono
parents:
diff changeset
9 { \
kono
parents:
diff changeset
10 TYPE input = sel1 ? -x : __builtin_fabs##SUFFIX (x); \
kono
parents:
diff changeset
11 if (sel2) \
kono
parents:
diff changeset
12 return __builtin_cos##SUFFIX (input); \
kono
parents:
diff changeset
13 else \
kono
parents:
diff changeset
14 return __builtin_sin##SUFFIX (input); \
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 TEST_FUNCTION (float, f)
kono
parents:
diff changeset
18 TEST_FUNCTION (double, )
kono
parents:
diff changeset
19 TEST_FUNCTION (long double, l)
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 /* { dg-final { scan-tree-dump-times {Deleting[^\n]* = -x} 0 "backprop" } } */