farzonl wrote:

This PR has me thinking about a related problem.

 In HLSL we have elementwise builtins like `__builtin_hlsl_elementwise_frac`. 
We do not add the `CustomTypeChecking` attribute to these builtins. This puts 
us down the  variadic type check rules for scalar inputs to these builtins. 
Which mean for floating point cases the type defaults to double. in `-O0` our 
builtin is wrapped in 
`%8 = fpext float %7 to double`
 `%9 =  <call to builitn>(%8) `
`fptrunc  double %9 to float`

Does it make more sense to switch all these to CustomTypeChecking Or should we 
consider  type constaining like what you did here?

https://github.com/llvm/llvm-project/pull/125673
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to