summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-06-02 10:16:48 +0000
committerDiana Picus <diana.picus@linaro.org>2017-06-02 10:16:48 +0000
commite7aa90987d2e4fe71ab683ebca80a01d29d4ff7b (patch)
treeea3b95ec40989b6fe6e75669b628c391c5c1ea52 /llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
parentc226303d3ee71f1d874ad8f6809ed0400624b5e5 (diff)
downloadbcm5719-llvm-e7aa90987d2e4fe71ab683ebca80a01d29d4ff7b.tar.gz
bcm5719-llvm-e7aa90987d2e4fe71ab683ebca80a01d29d4ff7b.zip
[ARM] GlobalISel: Support struct params/returns
Very very similar to the support for arrays. As with arrays, we don't support returning large structs that wouldn't fit in R0-R3. Most front-ends would likely use sret arguments for that anyway. The only significant difference is that when splitting a struct, we need to make sure we set the correct original alignment on each member, otherwise it may get split incorrectly between stack and registers. llvm-svn: 304536
Diffstat (limited to 'llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll')
-rw-r--r--llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll b/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
index ef30cb1063f..34f00aebe1b 100644
--- a/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
+++ b/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
@@ -54,10 +54,15 @@ define [16 x i32] @test_ret_demotion() {
ret [16 x i32] %res
}
-define void @test_structs({i32, i32} %struct) {
-; CHECK: remark: {{.*}} unable to lower arguments: void ({ i32, i32 })*
-; CHECK-LABEL: warning: Instruction selection used fallback path for test_structs
- ret void
+%large.struct = type { i32, i32, i32, i32, i32} ; Doesn't fit in R0-R3
+
+declare %large.struct @large_struct_return_target()
+
+define %large.struct @test_large_struct_return() {
+; CHECK: remark: {{.*}} unable to translate instruction: call{{.*}} @large_struct_return_target
+; CHECK-LABEL: warning: Instruction selection used fallback path for test_large_struct_return
+ %r = call %large.struct @large_struct_return_target()
+ ret %large.struct %r
}
define void @test_vararg_definition(i32 %a, ...) {
OpenPOWER on IntegriCloud