[clang] [llvm] [HLSL] Implement the `fwidth` intrinsic for DXIL and SPIR-V target (PR #161378)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 04:56:50 PST 2025


================
@@ -0,0 +1,118 @@
+// RUN: %clang_cc1 -finclude-default-header  -x hlsl  -triple dxil-pc-shadermodel6.3-library %s \
+// RUN:  -emit-llvm -disable-llvm-passes -fnative-half-type -o - | \
+// RUN:  FileCheck %s --check-prefixes=CHECK
+// RUN: %clang_cc1 -finclude-default-header  -x hlsl  -triple spirv-pc-vulkan-compute  %s \
----------------
farzonl wrote:

it is a bit odd this is compute ` -triple spirv-pc-vulkan-compute` but I suppose this is fine since we are doing  `-emit-llvm`.

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


More information about the llvm-commits mailing list