[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 18 10:08:20 PST 2024
================
@@ -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 );
----------------
frasercrmck wrote:
Thanks for the reply. I think that make sense, thank you.
Note though that I had to make a change to what I think is a user-facing `pow` builtin [here](https://github.com/llvm/llvm-project/pull/119423/files#diff-fdbd201243000d44dd63e6af5706293c968588d762bed9e050d27e0abd6e80acR40), so this PR might still impact HLSL users directly.
https://github.com/llvm/llvm-project/pull/119423
More information about the cfe-commits
mailing list