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