================ @@ -2466,6 +2504,14 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { case CK_IntToOCLSampler: return CGF.CGM.createOpenCLIntToSamplerConversion(E, CGF); + case CK_HLSLVectorTruncation: { + assert(DestTy->isVectorType() && "Expected dest type to be vector type"); + Value *Vec = Visit(const_cast<Expr *>(E)); + SmallVector<int, 16> Mask; + Mask.insert(Mask.begin(), DestTy->getAs<VectorType>()->getNumElements(), 0); ---------------- rjmccall wrote:
```suggestion Mask.insert(Mask.begin(), DestTy->castAs<VectorType>()->getNumElements(), 0); ``` https://github.com/llvm/llvm-project/pull/71098 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits