[cfe-commits] r109804 - /cfe/trunk/lib/CodeGen/TargetInfo.cpp

Chris Lattner sabre at nondot.org
Thu Jul 29 14:22:50 PDT 2010


Author: lattner
Date: Thu Jul 29 16:22:50 2010
New Revision: 109804

URL: http://llvm.org/viewvc/llvm-project?rev=109804&view=rev
Log:
now that GetSSETypeAtOffset handles passing SSE class values as
float, the special case hack in getCoerceResult can go away.

Modified:
    cfe/trunk/lib/CodeGen/TargetInfo.cpp

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=109804&r1=109803&r2=109804&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Thu Jul 29 16:22:50 2010
@@ -1127,21 +1127,7 @@
       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);
 }
 





More information about the cfe-commits mailing list