mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
c66cdf74a9
basic tests. This has been well tested on Darwin but not elsewhere. It should work provided the linker correctly resolves B.W <label in other function> which it has not seen before, at least from llvm-based compilers. I'm leaving the arm-tail-calls switch in until I see if there's any problems because of that; it might need to be disabled for some environments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106299 91177308-0d34-0410-b5e6-96231b3b80d8
12 lines
348 B
LLVM
12 lines
348 B
LLVM
; RUN: llc < %s -march=arm -mattr=+v6
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin -mattr=+v6 |\
|
|
; RUN: grep mov | count 2
|
|
|
|
define i32 @test(i32 %x) {
|
|
%tmp = trunc i32 %x to i16 ; <i16> [#uses=1]
|
|
%tmp2 = tail call i32 @f( i32 1, i16 %tmp ) ; <i32> [#uses=1]
|
|
ret i32 %tmp2
|
|
}
|
|
|
|
declare i32 @f(i32, i16)
|