================ @@ -491,6 +491,31 @@ static bool isTrivialFiller(Expr *E) { return false; } +static void EmitHLSLSplatCast(CodeGenFunction &CGF, Address DestVal, + QualType DestTy, llvm::Value *SrcVal, + QualType SrcTy, SourceLocation Loc) { + // Flatten our destination + SmallVector<QualType> DestTypes; // Flattened type + SmallVector<std::pair<Address, llvm::Value *>, 16> StoreGEPList; + // ^^ Flattened accesses to DestVal we want to store into + CGF.FlattenAccessAndType(DestVal, DestTy, StoreGEPList, DestTypes); + + assert(SrcTy->isScalarType() && "Invalid HLSL splat cast."); + for (unsigned I = 0, Size = StoreGEPList.size(); I < Size; I++) { ---------------- V-FEXrt wrote:
```suggestion for (unsigned I = 0, Size = StoreGEPList.size(); I < Size; ++I) { ``` Very small nit but the style guide says to prefer pre-increment https://llvm.org/docs/CodingStandards.html#prefer-preincrement https://github.com/llvm/llvm-project/pull/118992 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits