mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
8a584da153
To match NewPM pass name, and also for readability. Also rename rpo-functionattrs -> rpo-function-attrs while we're here. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D84694
26 lines
599 B
LLVM
26 lines
599 B
LLVM
; RUN: opt -S -function-attrs %s | FileCheck %s
|
|
; RUN: opt -S -passes='function-attrs' %s | FileCheck %s
|
|
|
|
; Don't change the attributes of parameters of naked functions, in particular
|
|
; don't mark them as readnone
|
|
|
|
@g = common global i32 0, align 4
|
|
|
|
define i32 @bar() {
|
|
entry:
|
|
%call = call i32 @foo(i32* @g)
|
|
; CHECK: %call = call i32 @foo(i32* @g)
|
|
ret i32 %call
|
|
}
|
|
|
|
define internal i32 @foo(i32*) #0 {
|
|
entry:
|
|
%retval = alloca i32, align 4
|
|
call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()
|
|
unreachable
|
|
}
|
|
|
|
; CHECK: define internal i32 @foo(i32* %0)
|
|
|
|
attributes #0 = { naked }
|