aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-08-15 23:23:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-15 23:23:00 +0000
commit84cc7b46c45ccd9a611c8bd1ceeb5026d1090412 (patch)
treed7eded9cd4eb08b625ffba52051499f5b0b3145c
parent703eca35aeafbd7470f8a492d41812aa4f96ffaa (diff)
parent123b2924ba712a33160a578e22fc3ab4318d9492 (diff)
downloadclang-84cc7b46c45ccd9a611c8bd1ceeb5026d1090412.tar.gz
am 123b2924: Merge "Update vector calling convention for AArch64."
* commit '123b2924ba712a33160a578e22fc3ab4318d9492': Update vector calling convention for AArch64.
-rw-r--r--lib/CodeGen/TargetInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 9cb93accb6..3c7e7a7316 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -3364,7 +3364,13 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty,
// Handle illegal vector types here.
if (isIllegalVectorType(Ty)) {
uint64_t Size = getContext().getTypeSize(Ty);
- if (Size <= 32) {
+ // Android promotes <2 x i8> to i16, not i32
+ if (Size <= 16) {
+ llvm::Type *ResType = llvm::Type::getInt16Ty(getVMContext());
+ AllocatedGPR++;
+ return ABIArgInfo::getDirect(ResType);
+ }
+ if (Size == 32) {
llvm::Type *ResType = llvm::Type::getInt32Ty(getVMContext());
AllocatedGPR++;
return ABIArgInfo::getDirect(ResType);