[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 11 17:03:07 PDT 2024
================
@@ -4725,6 +4725,12 @@ def HLSLMad : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLNormalize : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_normalize"];
----------------
farzonl wrote:
is this an elementwise case? isnt it `n = normalize(x) = n[i] = x[i]/ length(x)`
https://github.com/llvm/llvm-project/pull/102683
More information about the cfe-commits
mailing list