1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
2 ; RUN: opt < %s -passes=argpromotion -S | FileCheck %s
4 ; Don't promote paramaters of/arguments to naked functions
6 @g = common global i32 0, align 4
9 ; CHECK-LABEL: define {{[^@]+}}@bar()
11 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @foo(i32* @g)
12 ; CHECK-NEXT: ret i32 [[CALL]]
15 %call = call i32 @foo(i32* @g)
19 define internal i32 @foo(i32*) #0 {
20 ; CHECK-LABEL: define {{[^@]+}}@foo
21 ; CHECK-SAME: (i32* [[TMP0:%.*]])
23 ; CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
24 ; CHECK-NEXT: call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()
25 ; CHECK-NEXT: unreachable
28 %retval = alloca i32, align 4
29 call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()
34 attributes #0 = { naked }