[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

Sarah Spall via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 13 10:28:24 PDT 2025


================
@@ -58,9 +58,7 @@ constexpr vector<T, L> reflect_vec_impl(vector<T, L> I, vector<T, L> N) {
 #endif
 }
 
-template <typename T>
-constexpr enable_if_t<is_same<float, T>::value || is_same<half, T>::value, T>
-fmod_impl(T X, T Y) {
+template <typename T> constexpr T fmod_impl(T X, T Y) {
----------------
spall wrote:

Why is this needed along with the definitions in hlsl_intrinsics.h?

https://github.com/llvm/llvm-project/pull/131035


More information about the cfe-commits mailing list