mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 00:35:43 +00:00

For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
24 lines
493 B
LLVM
24 lines
493 B
LLVM
; RUN: opt < %s -argpromotion -S | FileCheck %s
|
|
|
|
; Don't promote paramaters of/arguments to naked functions
|
|
|
|
@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 }
|