]> granicus.if.org Git - clang/commitdiff
vector of long and ulong are also classified as INTEGER in x86-64 abi,
authorChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 18:13:50 +0000 (18:13 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 18:13:50 +0000 (18:13 +0000)
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112205 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp
test/CodeGen/x86_64-arguments.c

index 04faaead2ae20e1c8c89d37a71c288a086b09d3f..958f740bec38342b02e1d8684a1b5101eee9ebe4 100644 (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;
index 0ad8a8acb16ac4f68a06dbe1b240220091290905..51a234d993cade804ae245f106afbff6a83d97aa 100644 (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; }
+