diff options
| author | Colin LeMahieu <colinl@codeaurora.org> | 2015-01-20 20:45:05 +0000 |
|---|---|---|
| committer | Colin LeMahieu <colinl@codeaurora.org> | 2015-01-20 20:45:05 +0000 |
| commit | 988c68f2a794fe0128757c9010337fa9da0c5839 (patch) | |
| tree | de2f32282b40e5b69b6bb5b84720fc8ae9e618fb /llvm/test/CodeGen | |
| parent | c91ac9ed498eea96e135c3433e690edf5f951b74 (diff) | |
| download | bcm5719-llvm-988c68f2a794fe0128757c9010337fa9da0c5839.tar.gz bcm5719-llvm-988c68f2a794fe0128757c9010337fa9da0c5839.zip | |
[Hexagon] Adding intrinsics for doubleword ALU operations.
llvm-svn: 226606
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/Hexagon/intrinsics-alu32_3op.ll | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/intrinsics-alu32_3op.ll b/llvm/test/CodeGen/Hexagon/intrinsics-alu32_3op.ll new file mode 100644 index 00000000000..b2bf439e1f7 --- /dev/null +++ b/llvm/test/CodeGen/Hexagon/intrinsics-alu32_3op.ll @@ -0,0 +1,34 @@ +; 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 |

