mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
0d9733d596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226606 91177308-0d34-0410-b5e6-96231b3b80d8
35 lines
887 B
LLVM
35 lines
887 B
LLVM
; RUN: llc < %s | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32"
|
|
target triple = "hexagon"
|
|
|
|
; CHECK: test13:
|
|
; CHECK: r{{[0-9]+}} = add(r{{[0-9]+}}, r{{[0-9]+}}):sat
|
|
define i32 @test13(i32 %Rs, i32 %Rt) #0 {
|
|
entry:
|
|
%0 = tail call i32 @llvm.hexagon.A2.addsat(i32 %Rs, i32 %Rt)
|
|
ret i32 %0
|
|
}
|
|
|
|
|
|
; CHECK: test14:
|
|
; CHECK: r{{[0-9]+}} = sub(r{{[0-9]+}}, r{{[0-9]+}}):sat
|
|
define i32 @test14(i32 %Rs, i32 %Rt) #0 {
|
|
entry:
|
|
%0 = tail call i32 @llvm.hexagon.A2.subsat(i32 %Rs, i32 %Rt)
|
|
ret i32 %0
|
|
}
|
|
|
|
|
|
; CHECK: test61:
|
|
; CHECK: r{{[0-9]+:[0-9]+}} = packhl(r{{[0-9]+}}, r{{[0-9]+}})
|
|
define i64 @test61(i32 %Rs, i32 %Rt) #0 {
|
|
entry:
|
|
%0 = tail call i64 @llvm.hexagon.S2.packhl(i32 %Rs, i32 %Rt)
|
|
ret i64 %0
|
|
}
|
|
|
|
declare i32 @llvm.hexagon.A2.addsat(i32, i32) #1
|
|
declare i32 @llvm.hexagon.A2.subsat(i32, i32) #1
|
|
declare i64 @llvm.hexagon.S2.packhl(i32, i32) #1
|