summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-01-25 08:10:40 +0000
committerDiana Picus <diana.picus@linaro.org>2017-01-25 08:10:40 +0000
commit8b6c6bedcbad953260157903e03210249e5f4b90 (patch)
tree0a2cecc06231fd1012076b7f1bf1ab626c019223 /llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
parent43a7759f4b67199d0e8eebfd19d5bf42a8b364b5 (diff)
downloadbcm5719-llvm-8b6c6bedcbad953260157903e03210249e5f4b90.tar.gz
bcm5719-llvm-8b6c6bedcbad953260157903e03210249e5f4b90.zip
[ARM] GlobalISel: Support i8/i16 ABI extensions
At the moment, this means supporting the signext/zeroext attribute on the return type of the function. For function arguments, signext/zeroext should be handled by the caller, so there's nothing for us to do until we start lowering calls. Note that this does not include support for other extensions (i8 to i16), those will be added later. Differential Revision: https://reviews.llvm.org/D27705 llvm-svn: 293034
Diffstat (limited to 'llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll')
-rw-r--r--llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll b/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
index 3f01b6dd3a8..2c0c17c7eec 100644
--- a/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
+++ b/llvm/test/CodeGen/ARM/GlobalISel/arm-isel.ll
@@ -7,6 +7,22 @@ entry:
ret void
}
+define zeroext i8 @test_ext_i8(i8 %x) {
+; CHECK-LABEL: test_ext_i8:
+; CHECK: uxtb r0, r0
+; CHECK: bx lr
+entry:
+ ret i8 %x
+}
+
+define signext i16 @test_ext_i16(i16 %x) {
+; CHECK-LABEL: test_ext_i16:
+; CHECK: sxth r0, r0
+; CHECK: bx lr
+entry:
+ ret i16 %x
+}
+
define i8 @test_add_i8(i8 %x, i8 %y) {
; CHECK-LABEL: test_add_i8:
; CHECK: add r0, r0, r1
OpenPOWER on IntegriCloud