[cfe-commits] r112214 - /cfe/trunk/lib/CodeGen/TargetInfo.cpp
Chris Lattner
sabre at nondot.org
Thu Aug 26 13:08:43 PDT 2010
Author: lattner
Date: Thu Aug 26 15:08:43 2010
New Revision: 112214
URL: http://llvm.org/viewvc/llvm-project?rev=112214&view=rev
Log:
improve comments.
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=112214&r1=112213&r2=112214&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Thu Aug 26 15:08:43 2010
@@ -590,17 +590,14 @@
}
if (const VectorType *VT = Ty->getAs<VectorType>()) {
- // On Darwin, some vectors are returned in registers.
+ // On Darwin, some vectors are passed in memory, we handle this by passing
+ // it as an i8/i16/i32/i64.
if (IsDarwinVectorABI) {
uint64_t Size = getContext().getTypeSize(Ty);
-
- // Always return in register if it fits in a general purpose
- // register, or if it is 64 bits and has a single element.
if ((Size == 8 || Size == 16 || Size == 32) ||
(Size == 64 && VT->getNumElements() == 1))
return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(),
Size));
-
return ABIArgInfo::getIndirect(0);
}
More information about the cfe-commits
mailing list