]> granicus.if.org Git - clang/commitdiff
now that GetSSETypeAtOffset handles passing SSE class values as
authorChris Lattner <sabre@nondot.org>
Thu, 29 Jul 2010 21:22:50 +0000 (21:22 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 29 Jul 2010 21:22:50 +0000 (21:22 +0000)
float, the special case hack in getCoerceResult can go away.

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

lib/CodeGen/TargetInfo.cpp

index 5f4efcf0bd85a1d13e9d3bcfca34168ada5bfd95..fc19637e2abf42217a0236f90de20207931ec5c3 100644 (file)
@@ -1127,21 +1127,7 @@ ABIArgInfo X86_64ABIInfo::getCoerceResult(QualType Ty,
       return (Ty->isPromotableIntegerType() ?
               ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
      
-  } else if (CoerceTo->isDoubleTy()) {
-    assert(Ty.isCanonical() && "should always have a canonical type here");
-    assert(!Ty.hasQualifiers() && "should never have a qualified type here");
-
-    // Float and double end up in a single SSE reg.
-    if (Ty == getContext().FloatTy || Ty == getContext().DoubleTy)
-      return ABIArgInfo::getDirect();
-
-    // If this is a 32-bit structure that is passed as a double, then it will be
-    // passed in the low 32-bits of the XMM register, which is the same as how a
-    // float is passed.  Coerce to a float instead of a double.
-    if (getContext().getTypeSizeInChars(Ty).getQuantity() == 4)
-      CoerceTo = llvm::Type::getFloatTy(CoerceTo->getContext());
   }
-
   return ABIArgInfo::getDirect(CoerceTo);
 }