]> granicus.if.org Git - clang/commitdiff
Yes, vector conversions are bitcasts.
authorJohn McCall <rjmccall@apple.com>
Mon, 15 Nov 2010 10:08:00 +0000 (10:08 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 15 Nov 2010 10:08:00 +0000 (10:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119141 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index ae38a597e8f2ebc7d7d1e9fd7a6d080a19e70c0c..ed4a877a9e6646662b8eb8a13b011942055cb179 100644 (file)
@@ -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;
       }
     }