[clang] [llvm] [HLSL] Move `normalize` implementation to header files (PR #216228)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 10:54:16 PDT 2026


================
@@ -28,6 +28,14 @@ length_impl(vector<T, N> X) {
 #endif
 }
 
+template <typename T> constexpr T normalize_impl(T X) {
+#if (__has_builtin(__builtin_spirv_normalize))
+  return __builtin_spirv_normalize(X);
----------------
farzonl wrote:

To be clear we are doing it this way because of concerns with the difficulty of the pattern match in spirv?

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


More information about the llvm-commits mailing list