vector of long and ulong are also classified as INTEGER in x86-64 abi,

this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.

llvm-svn: 112205
This commit is contained in:
Chris Lattner 2010-08-26 18:13:50 +00:00
parent f34728a95c
commit 69e683fb35
2 changed files with 9 additions and 1 deletions

View File

@ -894,7 +894,9 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase,
// gcc passes <1 x long long> as INTEGER.
if (VT->getElementType()->isSpecificBuiltinType(BuiltinType::LongLong) ||
VT->getElementType()->isSpecificBuiltinType(BuiltinType::ULongLong))
VT->getElementType()->isSpecificBuiltinType(BuiltinType::ULongLong) ||
VT->getElementType()->isSpecificBuiltinType(BuiltinType::Long) ||
VT->getElementType()->isSpecificBuiltinType(BuiltinType::ULong))
Current = Integer;
else
Current = SSE;

View File

@ -239,3 +239,9 @@ typedef unsigned long long v1i64 __attribute__((__vector_size__(8)));
// CHECK: define i64 @f34(i64 %arg.coerce)
v1i64 f34(v1i64 arg) { return arg; }
// rdar://8358475
// CHECK: define i64 @f35(i64 %arg.coerce)
typedef unsigned long v1i64_2 __attribute__((__vector_size__(8)));
v1i64_2 f35(v1i64_2 arg) { return arg+arg; }