Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / fma_1.h
blob72d7373946f45aa99e0203be96eda58278dd6efa
2 #ifndef fma_1
3 #define fma_1
5 TYPE __attribute__((sseregparm))
6 test_noneg_add_noneg_add (TYPE a, TYPE b, TYPE c)
8 return ((a * b) + c) * a + b;
11 TYPE __attribute__((sseregparm))
12 test_noneg_add_noneg_sub (TYPE a, TYPE b, TYPE c)
14 return ((a * b) + c) * a - b;
17 TYPE __attribute__((sseregparm))
18 test_noneg_add_neg_add (TYPE a, TYPE b, TYPE c)
20 return -((a * b) + c) * a + b;
23 TYPE __attribute__((sseregparm))
24 test_noneg_add_neg_sub (TYPE a, TYPE b, TYPE c)
26 return -((a * b) + c) * a - b;
29 TYPE __attribute__((sseregparm))
30 test_noneg_sub_noneg_add (TYPE a, TYPE b, TYPE c)
32 return ((a * b) - c) * a + b;
35 TYPE __attribute__((sseregparm))
36 test_noneg_sub_noneg_sub (TYPE a, TYPE b, TYPE c)
38 return ((a * b) - c) * a - b;
41 TYPE __attribute__((sseregparm))
42 test_noneg_sub_neg_add (TYPE a, TYPE b, TYPE c)
44 return -((a * b) - c) * a + b;
47 TYPE __attribute__((sseregparm))
48 test_noneg_sub_neg_sub (TYPE a, TYPE b, TYPE c)
50 return -((a * b) - c) * a - b;
53 TYPE __attribute__((sseregparm))
54 test_neg_add_noneg_add (TYPE a, TYPE b, TYPE c)
56 return (-(a * b) + c) * a + b;
59 TYPE __attribute__((sseregparm))
60 test_neg_add_noneg_sub (TYPE a, TYPE b, TYPE c)
62 return (-(a * b) + c) * a - b;
65 TYPE __attribute__((sseregparm))
66 test_neg_add_neg_add (TYPE a, TYPE b, TYPE c)
68 return -(-(a * b) + c) * a + b;
71 TYPE __attribute__((sseregparm))
72 test_neg_add_neg_sub (TYPE a, TYPE b, TYPE c)
74 return -(-(a * b) + c) * a - b;
77 TYPE __attribute__((sseregparm))
78 test_neg_sub_noneg_add (TYPE a, TYPE b, TYPE c)
80 return (-(a * b) - c) * a + b;
83 TYPE __attribute__((sseregparm))
84 test_neg_sub_noneg_sub (TYPE a, TYPE b, TYPE c)
86 return (-(a * b) - c) * a - b;
89 TYPE __attribute__((sseregparm))
90 test_neg_sub_neg_add (TYPE a, TYPE b, TYPE c)
92 return -(-(a * b) - c) * a + b;
95 TYPE __attribute__((sseregparm))
96 test_neg_sub_neg_sub (TYPE a, TYPE b, TYPE c)
98 return -(-(a * b) - c) * a - b;
101 #endif