[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 22 16:43:32 PDT 2025
================
@@ -0,0 +1,44 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
+
+// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - | FileCheck %s
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+typedef float float3 __attribute__((ext_vector_type(3)));
+typedef float float4 __attribute__((ext_vector_type(4)));
+
+// CHECK-LABEL: define spir_func float @test_smoothstep_float(
----------------
farzonl wrote:
> Yes. It also supports int types so will add both to the tests.
If thats true then you need to remove the `hasFloatingRepresentation()` checks for all the SPIRV parts of the code and only keep them for the HLSL parts.
https://github.com/llvm/llvm-project/pull/132288
More information about the llvm-commits
mailing list