x86_64 ABI: Classify _Complex ints as integer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 72ba7f8..6d21622 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -471,7 +471,13 @@
} else if (const ComplexType *CT = Ty->getAsComplexType()) {
QualType ET = CT->getElementType();
- if (ET == Context.FloatTy)
+ if (ET->isIntegerType()) {
+ unsigned Size = Context.getTypeSize(Ty);
+ if (Size <= 64)
+ Lo = Integer;
+ else if (Size <= 128)
+ Lo = Hi = Integer;
+ } else if (ET == Context.FloatTy)
Lo = SSE;
else if (ET == Context.DoubleTy)
Lo = Hi = SSE;