26 lines · plain
1; RUN: opt -S -passes=function-attrs %s | FileCheck %s2; RUN: opt -S -passes='function-attrs' %s | FileCheck %s3 4; Don't change the attributes of parameters of naked functions, in particular5; don't mark them as readnone6 7@g = common global i32 0, align 48 9define i32 @bar() {10entry:11 %call = call i32 @foo(ptr @g)12; CHECK: %call = call i32 @foo(ptr @g)13 ret i32 %call14}15 16define internal i32 @foo(ptr) #0 {17entry:18 %retval = alloca i32, align 419 call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()20 unreachable21}22 23; CHECK: define internal i32 @foo(ptr %0)24 25attributes #0 = { naked }26