diff options
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 3 | ||||
| -rw-r--r-- | clang/test/CodeGen/arm-aapcs-vfp.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 1ff7ed00503..13a3ff1ee23 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -2623,7 +2623,8 @@ static bool isHomogeneousAggregate(QualType Ty, const Type *&Base, // double, or 64-bit or 128-bit vectors. if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) { if (BT->getKind() != BuiltinType::Float && - BT->getKind() != BuiltinType::Double) + BT->getKind() != BuiltinType::Double && + BT->getKind() != BuiltinType::LongDouble) return false; } else if (const VectorType *VT = Ty->getAs<VectorType>()) { unsigned VecSize = Context.getTypeSize(VT); diff --git a/clang/test/CodeGen/arm-aapcs-vfp.c b/clang/test/CodeGen/arm-aapcs-vfp.c index 45204ed2b9e..fdd87e05495 100644 --- a/clang/test/CodeGen/arm-aapcs-vfp.c +++ b/clang/test/CodeGen/arm-aapcs-vfp.c @@ -34,6 +34,13 @@ void test_complex(__complex__ double cd) { complex_callee(cd); } +// Long double is the same as double on AAPCS, it should be homogeneous. +extern void complex_long_callee(__complex__ long double); +// CHECK: define arm_aapcs_vfpcc void @test_complex_long(double %{{.*}}, double %{{.*}}) +void test_complex_long(__complex__ long double cd) { + complex_callee(cd); +} + // Structs with more than 4 elements of the base type are not treated // as homogeneous aggregates. Test that. |

