236
|
1 ; RUN: opt < %s -passes=globalopt -S | FileCheck %s
|
150
|
2
|
|
3 ; Check that naked functions don't get marked with fast calling conventions
|
|
4
|
|
5 @g = common global i32 0, align 4
|
|
6
|
|
7 define i32 @bar() {
|
|
8 entry:
|
252
|
9 %call = call i32 @foo(ptr @g)
|
|
10 ; CHECK: %call = call i32 @foo(ptr @g)
|
150
|
11 ret i32 %call
|
|
12 }
|
|
13
|
252
|
14 define internal i32 @foo(ptr) #0 {
|
150
|
15 entry:
|
|
16 %retval = alloca i32, align 4
|
|
17 call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()
|
|
18 unreachable
|
|
19 }
|
|
20
|
252
|
21 ; CHECK: define internal i32 @foo(ptr %0)
|
150
|
22
|
|
23 attributes #0 = { naked }
|