@@ -526,9 +526,9 @@ static void EmitHLSLScalarFlatCast(CodeGenFunction &CGF, Address DestVal,
526526}
527527
528528// emit a flat cast where the RHS is an aggregate
529- static void EmitHLSLAggregateFlatCast (CodeGenFunction &CGF, Address DestVal,
530- QualType DestTy, Address SrcVal,
531- QualType SrcTy, SourceLocation Loc) {
529+ static void EmitHLSLElementwiseCast (CodeGenFunction &CGF, Address DestVal,
530+ QualType DestTy, Address SrcVal,
531+ QualType SrcTy, SourceLocation Loc) {
532532 // Flatten our destination
533533 SmallVector<QualType, 16 > DestTypes; // Flattened type
534534 SmallVector<std::pair<Address, llvm::Value *>, 16 > StoreGEPList;
@@ -963,7 +963,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
963963 case CK_HLSLArrayRValue:
964964 Visit (E->getSubExpr ());
965965 break ;
966- case CK_HLSLAggregateCast : {
966+ case CK_HLSLElementwiseCast : {
967967 Expr *Src = E->getSubExpr ();
968968 QualType SrcTy = Src->getType ();
969969 RValue RV = CGF.EmitAnyExpr (Src);
@@ -978,7 +978,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
978978 assert (RV.isAggregate () &&
979979 " Can't perform HLSL Aggregate cast on a complex type." );
980980 Address SrcVal = RV.getAggregateAddress ();
981- EmitHLSLAggregateFlatCast (CGF, DestVal, DestTy, SrcVal, SrcTy, Loc);
981+ EmitHLSLElementwiseCast (CGF, DestVal, DestTy, SrcVal, SrcTy, Loc);
982982 }
983983 break ;
984984 }
@@ -1552,7 +1552,7 @@ static bool castPreservesZero(const CastExpr *CE) {
15521552 case CK_NonAtomicToAtomic:
15531553 case CK_AtomicToNonAtomic:
15541554 case CK_HLSLVectorTruncation:
1555- case CK_HLSLAggregateCast :
1555+ case CK_HLSLElementwiseCast :
15561556 return true ;
15571557
15581558 case CK_BaseToDerivedMemberPointer:
0 commit comments