1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes 2; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -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-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 -enable-new-pm=0 -attributor-manifest-internal -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-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; Don't promote paramaters of/arguments to naked functions 8 9@g = common global i32 0, align 4 10 11define i32 @bar() { 12; CHECK-LABEL: define {{[^@]+}}@bar() { 13; CHECK-NEXT: entry: 14; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo(i32* noundef nonnull align 4 dereferenceable(4) @g) 15; CHECK-NEXT: ret i32 [[CALL]] 16; 17entry: 18 %call = call i32 @foo(i32* @g) 19 ret i32 %call 20} 21 22define internal i32 @foo(i32*) #0 { 23; CHECK: Function Attrs: naked 24; CHECK-LABEL: define {{[^@]+}}@foo 25; CHECK-SAME: (i32* [[TMP0:%.*]]) [[ATTR0:#.*]] { 26; CHECK-NEXT: entry: 27; CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4 28; CHECK-NEXT: call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() 29; CHECK-NEXT: unreachable 30; 31entry: 32 %retval = alloca i32, align 4 33 call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() 34 unreachable 35} 36 37 38attributes #0 = { naked } 39