mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-10 06:54:54 +00:00
duplicate the instructions and operate on half vectors. Also reorder code in SPUInstrInfo.td for better coherency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110037 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
511 B
LLVM
36 lines
511 B
LLVM
;RUN: llc --march=cellspu %s -o - | FileCheck %s
|
|
%vec = type <2 x float>
|
|
|
|
define %vec @test_ret(%vec %param)
|
|
{
|
|
;CHECK: bi $lr
|
|
ret %vec %param
|
|
}
|
|
|
|
define %vec @test_add(%vec %param)
|
|
{
|
|
;CHECK: fa $3, $3, $3
|
|
%1 = fadd %vec %param, %param
|
|
;CHECK: bi $lr
|
|
ret %vec %1
|
|
}
|
|
|
|
define %vec @test_sub(%vec %param)
|
|
{
|
|
;CHECK: fs $3, $3, $3
|
|
%1 = fsub %vec %param, %param
|
|
|
|
;CHECK: bi $lr
|
|
ret %vec %1
|
|
}
|
|
|
|
define %vec @test_mul(%vec %param)
|
|
{
|
|
;CHECK: fm $3, $3, $3
|
|
%1 = fmul %vec %param, %param
|
|
|
|
;CHECK: bi $lr
|
|
ret %vec %1
|
|
}
|
|
|