6 /* transform into Abs node, gcc(+), icc(+), cl(+) */
11 /* transform into Abs node, gcc(+), icc(+), cl(+) */
12 double test_fabs(double a) {
16 /* transform info memcpy(test + strlen(test), "ab", 2), gcc(+), icc(-), cl(-) */
17 char *test_strcat(void) {
18 static char test[10] = "ab";
19 return strcat(test, "bc");
22 /* evaluate, gcc(+), icc(-), cl(-) */
23 char *test_strchr(void) {
24 return strchr("abc", 'b');
27 /* evaluate, gcc(+), icc(-), cl(-) */
28 char *test_strrchr(void) {
29 return strrchr("abc", 'b');
32 /* evaluate into 0, gcc(+), icc(-), cl(-) */
33 int test_strcmp1(const char *s) {
37 /* transform info -(*s), gcc(+), icc(-), cl(-) */
38 int test_strcmp2(const char *s) {
42 /* transform info *s, gcc(+), icc(-), cl(-) */
43 int test_strcmp3(const char *s) {
47 /* evaluate, gcc(+), icc(-), cl(-) */
48 int test_strcmp4(void) {
49 return strcmp("ab", "cd");
52 /* evaluate into 0, gcc(+), icc(-), cl(-) */
53 int test_strncmp1(const char *s, int len) {
54 return strncmp(s, s, len);
57 /* transform info -(*s), gcc(+), icc(-), cl(-) */
58 int test_strncmp2(const char *s) {
59 return strncmp("", s, 1);
62 /* transform info *s, gcc(+), icc(-), cl(-) */
63 int test_strncmp3(const char *s) {
64 return strncmp(s, "", 1);
67 /* evaluate, gcc(+), cl(-) */
68 int test_strncmp4(void) {
69 return strncmp("ab", "cd", 2);
72 /* evaluate, gcc(+), cl(-) */
73 int test_strncmp5(char *a, char *b) {
74 return strncmp(a, b, 0);
77 /* transform into *s = '\0', s, gcc(+), icc(-), cl(+) */
78 char *test_strcpy1(char *s) {
82 /* transform into memcpy(s, c, len(c)+1), gcc(+), icc(-), cl(+) */
83 char *test_strcpy2(char *s) {
84 return strcpy(s, "ab");
87 /* evaluate, gcc(+), icc(+), cl(+) */
88 int test_strlen(void) {
92 /* transform into d, gcc(+), icc(+), cl(-) */
93 void *test_memcpy1(void *d, void *s) {
94 return memcpy(d, s, 0);
97 /* transform into *(char *)d = *(char *)s, d, gcc(+), icc(+), cl(+) */
98 void *test_memcpy2(void *d, void *s) {
99 return memcpy(d, s, 1);
102 /* transform into *(short *)d = *(short *)s, d, gcc(+), icc(+), cl(+) */
103 void *test_memcpy3(short *d, short *s) {
104 return memcpy(d, s, 2);
107 /* transform into *(int *)d = *(int *)s, d, gcc(+), icc(+), cl(+) */
108 void *test_memcpy4(int *d, int *s) {
109 return memcpy(d, s, 4);
112 /* transform into *(long long *)d = *(long long *)s, d, gcc(+), icc(+), cl(+) */
113 void *test_memcpy5(long long *d, long long *s) {
114 return memcpy(d, s, 8);
117 /* transform into d, gcc(+), icc(+), cl(-) */
118 void *test_memset1(void *d, int C) {
119 return memset(d, C, 0);
122 /* transform into *(char *)d = (char)C, d, gcc(+), icc(+), cl(+) */
123 void *test_memset2(void *d, int C) {
124 return memset(d, C, 1);
127 /* transform into *(short *)d = (short)((char)C * 0x0101), d, gcc(+), icc(+), cl(+) */
128 void *test_memset3(short *d, int C) {
129 return memset(d, C, 2);
132 /* transform into *(int *)d = (int)((char)C * 0x01010101), d, gcc(+), icc(+), cl(+) */
133 void *test_memset4(int *d, int C) {
134 return memset(d, C, 4);
137 /* transform into *(long long *)d = (long long)((char)C) * 0x0101010101010101, d, gcc(+), icc(+), cl(+) */
138 void *test_memset5(long long *d, int C) {
139 return memset(d, C, 8);
142 /* evaluate into 1.0, gcc(+), icc(-), cl(-) */
143 double test_pow1(double a) {
147 /* evaluate into 1.0, gcc(+), icc(+), cl(-) */
148 double test_pow2(double a) {
152 /* transform into sqrt(a), gcc(-), icc(+), cl(-) */
153 double test_pow3(double a) {
157 /* evaluate into a, gcc(+), icc(+), cl(-) */
158 double test_pow4(double a) {
162 /* evaluate into 1.0/a. gcc(+), icc(+), cl(-) */
163 double test_pow5(double a) {
168 double test_exp1(void) {
172 /* transform into putchar, gcc(+), icc(-), cl(-) */
173 void test_printf1() {
177 /* transform into putchar(c), gcc(+), icc(+), cl(-) */
178 void test_printf2(char c) {
182 /* transform into puts(s), gcc(+), icc(-), cl(-) */
183 void test_printf3(char *s) {
187 /* transform into fwrite(s,strlen(s),f), gcc(+) OR fputs(s, f), icc(+), cl(-) */
188 void test_fprintf1(FILE *f) {
192 /* transform into fputc(c,f), gcc(+), icc(+), cl(-) */
193 void test_fprintf2(FILE *f, char c) {
197 /* transform into fputs(s,file), gcc(+), icc(+), cl(-) */
198 void test_fprintf3(FILE *f, char *s) {
202 /* transform into memcpy(d,s,strlen(s)+1,1), gcc(+), icc(-), cl(-) */
203 void test_sprintf1(char *d) {
207 /* transform into d[0] = c; d[1] = '\0';, gcc(-), icc(-), cl(-) */
208 void test_sprintf2(char *d, char c) {
212 /* transform into memcpy(d, s, strlen(s)+1, 1)), gcc(-), icc(-), cl(-) */
213 void test_sprintf3(char *d, char *s) {
217 /* transform fwrite(s,1,strlen(s),F), gcc(+), icc(-), cl(-) */
218 void test_fputs(FILE *f) {
222 /* evaluate to 0, gcc(-), icc(-), cl(-) */
223 int test_fwrite1(FILE *f, char *s, int l) {
224 return fwrite(s, 0, l, f);
227 /* evaluate to 0, gcc(-), icc(-), cl(-) */
228 int test_fwrite2(FILE *f, char *s, int l) {
229 return fwrite(s, l, 0, f);
232 /* transform into fputc(s[0],F) if this is usefull ..., gcc(-), icc(-), cl(-) */
233 int test_fwrite3(FILE *f, char *s, int l) {
234 return fwrite(s,1,1,f);
237 /* evaluate, gcc(+), cl(-) */
238 double test_sin1(void) {
242 /* transform into fsin, gcc(+), cl(-) */
243 double test_sin2(double x) {
247 /* transform into cos(x), gcc(+), icc(-), cl(-) */
248 double test_cos1(double x) {
252 /* evaluate, gcc(+), cl(-) */
253 double test_cos2(void) {
257 /* transform into fcos, gcc(+), cl(-) */
258 double test_cos3(double x) {
262 /* transform into cosf(x), gcc(+), icc(-), cl(-) */
263 float test_cosf1(float x) {
268 /* transform into cosl(x), gcc(+), icc(-), cl(-) */
269 long double test_cosl(long double x) {
274 /* evaluate, gcc(+), cl(-) */
275 double test_tan1(void) {
279 /* evaluate, gcc(-), cl(-) */
280 double test_asin1(void) {
284 /* evaluate, gcc(-), cl(-) */
285 double test_acos1(void) {
289 /* evaluate, gcc(+), cl(-) */
290 double test_atans1(void) {
294 /* evaluate into 0.0, gcc(+), icc(+), cl(-) */
295 double test_sqrt1(void) {
299 /* evaluate into 1.0, gcc(+), icc(+), cl(-) */
300 double test_sqrt2(void) {
304 /* evaluate, gcc(+), icc(+), cl(-) */
305 double test_sqrt3(void) {
309 /* transform exit(3) into a return 3, gcc(-), icc(-), cl(-) */
311 printf("%f\n", test_asin1());
312 printf("%f\n", test_acos1());