summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-26 18:03:20 +0000
committerChris Lattner <sabre@nondot.org>2010-08-26 18:03:20 +0000
commit46830f2fd671791587ccbe6654c8b8e6ca71693b (patch)
tree074f4f5fa3073520b8884fd3c3504ba4a6061d5c
parent7b888fbd91d7305d552459d81090794b0982c073 (diff)
downloadbcm5719-llvm-46830f2fd671791587ccbe6654c8b8e6ca71693b.tar.gz
bcm5719-llvm-46830f2fd671791587ccbe6654c8b8e6ca71693b.zip
1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
this fixes a miscompilation on the included testcase, rdar://8359248 llvm-svn: 112201
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp3
-rw-r--r--clang/test/CodeGen/x86_64-arguments.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 78d7925a900..04faaead2ae 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -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;
diff --git a/clang/test/CodeGen/x86_64-arguments.c b/clang/test/CodeGen/x86_64-arguments.c
index 210a44e104c..0ad8a8acb16 100644
--- a/clang/test/CodeGen/x86_64-arguments.c
+++ b/clang/test/CodeGen/x86_64-arguments.c
@@ -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; }
OpenPOWER on IntegriCloud