]> granicus.if.org Git - clang/commitdiff
1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
authorChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 18:03:20 +0000 (18:03 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 18:03:20 +0000 (18:03 +0000)
this fixes a miscompilation on the included testcase, rdar://8359248

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

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

index 78d7925a900c0537eae206734d8d1fcc477ef281..04faaead2ae20e1c8c89d37a71c288a086b09d3f 100644 (file)
@@ -893,7 +893,8 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase,
         return;
 
       // gcc passes <1 x long long> as INTEGER.
-      if (VT->getElementType()->isSpecificBuiltinType(BuiltinType::LongLong))
+      if (VT->getElementType()->isSpecificBuiltinType(BuiltinType::LongLong) ||
+          VT->getElementType()->isSpecificBuiltinType(BuiltinType::ULongLong))
         Current = Integer;
       else
         Current = SSE;
index 210a44e104c1b5579a79cf95d4d88eb42489ac24..0ad8a8acb16ac4f68a06dbe1b240220091290905 100644 (file)
@@ -233,4 +233,9 @@ void f33(va_list X) {
   va_arg(X, struct f33s);
 }
 
+typedef unsigned long long v1i64 __attribute__((__vector_size__(8)));
+
+// rdar://8359248
+// CHECK: define i64 @f34(i64 %arg.coerce)
+v1i64 f34(v1i64 arg) { return arg; }