https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/122337
- attribute keeps getting deleted on bad rebases >From 0f0b75dffaefc3460ae8aad7effa75e844ab29ee Mon Sep 17 00:00:00 2001 From: Farzon Lotfi <farzonlo...@microsoft.com> Date: Thu, 9 Jan 2025 13:55:33 -0500 Subject: [PATCH] [HLSL] Add 6.2 SM on half availability for length intrinsic - attribute keeps getting deleted on bad rebases --- clang/lib/Headers/hlsl/hlsl_intrinsics.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Headers/hlsl/hlsl_intrinsics.h b/clang/lib/Headers/hlsl/hlsl_intrinsics.h index cf287e598f76ba..7105d83078a9d7 100644 --- a/clang/lib/Headers/hlsl/hlsl_intrinsics.h +++ b/clang/lib/Headers/hlsl/hlsl_intrinsics.h @@ -1297,9 +1297,11 @@ float4 lerp(float4, float4, float4); /// /// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + ...). +_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) const inline half length(half X) { return __detail::length_impl(X); } const inline float length(float X) { return __detail::length_impl(X); } +_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) template <int N> const inline half length(vector<half, N> X) { return __detail::length_vec_impl(X); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits