mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-13 12:57:47 +00:00
532d022794
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46645 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
397 B
LLVM
16 lines
397 B
LLVM
; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | grep nounwind | count 2
|
|
|
|
define internal i32 @deref(i32* %x) nounwind {
|
|
entry:
|
|
%tmp2 = load i32* %x, align 4 ; <i32> [#uses=1]
|
|
ret i32 %tmp2
|
|
}
|
|
|
|
define i32 @f(i32 %x) {
|
|
entry:
|
|
%x_addr = alloca i32 ; <i32*> [#uses=2]
|
|
store i32 %x, i32* %x_addr, align 4
|
|
%tmp1 = call i32 @deref( i32* %x_addr ) nounwind ; <i32> [#uses=1]
|
|
ret i32 %tmp1
|
|
}
|