24 lines · plain
1; RUN: opt < %s -passes=globalopt -S | FileCheck %s2 3; Check that naked functions don't get marked with fast calling conventions4 5@g = common global i32 0, align 46 7define i32 @bar() {8entry:9 %call = call i32 @foo(ptr @g)10; CHECK: %call = call i32 @foo(ptr @g)11 ret i32 %call12}13 14define internal i32 @foo(ptr) #0 {15entry:16 %retval = alloca i32, align 417 call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()18 unreachable19}20 21; CHECK: define internal i32 @foo(ptr %0)22 23attributes #0 = { naked }24