diff options
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 72ba7f879af..6d21622b166 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -471,7 +471,13 @@ void X86_64ABIInfo::classify(QualType Ty, } 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; |