summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/ARM/ARMCallLowering.cpp4
-rw-r--r--llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll14
2 files changed, 16 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMCallLowering.cpp b/llvm/lib/Target/ARM/ARMCallLowering.cpp
index b70d55f73ba..5229064032a 100644
--- a/llvm/lib/Target/ARM/ARMCallLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMCallLowering.cpp
@@ -55,7 +55,7 @@ ARMCallLowering::ARMCallLowering(const ARMTargetLowering &TLI)
static bool isSupportedType(const DataLayout &DL, const ARMTargetLowering &TLI,
Type *T) {
if (T->isArrayTy())
- return true;
+ return isSupportedType(DL, TLI, T->getArrayElementType());
if (T->isStructTy()) {
// For now we only allow homogeneous structs that we can manipulate with
@@ -64,7 +64,7 @@ static bool isSupportedType(const DataLayout &DL, const ARMTargetLowering &TLI,
for (unsigned i = 1, e = StructT->getNumElements(); i != e; ++i)
if (StructT->getElementType(i) != StructT->getElementType(0))
return false;
- return true;
+ return isSupportedType(DL, TLI, StructT->getElementType(0));
}
EVT VT = TLI.getValueType(DL, T, true);
diff --git a/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll b/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
index 8a23b5d29dd..045491097bb 100644
--- a/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
+++ b/llvm/test/CodeGen/ARM/GlobalISel/arm-unsupported.ll
@@ -28,6 +28,12 @@ define i64 @test_i64(i64 %a, i64 %b) {
ret i64 %res
}
+define void @test_i64_arr([1 x i64] %a) {
+; CHECK: remark: {{.*}} unable to lower arguments: void ([1 x i64])*
+; CHECK-LABEL: warning: Instruction selection used fallback path for test_i64_arr
+ ret void
+}
+
define i128 @test_i128(i128 %a, i128 %b) {
; CHECK: remark: {{.*}} unable to lower arguments: i128 (i128, i128)*
; CHECK-LABEL: warning: Instruction selection used fallback path for test_i128
@@ -77,6 +83,14 @@ define %mixed.struct @test_mixed_struct(%mixed.struct %x) {
ret %mixed.struct %x
}
+%bad.element.type = type {i24, i24}
+
+define void @test_bad_element_struct(%bad.element.type %x) {
+; CHECK: remark: {{.*}} unable to lower arguments: void (%bad.element.type)*
+; CHECK-LABEL: warning: Instruction selection used fallback path for test_bad_element_struct
+ ret void
+}
+
define void @test_vararg_definition(i32 %a, ...) {
; CHECK: remark: {{.*}} unable to lower arguments: void (i32, ...)*
; CHECK-LABEL: warning: Instruction selection used fallback path for test_vararg_definition
OpenPOWER on IntegriCloud