1; RUN: opt -S -function-attrs %s | FileCheck %s 2; RUN: opt -S -passes='function-attrs' %s | FileCheck %s 3 4; Don't change the attributes of parameters of naked functions, in particular 5; don't mark them as readnone 6 7@g = common global i32 0, align 4 8 9define i32 @bar() { 10entry: 11 %call = call i32 @foo(i32* @g) 12; CHECK: %call = call i32 @foo(i32* @g) 13 ret i32 %call 14} 15 16define internal i32 @foo(i32*) #0 { 17entry: 18 %retval = alloca i32, align 4 19 call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""() 20 unreachable 21} 22 23; CHECK: define internal i32 @foo(i32* %0) 24 25attributes #0 = { naked } 26