================ @@ -6,7 +6,7 @@ // CHECK: %conv2 = fptrunc double %hlsl.dot to float // CHECK: ret float %conv2 float builtin_bool_to_float_type_promotion ( float p0, bool p1 ) { - return __builtin_hlsl_dot ( p0, p1 ); + return __builtin_hlsl_dot ( (double)p0, (double)p1 ); ---------------- farzonl wrote:
>From the checks it looks like you have just made the double more explicit. >Codegen doesn't look different. So I'm fine with this change. Also most of the type promotion rules for HLSL are enforced on the HLSL header. We are just using the builins as aliases for the cases we need to invoke an intrinsic. Note to myself though these tests don't look correct and should probably be removed. DXC would have promoted bool to a float. Short of setting the builtin as `CustomTypeChecking` I don't think that can be achieved here. But again it does not matter because the promotion rules are handled on the hlsl `dot` api which only aliases to the builtin. https://github.com/llvm/llvm-project/pull/119423 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits