From: John McCall Date: Mon, 15 Nov 2010 10:08:00 +0000 (+0000) Subject: Yes, vector conversions are bitcasts. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c6d28d6742de6e250560336048fcf545df4d448;p=clang Yes, vector conversions are bitcasts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119141 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index ae38a597e8..ed4a877a9e 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -5282,7 +5282,7 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType, 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 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType, // 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; } }