1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes 2; RUN: opt -attributor -attributor-manifest-internal -attributor-disable=false -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM 3; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-disable=false -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM 4; RUN: opt -attributor-cgscc -attributor-manifest-internal -attributor-disable=false -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM 5; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-disable=false -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM 6 7; Unused arguments from variadic functions cannot be eliminated as that changes 8; their classiciation according to the SysV amd64 ABI. Clang and other frontends 9; bake in the classification when they use things like byval, as in this test. 10 11target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 12target triple = "x86_64-unknown-linux-gnu" 13 14%struct.tt0 = type { i64, i64 } 15%struct.__va_list_tag = type { i32, i32, i8*, i8* } 16 17@t45 = internal global %struct.tt0 { i64 1335139741, i64 438042995 }, align 8 18 19; Function Attrs: nounwind uwtable 20define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 { 21; CHECK-LABEL: define {{[^@]+}}@main 22; CHECK-SAME: (i32 [[ARGC:%.*]], i8** nocapture nofree readnone [[ARGV:%.*]]) 23; CHECK-NEXT: entry: 24; CHECK-NEXT: tail call void (i8*, i8*, i8*, i8*, i8*, ...) @callee_t0f(i8* undef, i8* undef, i8* undef, i8* undef, i8* undef, %struct.tt0* nonnull byval align 8 dereferenceable(16) @t45) 25; CHECK-NEXT: ret i32 0 26; 27entry: 28 tail call void (i8*, i8*, i8*, i8*, i8*, ...) @callee_t0f(i8* undef, i8* undef, i8* undef, i8* undef, i8* undef, %struct.tt0* byval align 8 @t45) 29 ret i32 0 30} 31 32; Function Attrs: nounwind uwtable 33define internal void @callee_t0f(i8* nocapture readnone %tp13, i8* nocapture readnone %tp14, i8* nocapture readnone %tp15, i8* nocapture readnone %tp16, i8* nocapture readnone %tp17, ...) { 34; IS__TUNIT____-LABEL: define {{[^@]+}}@callee_t0f 35; IS__TUNIT____-SAME: (i8* noalias nocapture nofree nonnull readnone [[TP13:%.*]], i8* noalias nocapture nofree nonnull readnone [[TP14:%.*]], i8* noalias nocapture nofree nonnull readnone [[TP15:%.*]], i8* noalias nocapture nofree nonnull readnone [[TP16:%.*]], i8* noalias nocapture nofree nonnull readnone [[TP17:%.*]], ...) 36; IS__TUNIT____-NEXT: entry: 37; IS__TUNIT____-NEXT: call void @sink(i32 0) 38; IS__TUNIT____-NEXT: ret void 39; 40; IS__CGSCC____-LABEL: define {{[^@]+}}@callee_t0f 41; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull readnone [[TP13:%.*]], i8* nocapture nofree nonnull readnone [[TP14:%.*]], i8* nocapture nofree nonnull readnone [[TP15:%.*]], i8* nocapture nofree nonnull readnone [[TP16:%.*]], i8* nocapture nofree nonnull readnone [[TP17:%.*]], ...) 42; IS__CGSCC____-NEXT: entry: 43; IS__CGSCC____-NEXT: call void @sink(i32 0) 44; IS__CGSCC____-NEXT: ret void 45; 46entry: 47 call void @sink(i32 0) 48 ret void 49} 50 51declare void @sink(i32) 52