summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-09-23 01:54:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-09-23 01:54:32 +0000
commit19964dbe3bb05aedc65952c7299e4c610ee01579 (patch)
treedaf056a06f21fa69d4654185a386da6fd7cfc904 /clang/lib/CodeGen
parentb34b08098c71789401f9dd9f37815d41d0dfcafa (diff)
downloadbcm5719-llvm-19964dbe3bb05aedc65952c7299e4c610ee01579.tar.gz
bcm5719-llvm-19964dbe3bb05aedc65952c7299e4c610ee01579.zip
IRgen/ABI/ARM: Return large vectors in memory.
llvm-svn: 114619
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index f1da3c39035..e8e25ca6d48 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -2391,6 +2391,10 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy) const {
if (RetTy->isVoidType())
return ABIArgInfo::getIgnore();
+ // Large vector types should be returned via memory.
+ if (RetTy->isVectorType() && getContext().getTypeSize(RetTy) > 128)
+ return ABIArgInfo::getIndirect(0);
+
if (!isAggregateTypeForABI(RetTy)) {
// Treat an enum type as its underlying type.
if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
OpenPOWER on IntegriCloud