Skip to content

Commit 3065d04

Browse files
committed
Yes, vector conversions are bitcasts.
llvm-svn: 119141
1 parent f608deb commit 3065d04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Sema/SemaExpr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5282,7 +5282,7 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType,
52825282
if (rhsType->isExtVectorType())
52835283
return Incompatible;
52845284
if (rhsType->isArithmeticType()) {
5285-
Kind = CK_Unknown; // FIXME: vector splat, requires two casts
5285+
Kind = CK_Unknown; // FIXME: vector splat, potentially requires two casts
52865286
return Compatible;
52875287
}
52885288
}
@@ -5294,14 +5294,14 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType,
52945294
// no bits are changed but the result type is different.
52955295
if (getLangOptions().LaxVectorConversions &&
52965296
(Context.getTypeSize(lhsType) == Context.getTypeSize(rhsType))) {
5297-
Kind = CK_Unknown; // FIXME: vector reinterpret is... bitcast?
5297+
Kind = CK_BitCast;
52985298
return IncompatibleVectors;
52995299
}
53005300

53015301
// Allow assignments of an AltiVec vector type to an equivalent GCC
53025302
// vector type and vice versa
53035303
if (Context.areCompatibleVectorTypes(lhsType, rhsType)) {
5304-
Kind = CK_Unknown; // FIXME: vector conversion
5304+
Kind = CK_BitCast;
53055305
return Compatible;
53065306
}
53075307
}

0 commit comments

Comments
 (0)