6 /* transform into Abs node, gcc(+), icc(+), cl(+) */
11 /* transform into Abs node, gcc(+), icc(+), cl(?) */
12 long test_labs(long a) {
16 /* transform into Abs node, gcc(+), icc(+), cl(+) */
17 double test_fabs(double a) {
21 /* transform info memcpy(test + strlen(test), "ab", 2), gcc(+), icc(-), cl(-) */
22 char *test_strcat(void) {
23 static char test[10] = "ab";
24 return strcat(test, "bc");
27 /* evaluate, gcc(+), icc(-), cl(-) */
28 char *test_strchr(void) {
29 return strchr("abc", 'b');
32 /* evaluate, gcc(+), icc(-), cl(-) */
33 char *test_strrchr(void) {
34 return strrchr("abc", 'b');
37 /* evaluate into 0, gcc(+), icc(-), cl(-) */
38 int test_strcmp1(const char *s) {
42 /* transform info -(*s), gcc(+), icc(-), cl(-) */
43 int test_strcmp2(const char *s) {
47 /* transform info *s, gcc(+), icc(-), cl(-) */
48 int test_strcmp3(const char *s) {
52 /* evaluate, gcc(+), icc(-), cl(-) */
53 int test_strcmp4(void) {
54 return strcmp("ab", "cd");
57 /* evaluate into 0, gcc(+), icc(-), cl(-) */
58 int test_strncmp1(const char *s, int len) {
59 return strncmp(s, s, len);
62 /* transform info -(*s), gcc(+), icc(-), cl(-) */
63 int test_strncmp2(const char *s) {
64 return strncmp("", s, 1);
67 /* transform info *s, gcc(+), icc(-), cl(-) */
68 int test_strncmp3(const char *s) {
69 return strncmp(s, "", 1);
72 /* evaluate, gcc(+), cl(-) */
73 int test_strncmp4(void) {
74 return strncmp("ab", "cd", 2);
77 /* evaluate, gcc(+), cl(-) */
78 int test_strncmp5(char *a, char *b) {
79 return strncmp(a, b, 0);
82 /* transform into *s = '\0', s, gcc(+), icc(-), cl(+) */
83 char *test_strcpy1(char *s) {
87 /* transform into memcpy(s, c, len(c)+1), gcc(+), icc(-), cl(+) */
88 char *test_strcpy2(char *s) {
89 return strcpy(s, "ab");
92 /* evaluate, gcc(+), icc(+), cl(+) */
93 int test_strlen(void) {
97 /* transform into d, gcc(+), icc(+), cl(-) */
98 void *test_memcpy1(void *d, void *s) {
99 return memcpy(d, s, 0);
102 /* transform into *(char *)d = *(char *)s, d, gcc(+), icc(+), cl(+) */
103 void *test_memcpy2(void *d, void *s) {
104 return memcpy(d, s, 1);
107 /* transform into *(short *)d = *(short *)s, d, gcc(+), icc(+), cl(+) */
108 void *test_memcpy3(short *d, short *s) {
109 return memcpy(d, s, 2);
112 /* transform into *(int *)d = *(int *)s, d, gcc(+), icc(+), cl(+) */
113 void *test_memcpy4(int *d, int *s) {
114 return memcpy(d, s, 4);
117 /* transform into *(long long *)d = *(long long *)s, d, gcc(+), icc(+), cl(+) */
118 void *test_memcpy5(long long *d, long long *s) {
119 return memcpy(d, s, 8);
122 /* transform into d, gcc(+), icc(+), cl(-) */
123 void *test_memset1(void *d, int C) {
124 return memset(d, C, 0);
127 /* transform into *(char *)d = (char)C, d, gcc(+), icc(+), cl(+) */
128 void *test_memset2(void *d, int C) {
129 return memset(d, C, 1);
132 /* transform into *(short *)d = (short)((char)C * 0x0101), d, gcc(+), icc(+), cl(+) */
133 void *test_memset3(short *d, int C) {
134 return memset(d, C, 2);
137 /* transform into *(int *)d = (int)((char)C * 0x01010101), d, gcc(+), icc(+), cl(+) */
138 void *test_memset4(int *d, int C) {
139 return memset(d, C, 4);
142 /* transform into *(long long *)d = (long long)((char)C) * 0x0101010101010101, d, gcc(+), icc(+), cl(+) */
143 void *test_memset5(long long *d, int C) {
144 return memset(d, C, 8);
147 /* evaluate into 1.0, gcc(+), icc(-), cl(-) */
148 double test_pow1(double a) {
152 /* evaluate into 1.0, gcc(+), icc(+), cl(-) */
153 double test_pow2(double a) {
157 /* transform into sqrt(a), gcc(-), icc(+), cl(-) */
158 double test_pow3(double a) {
162 /* evaluate into a, gcc(+), icc(+), cl(-) */
163 double test_pow4(double a) {
167 /* evaluate into 1.0/a. gcc(+), icc(+), cl(-) */
168 double test_pow5(double a) {
172 /* evaluate into 1.0 gcc(+), icc(+), cl(-) */
173 double test_exp1(void) {
177 /* evaluate into M_E gcc(+), icc(-), cl(?) */
178 double test_exp2(void) {
182 /* evaluate gcc(-), icc(-), cl(?) */
183 double test_exp3(void) {
187 /* evaluate into 0.0 gcc(+), icc(-), cl(?) */
188 double test_log1(void) {
192 /* evaluate into 0.0 gcc(+), icc(-), cl(?) */
193 double test_log2(void) {
197 /* evaluate into 0.0 gcc(+), icc(-), cl(?) */
198 double test_log3(void) {
202 /* evaluate into 0.0 gcc(+), icc(-), cl(?) */
203 double test_trunc1(void) {
207 /* evaluate into 0.0 gcc(+), icc(-), cl(?) */
208 double test_trunc2(void) {
212 /* transform into putchar, gcc(+), icc(-), cl(-) */
213 void test_printf1() {
217 /* transform into putchar(c), gcc(+), icc(+), cl(-) */
218 void test_printf2(char c) {
222 /* transform into puts(s), gcc(+), icc(-), cl(-) */
223 void test_printf3(char *s) {
227 /* transform into fwrite(s,strlen(s),f), gcc(+) OR fputs(s, f), icc(+), cl(-) */
228 void test_fprintf1(FILE *f) {
232 /* transform into fputc(c,f), gcc(+), icc(+), cl(-) */
233 void test_fprintf2(FILE *f, char c) {
237 /* transform into fputs(s,file), gcc(+), icc(+), cl(-) */
238 void test_fprintf3(FILE *f, char *s) {
242 /* transform into memcpy(d,s,strlen(s)+1,1), gcc(+), icc(-), cl(-) */
243 void test_sprintf1(char *d) {
247 /* transform into d[0] = c; d[1] = '\0';, gcc(-), icc(-), cl(-) */
248 void test_sprintf2(char *d, char c) {
252 /* transform into memcpy(d, s, strlen(s)+1, 1)), gcc(-), icc(-), cl(-) */
253 void test_sprintf3(char *d, char *s) {
257 /* transform fwrite(s,1,strlen(s),F), gcc(+), icc(-), cl(-) */
258 void test_fputs(FILE *f) {
262 /* evaluate to 0, gcc(-), icc(-), cl(-) */
263 int test_fwrite1(FILE *f, char *s, int l) {
264 return fwrite(s, 0, l, f);
267 /* evaluate to 0, gcc(-), icc(-), cl(-) */
268 int test_fwrite2(FILE *f, char *s, int l) {
269 return fwrite(s, l, 0, f);
272 /* transform into fputc(s[0],F) if this is usefull ..., gcc(-), icc(-), cl(-) */
273 int test_fwrite3(FILE *f, char *s, int l) {
274 return fwrite(s,1,1,f);
277 /* evaluate, gcc(+), cl(-) */
278 double test_sin1(void) {
282 /* transform into fsin, gcc(+), cl(-) */
283 double test_sin2(double x) {
287 /* transform into cos(x), gcc(+), icc(-), cl(-) */
288 double test_cos1(double x) {
292 /* evaluate, gcc(+), cl(-) */
293 double test_cos2(void) {
297 /* transform into fcos, gcc(+), cl(-) */
298 double test_cos3(double x) {
302 /* transform into cosf(x), gcc(+), icc(-), cl(-) */
303 float test_cosf1(float x) {
308 /* transform into cosl(x), gcc(+), icc(-), cl(-) */
309 long double test_cosl(long double x) {
314 /* evaluate, gcc(+), cl(-) */
315 double test_tan1(void) {
319 /* evaluate, gcc(-), cl(-) */
320 double test_asin1(void) {
324 /* evaluate, gcc(-), cl(-) */
325 double test_acos1(void) {
329 /* evaluate, gcc(+), cl(-) */
330 double test_atans1(void) {
334 /* evaluate into 0.0, gcc(+), icc(+), cl(-) */
335 double test_sqrt1(void) {
339 /* evaluate into 1.0, gcc(+), icc(+), cl(-) */
340 double test_sqrt2(void) {
344 /* evaluate, gcc(+), icc(+), cl(-) */
345 double test_sqrt3(void) {
349 /* evaluate into 0.0, gcc(+), icc(-), cl(?) */
350 double test_cbrt1(void) {
354 /* evaluate into 1.0, gcc(+), icc(-), cl(?) */
355 double test_cbrt2(void) {
359 /* evaluate into -1.0, gcc(+), icc(-), cl(?) */
360 double test_cbrt3(void) {
364 /* transform exit(3) into a return 3, gcc(-), icc(-), cl(-) */
366 printf("%f\n", test_asin1());
367 printf("%f\n", test_acos1());