mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
009505452b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
555 B
LLVM
28 lines
555 B
LLVM
implementation
|
|
|
|
int "FuncToInline"()
|
|
begin
|
|
%x = add int 1, 1 ; Instrs can be const prop'd away
|
|
%y = sub int -1, 1
|
|
%z = add int %x, %y
|
|
ret int %z ; Should equal %0
|
|
end
|
|
|
|
int "FuncToInlineInto"(int %arg) ; Instrs can be const prop'd away
|
|
begin
|
|
%x = add int %arg, 1
|
|
%y = sub int 1, -1
|
|
%p = call int() %FuncToInline()
|
|
%z = add int %x, %y
|
|
%q = add int %p, %z
|
|
|
|
ret int %q
|
|
end
|
|
|
|
int "FTIITII"()
|
|
begin
|
|
%z = call int(int) %FuncToInlineInto(int 1)
|
|
ret int %z
|
|
end
|
|
|