1; RUN: opt < %s -mtriple=x86_64-- -inferattrs -S | FileCheck %s
2; RUN: opt < %s -mtriple=x86_64-- -passes=inferattrs -S | FileCheck %s
3; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -inferattrs -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-DARWIN %s
4; RUN: opt < %s -mtriple=x86_64-unknown-linux -inferattrs -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-LINUX %s
5; RUN: opt < %s -mtriple=nvptx -inferattrs -S | FileCheck -check-prefix=CHECK-NVPTX %s
6
7; operator new routines
8declare i8* @_Znwj(i64)
9; CHECK: declare noalias nonnull i8* @_Znwj(i64)
10declare i8* @_Znwm(i64)
11; CHECK: declare noalias nonnull i8* @_Znwm(i64)
12
13declare i32 @__nvvm_reflect(i8*)
14; CHECK-NVPTX: declare i32 @__nvvm_reflect(i8*) [[G0:#[0-9]+]]
15; CHECK-NVPTX: attributes [[G0]] = { nounwind readnone }
16
17
18; Check all the libc functions (thereby also exercising the prototype check).
19; Note that it's OK to modify these as attributes might be missing. These checks
20; reflect the currently inferred attributes.
21
22; Use an opaque pointer type for all the (possibly opaque) structs.
23%opaque = type opaque
24
25; CHECK: declare double @__cospi(double)
26declare double @__cospi(double)
27
28; CHECK: declare float @__cospif(float)
29declare float @__cospif(float)
30
31; CHECK: declare double @__sinpi(double)
32declare double @__sinpi(double)
33
34; CHECK: declare float @__sinpif(float)
35declare float @__sinpif(float)
36
37; CHECK: declare i32 @abs(i32)
38declare i32 @abs(i32)
39
40; CHECK: declare i32 @access(i8* nocapture readonly, i32) [[G0:#[0-9]+]]
41declare i32 @access(i8*, i32)
42
43; CHECK: declare double @acos(double)
44declare double @acos(double)
45
46; CHECK: declare float @acosf(float)
47declare float @acosf(float)
48
49; CHECK: declare double @acosh(double)
50declare double @acosh(double)
51
52; CHECK: declare float @acoshf(float)
53declare float @acoshf(float)
54
55; CHECK: declare x86_fp80 @acoshl(x86_fp80)
56declare x86_fp80 @acoshl(x86_fp80)
57
58; CHECK: declare x86_fp80 @acosl(x86_fp80)
59declare x86_fp80 @acosl(x86_fp80)
60
61; CHECK: declare double @asin(double)
62declare double @asin(double)
63
64; CHECK: declare float @asinf(float)
65declare float @asinf(float)
66
67; CHECK: declare double @asinh(double)
68declare double @asinh(double)
69
70; CHECK: declare float @asinhf(float)
71declare float @asinhf(float)
72
73; CHECK: declare x86_fp80 @asinhl(x86_fp80)
74declare x86_fp80 @asinhl(x86_fp80)
75
76; CHECK: declare x86_fp80 @asinl(x86_fp80)
77declare x86_fp80 @asinl(x86_fp80)
78
79; CHECK: declare double @atan(double)
80declare double @atan(double)
81
82; CHECK: declare double @atan2(double, double)
83declare double @atan2(double, double)
84
85; CHECK: declare float @atan2f(float, float)
86declare float @atan2f(float, float)
87
88; CHECK: declare x86_fp80 @atan2l(x86_fp80, x86_fp80)
89declare x86_fp80 @atan2l(x86_fp80, x86_fp80)
90
91; CHECK: declare float @atanf(float)
92declare float @atanf(float)
93
94; CHECK: declare double @atanh(double)
95declare double @atanh(double)
96
97; CHECK: declare float @atanhf(float)
98declare float @atanhf(float)
99
100; CHECK: declare x86_fp80 @atanhl(x86_fp80)
101declare x86_fp80 @atanhl(x86_fp80)
102
103; CHECK: declare x86_fp80 @atanl(x86_fp80)
104declare x86_fp80 @atanl(x86_fp80)
105
106; CHECK: declare double @atof(i8* nocapture) [[G1:#[0-9]+]]
107declare double @atof(i8*)
108
109; CHECK: declare i32 @atoi(i8* nocapture) [[G1]]
110declare i32 @atoi(i8*)
111
112; CHECK: declare i64 @atol(i8* nocapture) [[G1]]
113declare i64 @atol(i8*)
114
115; CHECK: declare i64 @atoll(i8* nocapture) [[G1]]
116declare i64 @atoll(i8*)
117
118; CHECK: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G1]]
119declare i32 @bcmp(i8*, i8*, i64)
120
121; CHECK: declare void @bcopy(i8* nocapture readonly, i8* nocapture, i64) [[G0]]
122declare void @bcopy(i8*, i8*, i64)
123
124; CHECK: declare void @bzero(i8* nocapture, i64) [[G0]]
125declare void @bzero(i8*, i64)
126
127; CHECK: declare noalias i8* @calloc(i64, i64) [[G0]]
128declare i8* @calloc(i64, i64)
129
130; CHECK: declare double @cbrt(double)
131declare double @cbrt(double)
132
133; CHECK: declare float @cbrtf(float)
134declare float @cbrtf(float)
135
136; CHECK: declare x86_fp80 @cbrtl(x86_fp80)
137declare x86_fp80 @cbrtl(x86_fp80)
138
139; CHECK: declare double @ceil(double)
140declare double @ceil(double)
141
142; CHECK: declare float @ceilf(float)
143declare float @ceilf(float)
144
145; CHECK: declare x86_fp80 @ceill(x86_fp80)
146declare x86_fp80 @ceill(x86_fp80)
147
148; CHECK: declare i32 @chmod(i8* nocapture readonly, i16 zeroext) [[G0]]
149declare i32 @chmod(i8*, i16 zeroext)
150
151; CHECK: declare i32 @chown(i8* nocapture readonly, i32, i32) [[G0]]
152declare i32 @chown(i8*, i32, i32)
153
154; CHECK: declare void @clearerr(%opaque* nocapture) [[G0]]
155declare void @clearerr(%opaque*)
156
157; CHECK: declare i32 @closedir(%opaque* nocapture) [[G0]]
158declare i32 @closedir(%opaque*)
159
160; CHECK: declare double @copysign(double, double)
161declare double @copysign(double, double)
162
163; CHECK: declare float @copysignf(float, float)
164declare float @copysignf(float, float)
165
166; CHECK: declare x86_fp80 @copysignl(x86_fp80, x86_fp80)
167declare x86_fp80 @copysignl(x86_fp80, x86_fp80)
168
169; CHECK: declare double @cos(double)
170declare double @cos(double)
171
172; CHECK: declare float @cosf(float)
173declare float @cosf(float)
174
175; CHECK: declare double @cosh(double)
176declare double @cosh(double)
177
178; CHECK: declare float @coshf(float)
179declare float @coshf(float)
180
181; CHECK: declare x86_fp80 @coshl(x86_fp80)
182declare x86_fp80 @coshl(x86_fp80)
183
184; CHECK: declare x86_fp80 @cosl(x86_fp80)
185declare x86_fp80 @cosl(x86_fp80)
186
187; CHECK: declare i8* @ctermid(i8* nocapture) [[G0]]
188declare i8* @ctermid(i8*)
189
190; CHECK: declare double @exp(double)
191declare double @exp(double)
192
193; CHECK: declare double @exp2(double)
194declare double @exp2(double)
195
196; CHECK: declare float @exp2f(float)
197declare float @exp2f(float)
198
199; CHECK: declare x86_fp80 @exp2l(x86_fp80)
200declare x86_fp80 @exp2l(x86_fp80)
201
202; CHECK: declare float @expf(float)
203declare float @expf(float)
204
205; CHECK: declare x86_fp80 @expl(x86_fp80)
206declare x86_fp80 @expl(x86_fp80)
207
208; CHECK: declare double @expm1(double)
209declare double @expm1(double)
210
211; CHECK: declare float @expm1f(float)
212declare float @expm1f(float)
213
214; CHECK: declare x86_fp80 @expm1l(x86_fp80)
215declare x86_fp80 @expm1l(x86_fp80)
216
217; CHECK: declare double @fabs(double)
218declare double @fabs(double)
219
220; CHECK: declare float @fabsf(float)
221declare float @fabsf(float)
222
223; CHECK: declare x86_fp80 @fabsl(x86_fp80)
224declare x86_fp80 @fabsl(x86_fp80)
225
226; CHECK: declare i32 @fclose(%opaque* nocapture) [[G0]]
227declare i32 @fclose(%opaque*)
228
229; CHECK: declare noalias %opaque* @fdopen(i32, i8* nocapture readonly) [[G0]]
230declare %opaque* @fdopen(i32, i8*)
231
232; CHECK: declare i32 @feof(%opaque* nocapture) [[G0]]
233declare i32 @feof(%opaque*)
234
235; CHECK: declare i32 @ferror(%opaque* nocapture) [[G1]]
236declare i32 @ferror(%opaque*)
237
238; CHECK: declare i32 @fflush(%opaque* nocapture) [[G0]]
239declare i32 @fflush(%opaque*)
240
241; CHECK: declare i32 @ffs(i32)
242declare i32 @ffs(i32)
243
244; CHECK: declare i32 @ffsl(i64)
245declare i32 @ffsl(i64)
246
247; CHECK: declare i32 @ffsll(i64)
248declare i32 @ffsll(i64)
249
250; CHECK: declare i32 @fgetc(%opaque* nocapture) [[G0]]
251declare i32 @fgetc(%opaque*)
252
253; CHECK: declare i32 @fgetpos(%opaque* nocapture, i64* nocapture) [[G0]]
254declare i32 @fgetpos(%opaque*, i64*)
255
256; CHECK: declare i8* @fgets(i8*, i32, %opaque* nocapture) [[G0]]
257declare i8* @fgets(i8*, i32, %opaque*)
258
259; CHECK: declare i32 @fileno(%opaque* nocapture) [[G0]]
260declare i32 @fileno(%opaque*)
261
262; CHECK: declare void @flockfile(%opaque* nocapture) [[G0]]
263declare void @flockfile(%opaque*)
264
265; CHECK: declare double @floor(double)
266declare double @floor(double)
267
268; CHECK: declare float @floorf(float)
269declare float @floorf(float)
270
271; CHECK: declare x86_fp80 @floorl(x86_fp80)
272declare x86_fp80 @floorl(x86_fp80)
273
274; CHECK: declare i32 @fls(i32)
275declare i32 @fls(i32)
276
277; CHECK: declare i32 @flsl(i64)
278declare i32 @flsl(i64)
279
280; CHECK: declare i32 @flsll(i64)
281declare i32 @flsll(i64)
282
283; CHECK: declare double @fmax(double, double)
284declare double @fmax(double, double)
285
286; CHECK: declare float @fmaxf(float, float)
287declare float @fmaxf(float, float)
288
289; CHECK: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80)
290declare x86_fp80 @fmaxl(x86_fp80, x86_fp80)
291
292; CHECK: declare double @fmin(double, double)
293declare double @fmin(double, double)
294
295; CHECK: declare float @fminf(float, float)
296declare float @fminf(float, float)
297
298; CHECK: declare x86_fp80 @fminl(x86_fp80, x86_fp80)
299declare x86_fp80 @fminl(x86_fp80, x86_fp80)
300
301; CHECK: declare double @fmod(double, double)
302declare double @fmod(double, double)
303
304; CHECK: declare float @fmodf(float, float)
305declare float @fmodf(float, float)
306
307; CHECK: declare x86_fp80 @fmodl(x86_fp80, x86_fp80)
308declare x86_fp80 @fmodl(x86_fp80, x86_fp80)
309
310; CHECK: declare noalias %opaque* @fopen(i8* nocapture readonly, i8* nocapture readonly) [[G0]]
311declare %opaque* @fopen(i8*, i8*)
312
313; CHECK: declare i32 @fprintf(%opaque* nocapture, i8* nocapture readonly, ...) [[G0]]
314declare i32 @fprintf(%opaque*, i8*, ...)
315
316; CHECK: declare i32 @fputc(i32, %opaque* nocapture) [[G0]]
317declare i32 @fputc(i32, %opaque*)
318
319; CHECK: declare i32 @fputs(i8* nocapture readonly, %opaque* nocapture) [[G0]]
320declare i32 @fputs(i8*, %opaque*)
321
322; CHECK: declare i64 @fread(i8* nocapture, i64, i64, %opaque* nocapture) [[G0]]
323declare i64 @fread(i8*, i64, i64, %opaque*)
324
325; CHECK: declare void @free(i8* nocapture) [[G0]]
326declare void @free(i8*)
327
328; CHECK: declare double @frexp(double, i32* nocapture) [[G0]]
329declare double @frexp(double, i32*)
330
331; CHECK: declare float @frexpf(float, i32* nocapture) [[G0]]
332declare float @frexpf(float, i32*)
333
334; CHECK: declare x86_fp80 @frexpl(x86_fp80, i32* nocapture) [[G0]]
335declare x86_fp80 @frexpl(x86_fp80, i32*)
336
337; CHECK: declare i32 @fscanf(%opaque* nocapture, i8* nocapture readonly, ...) [[G0]]
338declare i32 @fscanf(%opaque*, i8*, ...)
339
340; CHECK: declare i32 @fseek(%opaque* nocapture, i64, i32) [[G0]]
341declare i32 @fseek(%opaque*, i64, i32)
342
343; CHECK: declare i32 @fseeko(%opaque* nocapture, i64, i32) [[G0]]
344declare i32 @fseeko(%opaque*, i64, i32)
345
346; CHECK-LINUX: declare i32 @fseeko64(%opaque* nocapture, i64, i32) [[G0]]
347declare i32 @fseeko64(%opaque*, i64, i32)
348
349; CHECK: declare i32 @fsetpos(%opaque* nocapture, i64*) [[G0]]
350declare i32 @fsetpos(%opaque*, i64*)
351
352; CHECK: declare i32 @fstat(i32, %opaque* nocapture) [[G0]]
353declare i32 @fstat(i32, %opaque*)
354
355; CHECK-LINUX: declare i32 @fstat64(i32, %opaque* nocapture) [[G0]]
356declare i32 @fstat64(i32, %opaque*)
357
358; CHECK: declare i32 @fstatvfs(i32, %opaque* nocapture) [[G0]]
359declare i32 @fstatvfs(i32, %opaque*)
360
361; CHECK-LINUX: declare i32 @fstatvfs64(i32, %opaque* nocapture) [[G0]]
362declare i32 @fstatvfs64(i32, %opaque*)
363
364; CHECK: declare i64 @ftell(%opaque* nocapture) [[G0]]
365declare i64 @ftell(%opaque*)
366
367; CHECK: declare i64 @ftello(%opaque* nocapture) [[G0]]
368declare i64 @ftello(%opaque*)
369
370; CHECK-LINUX: declare i64 @ftello64(%opaque* nocapture) [[G0]]
371declare i64 @ftello64(%opaque*)
372
373; CHECK: declare i32 @ftrylockfile(%opaque* nocapture) [[G0]]
374declare i32 @ftrylockfile(%opaque*)
375
376; CHECK: declare void @funlockfile(%opaque* nocapture) [[G0]]
377declare void @funlockfile(%opaque*)
378
379; CHECK: declare i64 @fwrite(i8* nocapture, i64, i64, %opaque* nocapture) [[G0]]
380declare i64 @fwrite(i8*, i64, i64, %opaque*)
381
382; CHECK: declare i32 @getc(%opaque* nocapture) [[G0]]
383declare i32 @getc(%opaque*)
384
385; CHECK: declare i32 @getc_unlocked(%opaque* nocapture) [[G0]]
386declare i32 @getc_unlocked(%opaque*)
387
388; CHECK: declare i32 @getchar()
389declare i32 @getchar()
390
391; CHECK: declare i8* @getenv(i8* nocapture) [[G1]]
392declare i8* @getenv(i8*)
393
394; CHECK: declare i32 @getitimer(i32, %opaque* nocapture) [[G0]]
395declare i32 @getitimer(i32, %opaque*)
396
397; CHECK: declare i32 @getlogin_r(i8* nocapture, i64) [[G0]]
398declare i32 @getlogin_r(i8*, i64)
399
400; CHECK: declare %opaque* @getpwnam(i8* nocapture readonly) [[G0]]
401declare %opaque* @getpwnam(i8*)
402
403; CHECK: declare i8* @gets(i8*)
404declare i8* @gets(i8*)
405
406; CHECK: declare i32 @gettimeofday(%opaque* nocapture, i8* nocapture) [[G0]]
407declare i32 @gettimeofday(%opaque*, i8*)
408
409; CHECK: declare i32 @isascii(i32)
410declare i32 @isascii(i32)
411
412; CHECK: declare i32 @isdigit(i32)
413declare i32 @isdigit(i32)
414
415; CHECK: declare i64 @labs(i64)
416declare i64 @labs(i64)
417
418; CHECK: declare i32 @lchown(i8* nocapture readonly, i32, i32) [[G0]]
419declare i32 @lchown(i8*, i32, i32)
420
421; CHECK: declare double @ldexp(double, i32)
422declare double @ldexp(double, i32)
423
424; CHECK: declare float @ldexpf(float, i32)
425declare float @ldexpf(float, i32)
426
427; CHECK: declare x86_fp80 @ldexpl(x86_fp80, i32)
428declare x86_fp80 @ldexpl(x86_fp80, i32)
429
430; CHECK: declare i64 @llabs(i64)
431declare i64 @llabs(i64)
432
433; CHECK: declare double @log(double)
434declare double @log(double)
435
436; CHECK: declare double @log10(double)
437declare double @log10(double)
438
439; CHECK: declare float @log10f(float)
440declare float @log10f(float)
441
442; CHECK: declare x86_fp80 @log10l(x86_fp80)
443declare x86_fp80 @log10l(x86_fp80)
444
445; CHECK: declare double @log1p(double)
446declare double @log1p(double)
447
448; CHECK: declare float @log1pf(float)
449declare float @log1pf(float)
450
451; CHECK: declare x86_fp80 @log1pl(x86_fp80)
452declare x86_fp80 @log1pl(x86_fp80)
453
454; CHECK: declare double @log2(double)
455declare double @log2(double)
456
457; CHECK: declare float @log2f(float)
458declare float @log2f(float)
459
460; CHECK: declare x86_fp80 @log2l(x86_fp80)
461declare x86_fp80 @log2l(x86_fp80)
462
463; CHECK: declare double @logb(double)
464declare double @logb(double)
465
466; CHECK: declare float @logbf(float)
467declare float @logbf(float)
468
469; CHECK: declare x86_fp80 @logbl(x86_fp80)
470declare x86_fp80 @logbl(x86_fp80)
471
472; CHECK: declare float @logf(float)
473declare float @logf(float)
474
475; CHECK: declare x86_fp80 @logl(x86_fp80)
476declare x86_fp80 @logl(x86_fp80)
477
478; CHECK: declare i32 @lstat(i8* nocapture readonly, %opaque* nocapture) [[G0]]
479declare i32 @lstat(i8*, %opaque*)
480
481; CHECK-LINUX: declare i32 @lstat64(i8* nocapture readonly, %opaque* nocapture) [[G0]]
482declare i32 @lstat64(i8*, %opaque*)
483
484; CHECK: declare noalias i8* @malloc(i64) [[G0]]
485declare i8* @malloc(i64)
486
487; CHECK-LINUX: declare noalias i8* @memalign(i64, i64)
488declare i8* @memalign(i64, i64)
489
490; CHECK: declare i8* @memccpy(i8*, i8* nocapture readonly, i32, i64) [[G0]]
491declare i8* @memccpy(i8*, i8*, i32, i64)
492
493; CHECK: declare i8* @memchr(i8*, i32, i64) [[G1]]
494declare i8* @memchr(i8*, i32, i64)
495
496; CHECK: declare i32 @memcmp(i8* nocapture, i8* nocapture, i64) [[G1]]
497declare i32 @memcmp(i8*, i8*, i64)
498
499; CHECK: declare i8* @memcpy(i8*, i8* nocapture readonly, i64) [[G0]]
500declare i8* @memcpy(i8*, i8*, i64)
501
502; CHECK: declare i8* @memmove(i8*, i8* nocapture readonly, i64) [[G0]]
503declare i8* @memmove(i8*, i8*, i64)
504
505; CHECK: declare i8* @memset(i8*, i32, i64)
506declare i8* @memset(i8*, i32, i64)
507
508; CHECK: declare i32 @mkdir(i8* nocapture readonly, i16 zeroext) [[G0]]
509declare i32 @mkdir(i8*, i16 zeroext)
510
511; CHECK: declare i64 @mktime(%opaque* nocapture) [[G0]]
512declare i64 @mktime(%opaque*)
513
514; CHECK: declare double @modf(double, double* nocapture) [[G0]]
515declare double @modf(double, double*)
516
517; CHECK: declare float @modff(float, float* nocapture) [[G0]]
518declare float @modff(float, float*)
519
520; CHECK: declare x86_fp80 @modfl(x86_fp80, x86_fp80* nocapture) [[G0]]
521declare x86_fp80 @modfl(x86_fp80, x86_fp80*)
522
523; CHECK: declare double @nearbyint(double)
524declare double @nearbyint(double)
525
526; CHECK: declare float @nearbyintf(float)
527declare float @nearbyintf(float)
528
529; CHECK: declare x86_fp80 @nearbyintl(x86_fp80)
530declare x86_fp80 @nearbyintl(x86_fp80)
531
532; CHECK: declare i32 @open(i8* nocapture readonly, i32, ...)
533declare i32 @open(i8*, i32, ...)
534
535; CHECK-LINUX: declare i32 @open64(i8* nocapture readonly, i32, ...)
536declare i32 @open64(i8*, i32, ...)
537
538; CHECK: declare noalias %opaque* @opendir(i8* nocapture readonly) [[G0]]
539declare %opaque* @opendir(i8*)
540
541; CHECK: declare i32 @pclose(%opaque* nocapture) [[G0]]
542declare i32 @pclose(%opaque*)
543
544; CHECK: declare void @perror(i8* nocapture readonly) [[G0]]
545declare void @perror(i8*)
546
547; CHECK: declare noalias %opaque* @popen(i8* nocapture readonly, i8* nocapture readonly) [[G0]]
548declare %opaque* @popen(i8*, i8*)
549
550; CHECK: declare i32 @posix_memalign(i8**, i64, i64)
551declare i32 @posix_memalign(i8**, i64, i64)
552
553; CHECK: declare double @pow(double, double)
554declare double @pow(double, double)
555
556; CHECK: declare float @powf(float, float)
557declare float @powf(float, float)
558
559; CHECK: declare x86_fp80 @powl(x86_fp80, x86_fp80)
560declare x86_fp80 @powl(x86_fp80, x86_fp80)
561
562; CHECK: declare i64 @pread(i32, i8* nocapture, i64, i64)
563declare i64 @pread(i32, i8*, i64, i64)
564
565; CHECK: declare i32 @printf(i8* nocapture readonly, ...) [[G0]]
566declare i32 @printf(i8*, ...)
567
568; CHECK: declare i32 @putc(i32, %opaque* nocapture) [[G0]]
569declare i32 @putc(i32, %opaque*)
570
571; CHECK: declare i32 @putchar(i32)
572declare i32 @putchar(i32)
573
574; CHECK: declare i32 @puts(i8* nocapture readonly) [[G0]]
575declare i32 @puts(i8*)
576
577; CHECK: declare i64 @pwrite(i32, i8* nocapture readonly, i64, i64)
578declare i64 @pwrite(i32, i8*, i64, i64)
579
580; CHECK: declare void @qsort(i8*, i64, i64, i32 (i8*, i8*)* nocapture)
581declare void @qsort(i8*, i64, i64, i32 (i8*, i8*)*)
582
583; CHECK: declare i64 @read(i32, i8* nocapture, i64)
584declare i64 @read(i32, i8*, i64)
585
586; CHECK: declare i64 @readlink(i8* nocapture readonly, i8* nocapture, i64) [[G0]]
587declare i64 @readlink(i8*, i8*, i64)
588
589; CHECK: declare noalias i8* @realloc(i8* nocapture, i64) [[G0]]
590declare i8* @realloc(i8*, i64)
591
592; CHECK: declare i8* @reallocf(i8*, i64)
593declare i8* @reallocf(i8*, i64)
594
595; CHECK: declare i8* @realpath(i8* nocapture readonly, i8*)
596declare i8* @realpath(i8*, i8*)
597
598; CHECK: declare i32 @remove(i8* nocapture readonly) [[G0]]
599declare i32 @remove(i8*)
600
601; CHECK: declare i32 @rename(i8* nocapture readonly, i8* nocapture readonly) [[G0]]
602declare i32 @rename(i8*, i8*)
603
604; CHECK: declare void @rewind(%opaque* nocapture) [[G0]]
605declare void @rewind(%opaque*)
606
607; CHECK: declare double @rint(double)
608declare double @rint(double)
609
610; CHECK: declare float @rintf(float)
611declare float @rintf(float)
612
613; CHECK: declare x86_fp80 @rintl(x86_fp80)
614declare x86_fp80 @rintl(x86_fp80)
615
616; CHECK: declare i32 @rmdir(i8* nocapture readonly) [[G0]]
617declare i32 @rmdir(i8*)
618
619; CHECK: declare double @round(double)
620declare double @round(double)
621
622; CHECK: declare float @roundf(float)
623declare float @roundf(float)
624
625; CHECK: declare x86_fp80 @roundl(x86_fp80)
626declare x86_fp80 @roundl(x86_fp80)
627
628; CHECK: declare i32 @scanf(i8* nocapture readonly, ...) [[G0]]
629declare i32 @scanf(i8*, ...)
630
631; CHECK: declare void @setbuf(%opaque* nocapture, i8*) [[G0]]
632declare void @setbuf(%opaque*, i8*)
633
634; CHECK: declare i32 @setitimer(i32, %opaque* nocapture readonly, %opaque* nocapture) [[G0]]
635declare i32 @setitimer(i32, %opaque*, %opaque*)
636
637; CHECK: declare i32 @setvbuf(%opaque* nocapture, i8*, i32, i64) [[G0]]
638declare i32 @setvbuf(%opaque*, i8*, i32, i64)
639
640; CHECK: declare double @sin(double)
641declare double @sin(double)
642
643; CHECK: declare float @sinf(float)
644declare float @sinf(float)
645
646; CHECK: declare double @sinh(double)
647declare double @sinh(double)
648
649; CHECK: declare float @sinhf(float)
650declare float @sinhf(float)
651
652; CHECK: declare x86_fp80 @sinhl(x86_fp80)
653declare x86_fp80 @sinhl(x86_fp80)
654
655; CHECK: declare x86_fp80 @sinl(x86_fp80)
656declare x86_fp80 @sinl(x86_fp80)
657
658; CHECK: declare i32 @snprintf(i8* nocapture, i64, i8* nocapture readonly, ...) [[G0]]
659declare i32 @snprintf(i8*, i64, i8*, ...)
660
661; CHECK: declare i32 @sprintf(i8* nocapture, i8* nocapture readonly, ...) [[G0]]
662declare i32 @sprintf(i8*, i8*, ...)
663
664; CHECK: declare double @sqrt(double)
665declare double @sqrt(double)
666
667; CHECK: declare float @sqrtf(float)
668declare float @sqrtf(float)
669
670; CHECK: declare x86_fp80 @sqrtl(x86_fp80)
671declare x86_fp80 @sqrtl(x86_fp80)
672
673; CHECK: declare i32 @sscanf(i8* nocapture readonly, i8* nocapture readonly, ...) [[G0]]
674declare i32 @sscanf(i8*, i8*, ...)
675
676; CHECK: declare i32 @stat(i8* nocapture readonly, %opaque* nocapture) [[G0]]
677declare i32 @stat(i8*, %opaque*)
678
679; CHECK-LINUX: declare i32 @stat64(i8* nocapture readonly, %opaque* nocapture) [[G0]]
680declare i32 @stat64(i8*, %opaque*)
681
682; CHECK: declare i32 @statvfs(i8* nocapture readonly, %opaque* nocapture) [[G0]]
683declare i32 @statvfs(i8*, %opaque*)
684
685; CHECK-LINUX: declare i32 @statvfs64(i8* nocapture readonly, %opaque* nocapture) [[G0]]
686declare i32 @statvfs64(i8*, %opaque*)
687
688; CHECK: declare i8* @stpcpy(i8*, i8* nocapture readonly) [[G0]]
689declare i8* @stpcpy(i8*, i8*)
690
691; CHECK: declare i8* @stpncpy(i8*, i8* nocapture readonly, i64) [[G0]]
692declare i8* @stpncpy(i8*, i8*, i64)
693
694; CHECK: declare i32 @strcasecmp(i8* nocapture, i8* nocapture) [[G1]]
695declare i32 @strcasecmp(i8*, i8*)
696
697; CHECK: declare i8* @strcat(i8*, i8* nocapture readonly) [[G0]]
698declare i8* @strcat(i8*, i8*)
699
700; CHECK: declare i8* @strchr(i8*, i32) [[G1]]
701declare i8* @strchr(i8*, i32)
702
703; CHECK: declare i32 @strcmp(i8* nocapture, i8* nocapture) [[G1]]
704declare i32 @strcmp(i8*, i8*)
705
706; CHECK: declare i32 @strcoll(i8* nocapture, i8* nocapture) [[G1]]
707declare i32 @strcoll(i8*, i8*)
708
709; CHECK: declare i8* @strcpy(i8*, i8* nocapture readonly) [[G0]]
710declare i8* @strcpy(i8*, i8*)
711
712; CHECK: declare i64 @strcspn(i8* nocapture, i8* nocapture) [[G1]]
713declare i64 @strcspn(i8*, i8*)
714
715; CHECK: declare noalias i8* @strdup(i8* nocapture readonly) [[G0]]
716declare i8* @strdup(i8*)
717
718; CHECK: declare i64 @strlen(i8* nocapture) [[G1]]
719declare i64 @strlen(i8*)
720
721; CHECK: declare i32 @strncasecmp(i8* nocapture, i8* nocapture, i64) [[G1]]
722declare i32 @strncasecmp(i8*, i8*, i64)
723
724; CHECK: declare i8* @strncat(i8*, i8* nocapture readonly, i64) [[G0]]
725declare i8* @strncat(i8*, i8*, i64)
726
727; CHECK: declare i32 @strncmp(i8* nocapture, i8* nocapture, i64) [[G1]]
728declare i32 @strncmp(i8*, i8*, i64)
729
730; CHECK: declare i8* @strncpy(i8*, i8* nocapture readonly, i64) [[G0]]
731declare i8* @strncpy(i8*, i8*, i64)
732
733; CHECK: declare noalias i8* @strndup(i8* nocapture readonly, i64) [[G0]]
734declare i8* @strndup(i8*, i64)
735
736; CHECK: declare i64 @strnlen(i8*, i64)
737declare i64 @strnlen(i8*, i64)
738
739; CHECK: declare i8* @strpbrk(i8*, i8* nocapture) [[G1]]
740declare i8* @strpbrk(i8*, i8*)
741
742; CHECK: declare i8* @strrchr(i8*, i32) [[G1]]
743declare i8* @strrchr(i8*, i32)
744
745; CHECK: declare i64 @strspn(i8* nocapture, i8* nocapture) [[G1]]
746declare i64 @strspn(i8*, i8*)
747
748; CHECK: declare i8* @strstr(i8*, i8* nocapture) [[G1]]
749declare i8* @strstr(i8*, i8*)
750
751; CHECK: declare double @strtod(i8* readonly, i8** nocapture) [[G0]]
752declare double @strtod(i8*, i8**)
753
754; CHECK: declare float @strtof(i8* readonly, i8** nocapture) [[G0]]
755declare float @strtof(i8*, i8**)
756
757; CHECK: declare i8* @strtok(i8*, i8* nocapture readonly) [[G0]]
758declare i8* @strtok(i8*, i8*)
759
760; CHECK: declare i8* @strtok_r(i8*, i8* nocapture readonly, i8**) [[G0]]
761declare i8* @strtok_r(i8*, i8*, i8**)
762
763; CHECK: declare i64 @strtol(i8* readonly, i8** nocapture, i32) [[G0]]
764declare i64 @strtol(i8*, i8**, i32)
765
766; CHECK: declare x86_fp80 @strtold(i8* readonly, i8** nocapture) [[G0]]
767declare x86_fp80 @strtold(i8*, i8**)
768
769; CHECK: declare i64 @strtoll(i8* readonly, i8** nocapture, i32) [[G0]]
770declare i64 @strtoll(i8*, i8**, i32)
771
772; CHECK: declare i64 @strtoul(i8* readonly, i8** nocapture, i32) [[G0]]
773declare i64 @strtoul(i8*, i8**, i32)
774
775; CHECK: declare i64 @strtoull(i8* readonly, i8** nocapture, i32) [[G0]]
776declare i64 @strtoull(i8*, i8**, i32)
777
778; CHECK: declare i64 @strxfrm(i8* nocapture, i8* nocapture readonly, i64) [[G0]]
779declare i64 @strxfrm(i8*, i8*, i64)
780
781; CHECK: declare i32 @system(i8* nocapture readonly)
782declare i32 @system(i8*)
783
784; CHECK: declare double @tan(double)
785declare double @tan(double)
786
787; CHECK: declare float @tanf(float)
788declare float @tanf(float)
789
790; CHECK: declare double @tanh(double)
791declare double @tanh(double)
792
793; CHECK: declare float @tanhf(float)
794declare float @tanhf(float)
795
796; CHECK: declare x86_fp80 @tanhl(x86_fp80)
797declare x86_fp80 @tanhl(x86_fp80)
798
799; CHECK: declare x86_fp80 @tanl(x86_fp80)
800declare x86_fp80 @tanl(x86_fp80)
801
802; CHECK: declare i64 @times(%opaque* nocapture) [[G0]]
803declare i64 @times(%opaque*)
804
805; CHECK: declare noalias %opaque* @tmpfile() [[G0]]
806declare %opaque* @tmpfile()
807
808; CHECK-LINUX: declare noalias %opaque* @tmpfile64() [[G0]]
809declare %opaque* @tmpfile64()
810
811; CHECK: declare i32 @toascii(i32)
812declare i32 @toascii(i32)
813
814; CHECK: declare double @trunc(double)
815declare double @trunc(double)
816
817; CHECK: declare float @truncf(float)
818declare float @truncf(float)
819
820; CHECK: declare x86_fp80 @truncl(x86_fp80)
821declare x86_fp80 @truncl(x86_fp80)
822
823; CHECK: declare i32 @uname(%opaque* nocapture) [[G0]]
824declare i32 @uname(%opaque*)
825
826; CHECK: declare i32 @ungetc(i32, %opaque* nocapture) [[G0]]
827declare i32 @ungetc(i32, %opaque*)
828
829; CHECK: declare i32 @unlink(i8* nocapture readonly) [[G0]]
830declare i32 @unlink(i8*)
831
832; CHECK: declare i32 @unsetenv(i8* nocapture readonly) [[G0]]
833declare i32 @unsetenv(i8*)
834
835; CHECK: declare i32 @utime(i8* nocapture readonly, %opaque* nocapture readonly) [[G0]]
836declare i32 @utime(i8*, %opaque*)
837
838; CHECK: declare i32 @utimes(i8* nocapture readonly, %opaque* nocapture readonly) [[G0]]
839declare i32 @utimes(i8*, %opaque*)
840
841; CHECK: declare noalias i8* @valloc(i64) [[G0]]
842declare i8* @valloc(i64)
843
844; CHECK: declare i32 @vfprintf(%opaque* nocapture, i8* nocapture readonly, %opaque*) [[G0]]
845declare i32 @vfprintf(%opaque*, i8*, %opaque*)
846
847; CHECK: declare i32 @vfscanf(%opaque* nocapture, i8* nocapture readonly, %opaque*) [[G0]]
848declare i32 @vfscanf(%opaque*, i8*, %opaque*)
849
850; CHECK: declare i32 @vprintf(i8* nocapture readonly, %opaque*) [[G0]]
851declare i32 @vprintf(i8*, %opaque*)
852
853; CHECK: declare i32 @vscanf(i8* nocapture readonly, %opaque*) [[G0]]
854declare i32 @vscanf(i8*, %opaque*)
855
856; CHECK: declare i32 @vsnprintf(i8* nocapture, i64, i8* nocapture readonly, %opaque*) [[G0]]
857declare i32 @vsnprintf(i8*, i64, i8*, %opaque*)
858
859; CHECK: declare i32 @vsprintf(i8* nocapture, i8* nocapture readonly, %opaque*) [[G0]]
860declare i32 @vsprintf(i8*, i8*, %opaque*)
861
862; CHECK: declare i32 @vsscanf(i8* nocapture readonly, i8* nocapture readonly, %opaque*) [[G0]]
863declare i32 @vsscanf(i8*, i8*, %opaque*)
864
865; CHECK: declare i64 @write(i32, i8* nocapture readonly, i64)
866declare i64 @write(i32, i8*, i64)
867
868
869; memset_pattern16 isn't available everywhere.
870; CHECK-DARWIN: declare void @memset_pattern16(i8* nocapture, i8* nocapture readonly, i64) [[G2:#[0-9]+]]
871declare void @memset_pattern16(i8*, i8*, i64)
872
873
874; CHECK: attributes [[G0]] = { nounwind }
875; CHECK: attributes [[G1]] = { nounwind readonly }
876; CHECK-DARWIN: attributes [[G2]] = { argmemonly }
877