================ @@ -4763,6 +4763,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, CK_ZeroToOCLOpaqueType, From->getValueKind()).get(); break; + case ICK_HLSL_Vector_Truncation: { + // Note: HLSL vectors are ExtVectors. Since this truncates a vector to a + // smaller vector, this can only operate on arguments where the source and + // destination types are ExtVectors. ---------------- llvm-beanz wrote:
HLSL's vector syntax produces ExtVectors. The `vector` type is basically: ```c++ template<typename T, int Sz> using vector = T __attribute__((ext_vector_type(Sz))); ``` Then all the explicit types are just typedefs off that defined in `hlsl_basic_types.h`. We haven't explicitly disabled non-Ext vector types in Clang, but they are disabled in DXC. I'm unsure one way or another whether we should explicitly disable them in Clang for HLSL. 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