summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2016-12-16 12:54:46 +0000
committerDiana Picus <diana.picus@linaro.org>2016-12-16 12:54:46 +0000
commit812caee65a1c13ebaf4bc419ab1277523339bd27 (patch)
treedf4e5e82ef5f191438f5c7062441ef8d6ab57326 /llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
parent85c921104381980518654110e9cd22f9134ba338 (diff)
downloadbcm5719-llvm-812caee65a1c13ebaf4bc419ab1277523339bd27.tar.gz
bcm5719-llvm-812caee65a1c13ebaf4bc419ab1277523339bd27.zip
[ARM] GlobalISel: Select add i32, i32
Add the minimal support necessary to select a function that returns the sum of two i32 values. This includes some support for argument/return lowering of i32 values through registers, as well as the handling of copy and add instructions throughout the GlobalISel pipeline. Differential Revision: https://reviews.llvm.org/D26677 llvm-svn: 289940
Diffstat (limited to 'llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll')
-rw-r--r--llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll b/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
new file mode 100644
index 00000000000..0d62c6f7bfa
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
@@ -0,0 +1,17 @@
+; RUN: llc -mtriple arm-unknown -global-isel %s -o - | FileCheck %s
+
+define void @test_void_return() {
+; CHECK-LABEL: test_void_return:
+; CHECK: bx lr
+entry:
+ ret void
+}
+
+define i32 @test_add(i32 %x, i32 %y) {
+; CHECK-LABEL: test_add:
+; CHECK: add r0, r0, r1
+; CHECK: bx lr
+entry:
+ %sum = add i32 %x, %y
+ ret i32 %sum
+}
OpenPOWER on IntegriCloud