[cfe-commits] r119141 - /cfe/trunk/lib/Sema/SemaExpr.cpp
John McCall
rjmccall at apple.com
Mon Nov 15 02:08:01 PST 2010
Author: rjmccall
Date: Mon Nov 15 04:08:00 2010
New Revision: 119141
URL: http://llvm.org/viewvc/llvm-project?rev=119141&view=rev
Log:
Yes, vector conversions are bitcasts.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=119141&r1=119140&r2=119141&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Nov 15 04:08:00 2010
@@ -5282,7 +5282,7 @@
if (rhsType->isExtVectorType())
return Incompatible;
if (rhsType->isArithmeticType()) {
- Kind = CK_Unknown; // FIXME: vector splat, requires two casts
+ Kind = CK_Unknown; // FIXME: vector splat, potentially requires two casts
return Compatible;
}
}
@@ -5294,14 +5294,14 @@
// no bits are changed but the result type is different.
if (getLangOptions().LaxVectorConversions &&
(Context.getTypeSize(lhsType) == Context.getTypeSize(rhsType))) {
- Kind = CK_Unknown; // FIXME: vector reinterpret is... bitcast?
+ Kind = CK_BitCast;
return IncompatibleVectors;
}
// Allow assignments of an AltiVec vector type to an equivalent GCC
// vector type and vice versa
if (Context.areCompatibleVectorTypes(lhsType, rhsType)) {
- Kind = CK_Unknown; // FIXME: vector conversion
+ Kind = CK_BitCast;
return Compatible;
}
}
More information about the cfe-commits
mailing list