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