blob: c2a13127be6ea49927857cc4e338aeb6c6456286 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001From 10a4fc6c56a4ca26b225bf912948f96e9f55c81a Mon Sep 17 00:00:00 2001
2From: Tim Murray <timmurray@google.com>
3Date: Thu, 3 Apr 2014 13:27:16 -0700
4Subject: [PATCH 2/4] Revert to old vector passing ABI for backwards
5 compatibility.
6
7Change-Id: I6d0e6db454de7090ef49001e9318eae5a1112e09
8---
9 lib/CodeGen/TargetInfo.cpp | 6 +++---
10 1 file changed, 3 insertions(+), 3 deletions(-)
11
12diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
13index d2e57ac..d3ab43a 100644
14--- a/lib/CodeGen/TargetInfo.cpp
15+++ b/lib/CodeGen/TargetInfo.cpp
16@@ -4403,7 +4403,7 @@ bool ARMABIInfo::isIllegalVectorType(QualType Ty) const {
17 unsigned NumElements = VT->getNumElements();
18 uint64_t Size = getContext().getTypeSize(VT);
19 // NumElements should be power of 2.
20- if ((NumElements & (NumElements - 1)) != 0)
21+ if (((NumElements & (NumElements - 1)) != 0) && NumElements != 3)
22 return true;
23 // Size should be greater than 32 bits.
24 return Size <= 32;
25@@ -4437,8 +4437,8 @@ llvm::Value *ARMABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
26 TyAlign = std::min(std::max(TyAlign, (uint64_t)4), (uint64_t)8);
27 else
28 TyAlign = 4;
29- // Use indirect if size of the illegal vector is bigger than 16 bytes.
30- if (isIllegalVectorType(Ty) && Size > 16) {
31+ // Use indirect if size of the illegal vector is bigger than 32 bytes.
32+ if (isIllegalVectorType(Ty) && Size > 32) {
33 IsIndirect = true;
34 Size = 4;
35 TyAlign = 4;
36--
371.9.1.423.g4596e3a
38